Buildroot: error copying resolv.conf from target_skeleton directory

Nathanael D. Noblet nathanael at gnat.ca
Tue Oct 18 19:13:00 UTC 2005


On Tue, 2005-10-18 at 10:52 -0700, Joseph M Dupre (AVAB Inc.) wrote:
> I have replaced and added some files in 
> buildroot/target/generic/target_skeleton/etc.  One of these files is 
> 'resolv.conf'.  When I do a make I get the following error:   
> 
> if [ -f "target/generic/skel.tar.gz" ] ; then \
> 	zcat target/generic/skel.tar.gz | tar -C 
> /home/dupre/projects/acrosser/rootfs/buildroot/build_i486 -xf -; \
> fi;
> if [ -d "target/generic/target_skeleton" ] ; then \
> 	cp -a target/generic/target_skeleton/* 
> /home/dupre/projects/acrosser/rootfs/buildroot/build_i486/root/; \
> fi;
> cp: cannot create regular file 
> `/home/dupre/projects/acrosser/rootfs/buildroot/build_i486/root/etc/re
> solv.conf': No such file or directory
> make: *** 
> [/home/dupre/projects/acrosser/rootfs/buildroot/build_i486/root] 
> Error 1
> 
> It took me a while to figure out what was going on:  Inside 
> skel.tar.gz is a link named root/etc/resolv.conf that points to 
> /tmp/resolv.conf.  If /tmp/resolv.conf does not exist, the copy fails 
> and buildroot exits.
> 
> Is there a particular reason why skel.tar.gz contains that link???

The system when booted, mounts a ramdisk type tmp. So that logs and what
not, don't fill the actual file system. Some of the changeable system
settings like resolv.conf are there as well as they can change. This is
(as far as I can tell) to minimize writing to the (assumed) flash media,
as they have a limited # of writes before they degrade. At least this is
what I assume the decision was based on.

Unfortunately I am unaware of the method to fix it for you. Besides
providing your own skel.tar.gz, perhaps a config option allowing one to
override the location of the skel.tar.gz file?

-- 
Nathanael D. Noblet
Gnat Solutions, Inc
http://www.gnat.ca/
T 250.385.4613
C 250.383.4613




More information about the uClibc mailing list