TFTP/NFS Boot Hang on 'Starting Kernel'

Hello,

I ran into a problem while trying to boot from TFTP/NFS server: The boards hangs on Starting Kernel ... after downloading from the local TFTP server the kernel Image and the dts.

I’m working with an Apalis-iMX8QM on a Ixora V1.1A carrier board.

The Image was built with the YoctoProject following this tutorial:

  • Toradex version = 5.0.0
  • Machine name = apalis-imx8
  • Distro = tdx-xwayland
  • Image = tdx-reference-multimedia-image

I put the rootfs into /srv/nfs/imx8qm and the bootfs (only Image and imx8qm-apalis-ixora-v1.1.dtb files) into /srv/tftp.

I modified the uboot environment:

nfsboot=run netargs; dhcp ${loadaddr} ${image}; tftp ${fdt_addr_r} ${fdtfile}; booti ${loadaddr} - ${fdt_addr_r}
image=Image
fdtfile=imx8qm-apalis-ixora-v1.1.dtb

I’m starting the board with run nfsboot.

Note that the image has been installed with Toradex Easy Installer and it works when I’m booting from the eMMC but it fails when I boot from TFTP/NFS and I need it to be able to work on the kernel !

Any ideas or suggestions to solve the problem ?

Hi @jstordeur,

Sorry for the delay in providing an answer here.

First, let me know if this issue is still happening, or you managed to figure out a solution for it.
Otherwise, I’ll try to reproduce it locally here.

Best regards,
André Curvello

Hello @andrecurvello.tx,

I managed to find a solution to my problem, so no problem !

Thank you for the answer anyway.

Best regards,

Stordeur Jordan.

Hi @jstordeur, good to know!

Would you mind sharing what was the issue?

Best regards,
André Curvello

@andrecurvello.tx
Sure. Even if I my knowledge about uboot is poor I managed to find out this:

The problem comes from the fact that I was using the nfsboot variable to boot:

nfsboot=run netargs; dhcp ${loadaddr} ${image}; tftp ${fdt_addr_r} ${fdtfile}; booti ${loadaddr} - ${fdt_addr_r}

I added a custom boot environment variable bootcmd_custom inspired from the named variable bootcmd_dhcp

        setenv boot_targets 'custom mmc1 mmc2 mmc0 usb0 dhcp'
        
        setenv bootcmd_custom 'run boot_net_usb_start; run boot_pci_enum; run netargs;if dhcp ${scriptaddr} ${serverip}:${boot_script_dhcp}; then source ${scriptaddr}; fi;echo beginsetenv1; setenv efi_fdtfile ${fdtfile}; setenv efi_old_vci ${bootp_vci};setenv efi_old_arch ${bootp_arch};setenv bootp_vci PXEClient:Arch:00011:UNDI:003000;setenv bootp_arch 0xb;echo endsetenv1; if dhcp ${kernel_addr_r} ${serverip}:Image; then run netargs;tftpboot ${fdt_addr_r} ${serverip}:${efi_fdtfile};if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r}; else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi;fi;setenv bootp_vci ${efi_old_vci};setenv bootp_arch ${efi_old_arch};setenv efi_fdtfile;setenv efi_old_arch;setenv efi_old_vci;'

And, weirdly, I had to modify the fdtfile to imx8qm-apalis-eval-v1.1.dtb otherwise I got plenty of errors from the kernel while booting. And the kernel was stuck in those errors.

I don’t really understand why the previous configuration failed but it works !

Thanks for the feedback.

I’ll analyze this issue carefully because it should be expected to work smoothly out-of-the-box.

@jaski.tx, please also observe the feedback from @jstordeur.

We identified the necessity of changes at our side too.

As soon as possible this will be added in our BSP 5, and also documented in our Developer portal

Thanks!