Jump to content

[nfs-boot.cmd.template] Typo


Recommended Posts

There are two more typos/errors.

 

U-Boot struggles about the if statement in line 12.

syntax error

Unknown command '' [two single quotes] - try 'help'

U-Boot boots after commenting out the 3 lines beginning with 'if', 'else' and 'fi'.

 

The 2nd typo came with the latest commit, line 6.

/s/tty1/ttyS1/

 

PS: Debian Jessie next

 

Edit: 'line 12' added.

Link to comment
Share on other sites

The 2nd typo came with the latest commit, line 6.

/s/tty1/ttyS1/

That's not a typo, tty1 is display, ttyS0 is serial port

 

 

U-Boot struggles about the if statement in line 12.

syntax error

Unknown command '' [two single quotes] - try 'help'

U-Boot boots after commenting out the 3 lines beginning with 'if', 'else' and 'fi'.

This template was made for mainline u-boot 2016.01 and syntax was tested with cubietruck config (I'll re-check it again later). It may not work for other (older) u-boot versions, but in any case NFS boot support is in early development stage, so suggestions and feedback are welcome.

Link to comment
Share on other sites

That's not a typo, tty1 is display, ttyS0 is serial port

Ok, you're right, sorry.

 

 

 

This template was made for mainline u-boot 2016.01 and syntax was tested with cubietruck config (I'll re-check it again later). It may not work for other (older) u-boot versions, but in any case NFS boot support is in early development stage, so suggestions and feedback are welcome.

A missing 'then' fixes the syntax error for my Banana Pi M2,  u-boot 2016.01.

if ext4load mmc 0 0x00000000 .next || fatload mmc 0 0x00000000 .next
then
	ext4load mmc 0 ${fdt_addr_r} /dtb/${fdtfile} || fatload mmc 0 ${fdt_addr_r} /dtb/${fdtfile}
	ext4load mmc 0 ${kernel_addr_r} zImage || fatload mmc 0 ${kernel_addr_r} zImage
	setenv fdt_high ffffffff
	bootz ${kernel_addr_r} - ${fdt_addr_r}
else
...

Could you log in or ssh into your cubietruck? On the BPi-M2 it's not possible.

Debian GNU/Linux 8 bananapim2 ttyS0
bananapim2 login: root

Debian GNU/Linux 8 bananapim2 ttyS0
bananapim2 login: fakeuser
Password:

The password request is missing. With a fake user name a password is requested, but of course without success.

Link to comment
Share on other sites

A missing 'then' fixes the syntax error for my Banana Pi M2,  u-boot 2016.01.

Ah, yes. Thanks, will fix this.

 

 

Could you log in or ssh into your cubietruck? On the BPi-M2 it's not possible.

Debian GNU/Linux 8 bananapim2 ttyS0
bananapim2 login: root

Debian GNU/Linux 8 bananapim2 ttyS0
bananapim2 login: fakeuser
Password:

The password request is missing. With a fake user name a password is requested, but of course without success.

 

Tested yesterday with Ubuntu Xenial desktop target on cubietruck, worked like a charm. I believe @tkaiser tested some OS releases with an Orange Pi PC too.

 

Please check syslog on your build host for NFS related errors or warnings, because this error might indicate wrong network configuration or NFS errors.

 

BTW, did you use mainline or legacy kernel?

 

Edit: sorry, was distracted by that thread and thought that you tested FEL boot too. Please try commenting out or removing eth0 related entries from /etc/network/interfaces on your NFS rootfs (this will be fixed in new build script versions, but you'll need to tweak already created rootfs anyway).

And check that your NFS export options look like this:

rw,async,no_subtree_check,no_root_squash
Link to comment
Share on other sites

zador, thanks again for your great help. Following your advice solves the problem. The missing no_root_squash parameter has caused a lot of trouble.

 

Now I'm investigating if NFS Root implies infinite dhcp leases and if it's mandatory to not use dhcp in /etc/network/interfaces or if it is allowed to use dhclient to renew the leases.

Link to comment
Share on other sites

Now I'm investigating if NFS Root implies infinite dhcp leases and if it's mandatory to not use dhcp in /etc/network/interfaces or if it is allowed to use dhclient to renew the leases.

The problem is - network configuration is done by kernel at early boot (kernel built-in DHCP client in this case), so leaving userspace network configuration for this interface enabled may lead to a conflict, especially on shutdown. I think it (kernel) should deal with lease time correctly.

 

If you need (or DHCP doesn't work as intended), you can use manual network configuration.

Link to comment
Share on other sites

The problem is - network configuration is done by kernel at early boot (kernel built-in DHCP client in this case)

Yes, dhcpd logs the appropriate messages.

 

 

 

so leaving userspace network configuration for this interface enabled may lead to a conflict, especially on shutdown. 

Sounds reasonable. ifdown eth0, etc. shoud not be run during shutdown. 

 

 

 

I think it (kernel) should deal with lease time correctly.

Seems to me that it doesn't. The lease time has already ended, but the client is still reachable and ssh works :) AFAIK the DHCP protocol demands a client must not use an ip address after the lease period has ended. A client should delete the address and should begin broadcasting DHCPDISCOVER messages. (To avoid this it requests its address from time to time.)

 

If you need (or DHCP doesn't work as intended), you can use manual network configuration.

I must and want use DHCP. I will have a look at this topic later on.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines