Bug 4220 - [Routerstation] The system can not boot via NFS
Summary: [Routerstation] The system can not boot via NFS
Status: VERIFIED FIXED
Alias: None
Product: BSPs
Classification: Build System, Metadata & Runtime
Component: bsps-meta-yocto (show other bugs)
Version: 1.4
Hardware: Routerstationpro mips
: Medium+ critical
Target Milestone: 1.4 M6
Assignee: Michel Thebeau
QA Contact:
URL:
Whiteboard:
Depends on: 4339
Blocks:
  Show dependency tree
 
Reported: 2013-04-08 08:55 UTC by Yi Zhao
Modified: 2016-07-29 01:15 UTC (History)
7 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yi Zhao 2013-04-08 08:55:53 UTC
Image location: http://autobuilder.yoctoproject.org/pub/nightly/20130403-2/
Git rev: fe336b149552b1f4f24d979c40302653298b98cc

The system can not boot up via NFS. Here is the message:
###################
RedBoot(tm) bootstrap and debug environment [ROMRAM]
Ubiquiti Networks certified release, version 0.9.00318M.0905121200 - built 12:01:38, May 12 2009

Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.

Board: Ubiquiti RouterStation PRO
 Arch: ar7100pro
  RAM: 0x80000000-0x88000000, [0x8003bf00-0x87fe1000] available
Flash: 0xbf000000-0xc0000000, in 256 blocks of 0x00010000 bytes each
== Executing boot script in 10.000 seconds - enter ^C to abort
RedBoot> load -v vlm-boards/19256/kernel
Using default protocol (TFTP)
Unrecognized image type: 0x0
RedBoot> exec -c "console=ttyS0,115200 root=/dev/nfs rw nfsroot=128.224.165.20:/export/pxeboot/vlm-boards/19256/rootfs ip=128.224.165.207:128.224.165.20:128.224.165.1:255.255.255.0::eth0:off board=UBNT-RSPRO"
Can't execute Linux - invalid entry address
RedBoot> 
######################

The Redboot setting:
#################
RedBoot> fconfig -l
Network hardware address [MAC]: 0x00:0x00:0x00:0x33:0x46:0x63
Run script at boot: true
Boot script: 
.. load -v vlm-boards/19256/kernel
.. exec -c "console=ttyS0,115200 root=/dev/nfs rw nfsroot=128.224.165.20:/export/pxeboot/vlm-boards/19256/rootfs ip=128.224.165.207:128.224.165.20:128.224.165.1:255.255.255.0::eth0:off board=UBNT-RSPRO"

Boot script timeout (1000ms resolution): 10
Use BOOTP for network configuration: false
Gateway IP address: 128.224.165.1
Local IP address: 128.224.165.207
Local IP address mask: 255.255.255.0
Default server IP address: 128.224.165.20
Console baud rate: 115200
GDB connection port: 9000
Force console for special debug messages: false
Network debug at boot time: false
RedBoot> 
#####################

The previous kernel from 20130327-1 can boot. I noticed that the size of current vmlinux.bin is 8MB. But the size of previous kernel is about 86MB. This issue may relate with bug 3515.
Comment 1 Bruce Ashfield 2013-04-08 12:33:39 UTC
Mitch will have a look at this and update the asigned to field when he grabs it.
Comment 2 Michel Thebeau 2013-04-08 14:10:51 UTC
Hi,

> Using default protocol (TFTP)
> Unrecognized image type: 0x0

Perhaps vmlinux.bin is legacy, but I haven't figured it out either.

So yes, I have some patches ready for comment (bug 3515) which I'll send out soon.  It'll make this go away too.

M
Comment 3 Michel Thebeau 2013-04-08 19:50:29 UTC
FYI, the vmlinux.bin does boot when you know how.

load -v -m tftp -h 128.224.149.6 -b 0x80060000 -r mthebeau/vmlinux.bin

exec -b 0x80060000 -c "console=ttyS0,115200 root=/dev/sda1 rw rootdelay=2 board=UBNT-RSPRO" 0x806a5430

That 0x806a5430 came from copying the load address from the elf.

M
Comment 4 Michel Thebeau 2013-04-08 20:48:45 UTC
(In reply to comment #3)
> FYI, the vmlinux.bin does boot when you know how.
> 
> load -v -m tftp -h 128.224.149.6 -b 0x80060000 -r mthebeau/vmlinux.bin
> 
> exec -b 0x80060000 -c "console=ttyS0,115200 root=/dev/sda1 rw rootdelay=2
> board=UBNT-RSPRO" 0x806a5430
> 
> That 0x806a5430 came from copying the load address from the elf.
> 
> M


...

deploy/images$ "$CROSS_COMPILE"readelf -s vmlinux | grep 806a5430
 30645: 806a5430   180 FUNC    GLOBAL DEFAULT    1 kernel_entry
Comment 5 Yi Zhao 2013-04-09 09:21:27 UTC
(In reply to comment #3)
> FYI, the vmlinux.bin does boot when you know how.
> 
> load -v -m tftp -h 128.224.149.6 -b 0x80060000 -r mthebeau/vmlinux.bin
> 
> exec -b 0x80060000 -c "console=ttyS0,115200 root=/dev/sda1 rw rootdelay=2
> board=UBNT-RSPRO" 0x806a5430
> 
> That 0x806a5430 came from copying the load address from the elf.
> 
> M

Thanks. It could work now.
Is the entry address 0x806a5430 permanent and we can use it as the default setting in redboot ? Or we need to read the address in a new kernel every time ?
Comment 6 Michel Thebeau 2013-04-09 13:05:22 UTC
(In reply to comment #5)
> (In reply to comment #3)
> > FYI, the vmlinux.bin does boot when you know how.
> > 
> > load -v -m tftp -h 128.224.149.6 -b 0x80060000 -r mthebeau/vmlinux.bin
> > 
> > exec -b 0x80060000 -c "console=ttyS0,115200 root=/dev/sda1 rw rootdelay=2
> > board=UBNT-RSPRO" 0x806a5430
> > 
> > That 0x806a5430 came from copying the load address from the elf.
> > 
> > M
> 
> Thanks. It could work now.
> Is the entry address 0x806a5430 permanent and we can use it as the default
> setting in redboot ? Or we need to read the address in a new kernel every
> time ?


Hi, I'm not sure that using the binary format vmlinux.bin is workable, for that reason you mention above.  I am open to direction.

I know that the entry address is readable from the elf image (kernel_entry).  The address would probably change.  Comment in the code suggests that vmlinux.bin is legacy. arch/mips/kernel/head.S:

134:#ifdef CONFIG_BOOT_RAW
135-    /*
136-     * Give us a fighting chance of running if execution beings at the
137-     * kernel load address.  This is needed because this platform does
138-     * not have a ELF loader yet.
139-     */

It is a stretch ;) but I think that is a comment for history.

I have a set of patches that will replace vmlinux.bin with the elf image stripped of .debug and .comment (making the elf image ~9mb).  I sent a RFC to Richard/OE-core and will resend them to oe-core and poky hopefully Wednesday morning.

M
Comment 7 Alexandru Damian 2013-04-10 11:20:15 UTC
Patch sent 8/04
Comment 9 Yi Zhao 2013-04-19 09:45:26 UTC
Verified with dylan branch: 789b2b7e0cca404ff8ba8ed5ba823d215e6ba5b4