- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
After a lot of hassle I have my SD card up and running. uClinux boots and mounts the filesystem from the SD card.
As seen below I've inserted some code into init/main.c to be able to fetch return values from kernel_execve() The return value is 8, which according to errno.h is /* Exec format error */. However I've checked so that the binary is in correct format (see below).
mmc0: host does not support reading read-only switch. assuming write-enable.
mmc0: new SDHC card on SPI
mmcblk0: mmc0:0000 SD04G 3.69 GiB
...
VFS: Mounted root (ext2 filesystem) on device 179:0.
...
kernel_execve(/bin/init) returned 8
Failed to execute /bin/init. Attempting defaults...
...
Kernel panic - not syncing: No init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
I have checked that: - /bin/init exists
- /bin/init is in correct binary format (bFLT)
nios2-linux-flthdr /mnt/bin/init
/mnt/bin/init
Magic: bFLT
Rev: 4
Build Date: Tue Feb 5 13:33:00 2013
Entry: 0x50
Data Start: 0x7fa0
Data End: 0x8f00
BSS End: 0x1c6e0
Stack Size: 0x1000
Reloc Start: 0x8f00
Reloc Count: 0x311
Flags: 0x9 ( Load-to-Ram Gzip-Data-Compressed )
What is going on here? I've tried to compile a simple "Hello World" and replacing init= with that binary, and I get the same results (errno 8). Shouldn't the binaries be in bFLT format? I have tried with ELF as well, but same result. Thanks in advance.
Link Copied
0 Replies
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page