Network booting

edited July 2019 in AML-S805X-AC
Has anyone tried to boot over the network using tftpboot? I'm new to network booting but I wanted to give it a try while I'm waiting for a new USB flash drive to arrive. I have one of my servers setup to serve installation media over the network, but I'm not sure what needs to be done on the La Frite side to get it going. I've made some progress, and I'm hoping it's just a matter of tweaking some things on the server. 'tftpboot my-tftpserver-ip' connects, but I get a file not found error. I'm just wondering if this will even work before I continue investigating. Maybe there's a better way to do it.

Comments

  • Under u-boot this command will print all variables:
    >> printenv

    the boot commands are the variables with:

    bootcmd_x 

    Where "x" is the device to boot. Those are little one line boot scripts inside variables. for instance

    bootcmd_usb0
    is the one that boots from the USB. There may be one for the network boot I think. I have no PXE experience. Though La Frite will make me learn about it for sure.
  • What I think should be done to get it to network boot with u-boot is to convert the kernel image and initrd to the format u-boot uses, and then get it to load with a u-boot script.
    Creating the files with the u-boot-tools (example uses the debian 9 headless image):
    mkimage -A arm64 -O linux -C none -T kernel -a 0x01080000 -e 0x01080000 -d vmlinuz-4.19.57+ uImage
    mkimage -A arm64 -O linux -T ramdisk -n "initramfs" -C gzip -a 0x13000000 -e 0x13000000 -d initrd.img-4.19.57+ uInitramfs
    Load script (substitute your own paths):
    tftpboot ${kernel_addr_r} /libreComputer/bank/boot/uImage
    tftpboot ${fdt_addr_r} /libreComputer/dtb/libre-computer/aml-s805x-ac/platform.dtb
    tftpboot ${ramdisk_addr_r} /libreComputer/bank/boot/uInitramfs
    setenv bootargs console=/dev/ttyALM0 ip=dhcp root=/dev/nfs rw nfsroot=192.168.123.2:/storage/netboot/libreComputer/bank
    bootm ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}
    On the la Frite load and execute the script with
    tftpboot ${scriptaddr} loadScriptLocationOnTFTPSever
    source ${scriptaddr}

    This does find the kernel and starts to load it, but if fails with a synchronous abort, so something is still missing



Sign In or Register to comment.