<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>4220</bug_id>
          
          <creation_ts>2013-04-08 08:55:53 +0000</creation_ts>
          <short_desc>[Routerstation] The system can not boot via NFS</short_desc>
          <delta_ts>2016-07-29 01:15:34 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>BSPs</product>
          <component>bsps-meta-yocto</component>
          <version>1.4</version>
          <rep_platform>Routerstationpro</rep_platform>
          <op_sys>mips</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>critical</bug_severity>
          <target_milestone>1.4 M6</target_milestone>
          <dependson>4339</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Yi Zhao">yi.zhao</reporter>
          <assigned_to name="Michel Thebeau">michel.thebeau</assigned_to>
          <cc>alexandru.damian</cc>
    
    <cc>ke.zou</cc>
    
    <cc>michel.thebeau</cc>
    
    <cc>ning.zhang</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sgw</cc>
    
    <cc>yi.zhao</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>31661</commentid>
    <comment_count>0</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2013-04-08 08:55:53 +0000</bug_when>
    <thetext>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&gt; load -v vlm-boards/19256/kernel
Using default protocol (TFTP)
Unrecognized image type: 0x0
RedBoot&gt; exec -c &quot;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&quot;
Can&apos;t execute Linux - invalid entry address
RedBoot&gt; 
######################

The Redboot setting:
#################
RedBoot&gt; 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 &quot;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&quot;

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&gt; 
#####################

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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31668</commentid>
    <comment_count>1</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2013-04-08 12:33:39 +0000</bug_when>
    <thetext>Mitch will have a look at this and update the asigned to field when he grabs it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31682</commentid>
    <comment_count>2</comment_count>
    <who name="Michel Thebeau">michel.thebeau</who>
    <bug_when>2013-04-08 14:10:51 +0000</bug_when>
    <thetext>Hi,

&gt; Using default protocol (TFTP)
&gt; Unrecognized image type: 0x0

Perhaps vmlinux.bin is legacy, but I haven&apos;t figured it out either.

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

M</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31728</commentid>
    <comment_count>3</comment_count>
    <who name="Michel Thebeau">michel.thebeau</who>
    <bug_when>2013-04-08 19:50:29 +0000</bug_when>
    <thetext>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 &quot;console=ttyS0,115200 root=/dev/sda1 rw rootdelay=2 board=UBNT-RSPRO&quot; 0x806a5430

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

M</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31732</commentid>
    <comment_count>4</comment_count>
    <who name="Michel Thebeau">michel.thebeau</who>
    <bug_when>2013-04-08 20:48:45 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; FYI, the vmlinux.bin does boot when you know how.
&gt; 
&gt; load -v -m tftp -h 128.224.149.6 -b 0x80060000 -r mthebeau/vmlinux.bin
&gt; 
&gt; exec -b 0x80060000 -c &quot;console=ttyS0,115200 root=/dev/sda1 rw rootdelay=2
&gt; board=UBNT-RSPRO&quot; 0x806a5430
&gt; 
&gt; That 0x806a5430 came from copying the load address from the elf.
&gt; 
&gt; M


...

deploy/images$ &quot;$CROSS_COMPILE&quot;readelf -s vmlinux | grep 806a5430
 30645: 806a5430   180 FUNC    GLOBAL DEFAULT    1 kernel_entry</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31754</commentid>
    <comment_count>5</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2013-04-09 09:21:27 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; FYI, the vmlinux.bin does boot when you know how.
&gt; 
&gt; load -v -m tftp -h 128.224.149.6 -b 0x80060000 -r mthebeau/vmlinux.bin
&gt; 
&gt; exec -b 0x80060000 -c &quot;console=ttyS0,115200 root=/dev/sda1 rw rootdelay=2
&gt; board=UBNT-RSPRO&quot; 0x806a5430
&gt; 
&gt; That 0x806a5430 came from copying the load address from the elf.
&gt; 
&gt; 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 ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31762</commentid>
    <comment_count>6</comment_count>
    <who name="Michel Thebeau">michel.thebeau</who>
    <bug_when>2013-04-09 13:05:22 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; (In reply to comment #3)
&gt; &gt; FYI, the vmlinux.bin does boot when you know how.
&gt; &gt; 
&gt; &gt; load -v -m tftp -h 128.224.149.6 -b 0x80060000 -r mthebeau/vmlinux.bin
&gt; &gt; 
&gt; &gt; exec -b 0x80060000 -c &quot;console=ttyS0,115200 root=/dev/sda1 rw rootdelay=2
&gt; &gt; board=UBNT-RSPRO&quot; 0x806a5430
&gt; &gt; 
&gt; &gt; That 0x806a5430 came from copying the load address from the elf.
&gt; &gt; 
&gt; &gt; M
&gt; 
&gt; Thanks. It could work now.
&gt; Is the entry address 0x806a5430 permanent and we can use it as the default
&gt; setting in redboot ? Or we need to read the address in a new kernel every
&gt; time ?


Hi, I&apos;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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31809</commentid>
    <comment_count>7</comment_count>
    <who name="Alexandru Damian">alexandru.damian</who>
    <bug_when>2013-04-10 11:20:15 +0000</bug_when>
    <thetext>Patch sent 8/04</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32268</commentid>
    <comment_count>8</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2013-04-17 08:46:14 +0000</bug_when>
    <thetext>Fixed in master after http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=95b71d2b03a3a6dc5d32a7d6a84ec3420f39aa61</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32383</commentid>
    <comment_count>9</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2013-04-19 09:45:26 +0000</bug_when>
    <thetext>Verified with dylan branch: 789b2b7e0cca404ff8ba8ed5ba823d215e6ba5b4</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>