- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Over the last two days, I've been trying to get the NIOS kernel to mount its root FS over NFS, without result. I assume I'm missing something obvious, but I am missing it.
The server (Debian/Sarge) has been used for over a year as server and serves a quite some NFS root FS's for PowerPC architectures, embedded. We never had any problem with this. The server runs a DHCP server that replies on the bootp packets. When looking at theKernel command line: CONSOLE=/dev/ttyS0 noinitrd ip=bootp root=/dev/nfs rw
PID hash table entries: 128 (order: 7, 2048 bytes)
Console: colour dummy device 80x25
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory available: 14500k/16384k RAM, 0k/0k ROM (1482k kernel code, 201k data)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
NET: Registered protocol family 16
NIOS serial driver version 0.0
ttyS0 (irq = 4) is a builtin NIOS UART
smc_probe: 50000 Khz Nios
SMSC LAN91C111 Driver (v2.1), (Linux Kernel 2.6)
eth0: SMC91C11xFD(rev:1) at 0x82110300 IRQ:6 MEMSIZE:8192b NOWAIT:0 ADDR: 00:07:ed:0a:02:cf
smc_probe: 50000 Khz Nios
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 1024 bind 2048)
NET: Registered protocol family 1
NET: Registered protocol family 17
eth0:PHY 100BaseT
eth0:PHY Full Duplex
Sending BOOTP requests . OK
IP-Config: Got BOOTP answer from 10.158.231.6, my address is 10.158.231.140
IP-Config: Complete:
device=eth0, addr=10.158.231.140, mask=255.255.255.0, gw=10.158.231.1,
host=10.158.231.140, domain=, nis-domain=(none),
bootserver=10.158.231.6, rootserver=10.158.231.6, rootpath=/users/firmware/marc/targets/nios2/evaluation
Looking up port of RPC 100003/2 on 10.158.231.6
Looking up port of RPC 100005/1 on 10.158.231.6
VFS: Mounted root (nfs filesystem).
Freeing unused kernel memory: 56k freed (0x1184000 - 0x1191000)
Kernel panic - not syncing: No init found. Try passing init= option to kernel.
For this kernel, I disabled devfs; and created the nodes manually (devfs is normally always used) but there is no difference in the result. I even tried to replace the '/sbin/init' with a statically linked hello_world program, but again, no difference. I see the bootp packets arriving and I see the replies; I even see that the root FS directory is mounted remotely in xtab: /home/firmware/marc/targets/nios2/evaluation 10.158.231.140(rw,async,wdelay,hide,nocrossmnt,secure,no_root_squash,no_all_squash,subtree_
check,secure_locks,mapping=identity,anonuid=-2,anongid=-2)
The kernel I am trying is the nios 1.3 kernel (2.6.9-uc0) on an Altera NIOS 2 Evaluation kit. Any suggestions?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK, this seems to be the problem, my busybox is (file):
ELF 32-bit LSB executable, version 1 (embedded), statically linked, stripped
while it should be BFLT executable - version 4 ram
I've tried several options from arm, but none seem to work (-Wl,-elf2flt), ... How do I convert my ELF binary to BFLT?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
elf2flt
It is installed by the distribution and you can use it on the cygwin machine. The source code of this utility is also installed, you can find it and build it on a linux machine.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tnx, I found it in the sources of 1.3 kit.
btw, are you aware that a diff shows the consistent removal of the GPL in the sources of this project (when compared to the CVS version of uclinux, removal of LICENSE file and the reference to the GPL in the README and other header files)? That's not nice http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/blink.gif- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you talking about elf2flt? Our port was based on the elf2flt files from Febuary 2004 and the files that were GPL then are still GPL (such as elf2flt.c). If you are refering to the modified files and license file added to the uClinux.org site five weeks ago those are not in our distribution. Our distribution will not change unless we need to pickup fixes for elf2flt. We never remove GPL licensing from files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
to marc :
I got the same error:IP-Config: Complete:
device=eth0, addr=218.192.171.39, mask=255.255.255.0, gw=218.192.171.254,
host=218.192.171.39, domain=, nis-domain=(none),
bootserver=218.192.171.46, rootserver=218.192.171.46, rootpath=
Looking up port of RPC 100003/2 on 218.192.171.46
Looking up port of RPC 100005/1 on 218.192.171.46
VFS: Mounted root (nfs filesystem).
Freeing unused kernel memory: 72k freed (0x1174000 - 0x1185000)
Warning: unable to open an initial console.
Kernel panic - not syncing: No init found. Try passing init= option to kernel.
From the log message, rootpath= is empty,but I got the log message in nfs server to indicate the client do login the nfs server. And my root command line was set: CONFIG_CMDLINE="root=/dev/nfs rw nfsroot=218.192.171.46:/f/target,rsize=1024,wsize=1024 ip=218.192.171.39:218.192.171.46:218.192.171.254:255.255.255.0"
To wentao: I has copied root fs from <target> to NFS share dir, changed /bin/*.exe to *. But got the same error. Is it the /dev error? I has not change anything in /dev (there are so many such file:@console,c,5,1,@hda,b,3,0...) What to do next? Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- originally posted by mountain8848@Aug 13 2005, 04:30 PM what to do next? thanks. --- Quote End --- From what I read in your post, you are using the windows kit as a development environment. Next to the fact that this is IMHO a very bad idea for developing embedded Linux, I know little of the underlying functionality of the graphical tools (cough). However, I doubt that a *.exe would ever end up in a Linux RootFS. IIRC, someone told me on this board that the *.exe extensions had something to do with a intermediate tool running. However, in my case: the problem was that I had the /sbin/init file in the wrong format. converting it to BFLT solved the problems. My board is currently running for over 1.5 months now via NFS. PS, please don't tell me you copied all the files from one FS to another with the wintendo drag and drop? PS2, don't ever open a configuration file with "Notepad"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks to marc.
I will try to develop systems under Linux host. And I'd like wonder how the root fs work properly under windows Nios IDE. What happen when building the root fs project. Then I can manully do it by myself, copy whole "target" to my NFS share dir. PS: I use x-win 5.7 to provide NFS in windows host.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I has changed:
@console,c,5,1 ==> console @ttyJ0,c,232,16 ==> ttyJ0 Then the <div class='quotetop'>QUOTE </div> --- Quote Start --- Warning: unable to open an initial console.[/b] --- Quote End --- is fixed. New log: <div class='quotetop'>QUOTE </div> --- Quote Start --- Looking up port of RPC 100003/2 on 218.192.171.46 Looking up port of RPC 100005/1 on 218.192.171.46 VFS: Mounted root (nfs filesystem). Freeing unused kernel memory: 72k freed (0x1174000 - 0x1185000) Kernel panic - not syncing: No init found. Try passing init= option to kernel.[/b] --- Quote End --- Remaining the last error. I am sure /bin/init is bFlat excutable file. What's next ? Thanks. PS: My debug environment: ----------- 1. Copy target dir to NFS share dir 2. WinXP + x-WinPro 5.3 to start NFS server 3. Nios 5.0- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page