Skip to contentSkip to conversation

ARM: bootscript: Remove hard-coded rootpath from K+P's tpcboot.cmd

PATCH New Lukasz Majewski 2 participants 7 messages Aug 31, 2018 – Sep 7, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 ARM: bootscript: Remove hard-coded rootpath from K+P's tpcboot.cmd

The 'rootpath' can be provided by DHCP server. Removing this line prevents from overwriting it.

To do that on the DHCP server side (isc-dhcp-server) modify dhcpd.conf and add 'option root-path "192.168.X.Y:/srv/tftp/rootfs";'

---

 board/k+p/bootscripts/tpcboot.cmd | 1 -
 1 file changed, 1 deletion(-)
board/k+p/bootscripts/tpcboot.cmd +0 -1
index 16b93ebe3f..9290317730 100644
@@ -65,7 +65,6 @@ fi"
 #
 # Provide 'boot_nfs' command
 #------------------------------------------------------------
-setenv rootpath "/srv/tftp/KP/rootfs"
 setenv nfsargs "setenv bootargs root=/dev/nfs rw \
        nfsroot=${serverip}:${rootpath},nolock,nfsvers=3"
 setenv addip "setenv bootargs ${bootargs} \
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/4 ARM: bootscript: Remove hard-coded rootpath from K+P's tpcboot.cmd

Dear Tom, Stefano,

Quoted 17 lines

The 'rootpath' can be provided by DHCP server. Removing this line prevents from overwriting it.

To do that on the DHCP server side (isc-dhcp-server) modify dhcpd.conf and add 'option root-path "192.168.X.Y:/srv/tftp/rootfs";'

---

 board/k+p/bootscripts/tpcboot.cmd | 1 -
 1 file changed, 1 deletion(-)
(quoted diff) +0 -0

b/board/k+p/bootscripts/tpcboot.cmd index 16b93ebe3f..9290317730 100644 --- a/board/k+p/bootscripts/tpcboot.cmd
+++ b/board/k+p/bootscripts/tpcboot.cmd

board/k+p/bootscripts/tpcboot.cmd fi" · line 70

Quoted 7 lines
board/k+p/bootscripts/tpcboot.cmd +0 -1
@@ -65,7 +65,6 @@ fi"
 #
 # Provide 'boot_nfs' command
 #------------------------------------------------------------
-setenv rootpath "/srv/tftp/KP/rootfs"
 setenv nfsargs "setenv bootargs root=/dev/nfs rw \
        nfsroot=${serverip}:${rootpath},nolock,nfsvers=3"
 setenv addip "setenv bootargs ${bootargs} \

Is there any chance that this series would be applied before v2018.09 release?

Those are fixes related to a particular board(s), which I do maintain.

Thanks in advance.

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180907/0cfefe9a/attachment.sig>

#2 lore raw

PATCH 1/4 ARM: bootscript: Remove hard-coded rootpath from K+P's tpcboot.cmd

Hi Lukasz,

Quoted 30 lines · Lukasz Majewski

Dear Tom, Stefano,

Quoted 17 lines

The 'rootpath' can be provided by DHCP server. Removing this line prevents from overwriting it.

To do that on the DHCP server side (isc-dhcp-server) modify dhcpd.conf and add 'option root-path "192.168.X.Y:/srv/tftp/rootfs";'

---

 board/k+p/bootscripts/tpcboot.cmd | 1 -
 1 file changed, 1 deletion(-)
(quoted diff) +0 -0

b/board/k+p/bootscripts/tpcboot.cmd index 16b93ebe3f..9290317730 100644 --- a/board/k+p/bootscripts/tpcboot.cmd
+++ b/board/k+p/bootscripts/tpcboot.cmd

board/k+p/bootscripts/tpcboot.cmd fi" · line 70

Quoted 7 lines
board/k+p/bootscripts/tpcboot.cmd +0 -1
@@ -65,7 +65,6 @@ fi"
 #
 # Provide 'boot_nfs' command
 #------------------------------------------------------------
-setenv rootpath "/srv/tftp/KP/rootfs"
 setenv nfsargs "setenv bootargs root=/dev/nfs rw \
        nfsroot=${serverip}:${rootpath},nolock,nfsvers=3"
 setenv addip "setenv bootargs ${bootargs} \

Is there any chance that this series would be applied before v2018.09 release?

Quoted 2 lines

Those are fixes related to a particular board(s), which I do maintain.

Patches were sent just a week ago, merge window was closed. This is the same case as Otavio's and I will merge them after release.

Best regards,
Stefano

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#3 lore raw

PATCH 1/4 ARM: bootscript: Remove hard-coded rootpath from K+P's tpcboot.cmd

Hi Stefano,

Quoted 34 lines

Hi Lukasz,

Quoted 31 lines · Lukasz Majewski

Dear Tom, Stefano,

Quoted 18 lines

The 'rootpath' can be provided by DHCP server. Removing this line prevents from overwriting it.

To do that on the DHCP server side (isc-dhcp-server) modify dhcpd.conf and add 'option root-path "192.168.X.Y:/srv/tftp/rootfs";'

