[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Building minimal rootfs to use as non-root on arm device

On Tue, Apr 23, 2013 at 12:13:19AM -0700, Corbin Champion wrote:
> I have created a rootfs using buildroot, but using a crosstool-ng toolchain
> with glibc.  This showed me the minimal set of files necessary.  I then
> replaced all the libraries with ones pulled straight from the squeeze .deb
> packages for armel.

Hmm. If the problem was to find out the minimal set of files, wouldn't
grip dependencies do the same?

> Entering the same setup, but using qemu and chroot on my host machine
> works

Are "using qemu and chroot" two distinct test cases?

> When I run "*strace ping google.com*" I get the following:

Is this on the target?

> *open("/data/local/target/bin/ping", O_RDONLY) = 3*

If yes, how is the rootfs mounted, and what is /data/local/target?

> *open("/etc/resolv.conf", O_RDONLY)      = -1 ENOENT (No such file or
> directory)*
> *connect(3, {sa_family=AF_INET, sin_port=htons(53),
> sin_addr=inet_addr("")}, 16) = 0*
> *open("/data/local/target/etc/hosts", O_RDONLY|O_CLOEXEC) = 3*
> it figured out that
> the host file wasn't simply at /etc/hosts, but why do you think it didn't
> look in the correct location for nsswitch.conf and resolv.conf?

The fastest way to answer your question would probably be to look at your
implementation of gethostbyname & Co.

Do you mean that the correct location should be
/data/local/target/etc/resolv.conf? If yes, why? What is the problem
using /etc/resolv.conf?

With kind regards,

Reply to: