1

I want to use u-boot my Arch linux including the kernel from the NAS via NFS (or TFTP if it requires).

I have installed Arch before and I understand kernel.img, I have read this link about U-Boot basic setups. But I have no idea what is zImage and DTB files.

If they are kernel files, should I make another read-only partition in my NAS just for that?

Also, if I must use TFTP for the kernel files, is it better to mount the file system with TFTP too?

1

zImage is just a common name for a compressed kernel image.

U-boot is capable of loading and booting various kernel images formats. The arch linux one should be ok.

DTB files are compiled Device Tree files that the linux kernel uses to configure the hardware. more on it here : http://elinux.org/Device_Tree

To configure U-boot I advise you to use the uEnv.txt configuration file that you put at the root of the boot partition on the sdcard. It is simpler and you don't loose your configuration if you reset u-boot env.

U-boot will fetch the kernel image and the DTB files via TFTP.

Those files are not that big, you don't have to use a separate partition to store them on your NAS.

As far as I'm aware, I don't think it is possible to have the root fs on tftp! You will have to use NFS for the root fs.

You also have to configure the TFTP and NFS server on your NAS.

Edit:

If you goal is to boot over NFS you can do it without using u-boot, and it is much simpler.

Assuming your NFS server is configured to provide the rootfs at 192.168.0.1:/mnt/rpifs

You just have to edit the cmdline.txt file on the boot partition of the sdcard with something like this:

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/nfs nfsroot=192.168.0.1:/mnt/rpifs ip=dhcp elevator=deadline rootwait

With this configuration the kernel and DTB files (if any) will be loaded from the sdcard, and the kernel will use the NFS share as its root file system.

  • Thanks. But how should I create a compressed kernel and device trees for Arch Linux? – Vicary Feb 28 '15 at 8:41
  • 1
    I updated my answer. If you really need u-boot, please tell us where you are in the setup and what causes problems. – dyslesia Mar 1 '15 at 11:50
  • In short, I have not started yet. I have Linux and Mac env for me to build that. In fact I am seeing if it is possible to put boot configs up the NAS too. Another thing is to see if I can use the same protocol (NFS or TFTP) for both boot and root. – Vicary Mar 1 '15 at 11:56
  • My goal is to build a setup that I don't have to touch the Pi after the initial dd to the SD card. – Vicary Mar 1 '15 at 12:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.