---

 board/k+p/bootscripts/tpcboot.cmd | 1 -
 1 file changed, 1 deletion(-)
(quoted diff) +0 -0

b/board/k+p/bootscripts/tpcboot.cmd index 16b93ebe3f..9290317730 100644 --- a/board/k+p/bootscripts/tpcboot.cmd
+++ b/board/k+p/bootscripts/tpcboot.cmd

board/k+p/bootscripts/tpcboot.cmd fi" · line 70

Quoted 7 lines
board/k+p/bootscripts/tpcboot.cmd +0 -1
@@ -65,7 +65,6 @@ fi"
 #
 # Provide 'boot_nfs' command
 #------------------------------------------------------------
-setenv rootpath "/srv/tftp/KP/rootfs"
 setenv nfsargs "setenv bootargs root=/dev/nfs rw \
        nfsroot=${serverip}:${rootpath},nolock,nfsvers=3"
 setenv addip "setenv bootargs ${bootargs} \  

Is there any chance that this series would be applied before v2018.09 release?

Quoted 5 lines
Quoted 2 lines

Those are fixes related to a particular board(s), which I do maintain.

Patches were sent just a week ago, merge window was closed. This is the same case as Otavio's and I will merge them after release.

Ok. No problem :-)

Quoted 4 lines

Best regards,
Stefano

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180907/94712559/attachment.sig>

#4 lore raw

PATCH 2/4 ARM: bootscript: Replace tftpboot with dhcp when downloading kernel

In reply to Lukasz Majewski

The 'dhcp' command is more versatile as it allows working with the DHCP server to obtain serverip, ipaddress and other network parameters.

The configuration necessary to obtain the serverip (dhcpd.conf):
option option-150 code 150 = ip-address;

and in the subnet definition:
option option-150 192.168.X.Y;

---

 board/k+p/bootscripts/tpcboot.cmd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
board/k+p/bootscripts/tpcboot.cmd +1 -1
index 9290317730..ebd2d4ec2a 100644
@@ -52,7 +52,7 @@ fi;"
 #
 # Provide 'boot_tftp_kernel' command
 #------------------------------------------------------------
-setenv download_kernel "tftpboot ${loadaddr} ${kernel_file}"
+setenv download_kernel "dhcp ${loadaddr} ${kernel_file}"
 
 setenv boot_tftp_kernel "
 if run download_kernel; then
Signature · 1 line
2.11.0
#5 lore raw

PATCH 3/4 ARM: bootscript: Fix the nfsargs and addip in K+P's tpcboot.cmd

In reply to Lukasz Majewski

The quotes around ${bootargs} were missing as we elaborate those variables twice - once when we "setenv" the command and secondly when we "run" it. Without quotes we have just empty string in the second call.

Moreover there is an issue with line breaks - as the original commands got truncated.

---

 board/k+p/bootscripts/tpcboot.cmd | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
board/k+p/bootscripts/tpcboot.cmd +3 -6
index ebd2d4ec2a..e26fd72825 100644
@@ -65,17 +65,14 @@ fi"
 #
 # Provide 'boot_nfs' command
 #------------------------------------------------------------
-setenv nfsargs "setenv bootargs root=/dev/nfs rw \
-       nfsroot=${serverip}:${rootpath},nolock,nfsvers=3"
-setenv addip "setenv bootargs ${bootargs} \
-       ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:\
-       ${hostname}:eth0:on"
+setenv nfsargs "setenv bootargs root=/dev/nfs rw nfsroot='${serverip}':'${rootpath}',nolock,nfsvers=3"
+setenv addip "setenv bootargs '${bootargs}' ip='${ipaddr}':'${serverip}':'${gatewayip}':'${netmask}':'${hostname}':eth0:on"
 
 setenv boot_nfs "
 if run download_kernel; then
 	run nfsargs;
 	run addip;
-	setenv bootargs ${bootargs} console=${console};
+	setenv bootargs '${bootargs}' console=${console};
 
 	run boot_fitImage;
 fi"
Signature · 1 line
2.11.0
#6 lore raw

PATCH 4/4 ARM: bootscript: For nfsargs only use rootpath (and remove not needed serverip)

In reply to Lukasz Majewski

The serverip part is provided from DHCP server with
'option root-path "192.168.3.1:/srv/tftp/rootfs";' parameter in dhcpd.conf

---

 board/k+p/bootscripts/tpcboot.cmd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
board/k+p/bootscripts/tpcboot.cmd +1 -1
index e26fd72825..0576e81140 100644
@@ -65,7 +65,7 @@ fi"
 #
 # Provide 'boot_nfs' command
 #------------------------------------------------------------
-setenv nfsargs "setenv bootargs root=/dev/nfs rw nfsroot='${serverip}':'${rootpath}',nolock,nfsvers=3"
+setenv nfsargs "setenv bootargs root=/dev/nfs rw nfsroot='${rootpath}',nolock,nfsvers=3"
 setenv addip "setenv bootargs '${bootargs}' ip='${ipaddr}':'${serverip}':'${gatewayip}':'${netmask}':'${hostname}':eth0:on"
 
 setenv boot_nfs "
Signature · 1 line
2.11.0