From f086646d01378903661c5ac8d1925dc855540040 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Thu, 15 Jul 2021 17:19:54 +0200 Subject: u-boot-distro-boot: fix nfs booting In the nfs-dhcp case we should not pass any NFS related settings from U-Boot as the Linux kernel will do its very own DHCP request where it will get all those settings and knows very well how to apply those. In the nfs-static case we should add a slash in front of the rootpath as otherwise an additional /tftpboot/ will be pre-fixed which likely is not what one wants. https://man7.org/linux/man-pages/man7/bootparam.7.html 'nfsroot=...' This sets the NFS root name to the given string. If this string does not begin with '/' or ',' or a digit, then it is prefixed by '/tftpboot/'. This root name is used in case of a net boot. Signed-off-by: Marcel Ziswiler --- recipes-bsp/u-boot/u-boot-distro-boot/boot.cmd.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-bsp/u-boot/u-boot-distro-boot/boot.cmd.in b/recipes-bsp/u-boot/u-boot-distro-boot/boot.cmd.in index 68a9d1a..ec765b0 100644 --- a/recipes-bsp/u-boot/u-boot-distro-boot/boot.cmd.in +++ b/recipes-bsp/u-boot/u-boot-distro-boot/boot.cmd.in @@ -106,10 +106,10 @@ fi # Set static commands if test ${root_devtype} = "nfs-dhcp"; then - env set rootfsargs_set 'env set rootfsargs "root=/dev/nfs ip=dhcp nfsroot=${rootpath}"' + env set rootfsargs_set 'env set rootfsargs "root=/dev/nfs ip=dhcp"' else if test ${root_devtype} = "nfs-static"; then - env set rootfsargs_set 'env set rootfsargs "root=/dev/nfs nfsroot=${serverip}:${rootpath}"' + env set rootfsargs_set 'env set rootfsargs "root=/dev/nfs nfsroot=${serverip}:/${rootpath}"' else env set uuid_set 'part uuid ${root_devtype} ${root_devnum}:${root_part} uuid' env set rootfsargs_set 'run uuid_set && env set rootfsargs root=PARTUUID=${uuid} ro rootwait' -- cgit v1.2.3