This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

A libnss bug (DNS resolution) with an ARM FVP BusyBox setup tutorial?

Hello, ARM community,

I have followed this well-written guide: https://gitlab.arm.com/arm-reference-solutions/arm-reference-solutions-docs/-/blob/master/docs/aemfvp-a/busybox-boot.rst

to create a BusyBox for ARM FVP model which seems to work fine.

However, there is one small, but critical bug where the `libnss` seems to be broken, and I cannot use a nameserver at all in the BusyBox (as shown in the below figure).

In the figure, you can see that I cannot `ping google.com`, but I am able to `ping 8.8.8.8` (basically IP ping is fine)

A broken DNS library basically prevents me from doing a lot of things which is why I am resorting to asking this question... (I cannot even `ssh` into the FVP model because of it)

From doing some search, the root of this problem is from:

There are known issues with DNS functionality in statically-linked glibc programs (like busybox in this case), because libnss must be dynamically loaded. Building a uClibc toolchain and linking BusyBox against that would resolve this.

So then the question is how do I cross-compile the BusyBox for ARM FVP model with a uClibc library rather than a typical glibc?

Here are what I have tried thus far:

  • I have already tried to build the BusyBox dynamically to see whether `libnss` can be properly loaded dynamically. This doesn't help.
  • I took a look at all of the important files that are used to setup ARM FVP model (listed below):

```

  1. build-busybox.sh
  2. fetch-tools.sh
  3. build-test-busybox.sh

```

After taking a look at all of these files, I'm still unsure what I need to do in order to re-compile BusyBox with uClibc library.

Did anyone else face this problem? It would be helpful to know whether I'm the only one facing this problem or others have also faced such issue.

Kind regards,

Jay