I am working on a project where I will need to use the LI-5M03 imaging board and the ipipe. Since the RidgeRun SDK supports neither of these, it looks like I have to use the 2.6.10 version of the kernel provided with the IPNC demo. I have successfully compiled the demo and can run it on the Leopardboard, but when it boots it automatically runs the demo application, and I am not sure how to modify the kernel so that I can run my own application.
With the stock set up, when the board boots it uses the ramdisk file system and thus your changes disappeared when you reboot. You either need to rebuild the ramdisk with your changes or you need to have your own root filesystem from a SD card
Thank you for the reply.
I've tried using a couple different file systems, from the ramdisk that is supposed to be used by the demo, to an external SD (formatted by the RidgeRun SDK). The result is always the same. When I use the uImage built by the IPNC demo it always boots straight into an application rather than a command prompt like the RidgeRun kernel does.
I apologize for being a bit clueless on this. I'm still trying to learn.
I have been looking into this more and experimenting, and I think I now understand what you were saying better. I am still having trouble getting the 2.6.10 kernel to use the SD card as the root file system. With the 2.6.29 kernel from RidgeRun this can be changed by setting the 'bootargs' environmental variable, but for the 2.6.10 kernel it always seems to try to boot from that ramdisk no matter what I do, and if I clear the ramdisk from nand then it just doesn't boot at all and returns me back to the u-boot command prompt.
Again any help in getting this going would be greatly appreciated. What I would really like to do is get the ipipe_aew_demo running.
Could you post your u-boot settings for both 2.6.10 & 2.6.29 boot, especially bootcmd & bootargs?
Alright, it seems I was wrong about the 2.6.10 kernel not using the correct file system... it is actually not successfully booting. I rebuilt the kernel after resetting the config options and it now gets much further in booting, but ends with an error (see below for the end of the boot output). I am trying to use and SD card formatted by the RidgeRun SDK as the file-system (can I do this for the 2.6.10 kernel?). It looks like it is successfully communicating with the SD card though.
My environment variables are as follows:
bootargs=mem=80M console=ttyS0,115200n8 root=/dev/mmcblk0p1 init=/linuxrc ip=dhcp
bootcmd=nboot 0x80700000 0 0x400000;bootm
The end of the 2.6.10 kernel output during boot:
MMC cmd.resp = aa orc=300000
MMC: selected 50.000MHz transfer rate
mmcblk0: mmc0:b368 LEXAR 3921920KiB
mmcblk0: p1 p2
eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
Sending DHCP requests ., OK
IP-Config: Got DHCP answer from 192.168.1.1, my address is 192.168.1.101
device=eth0, addr=192.168.1.101, mask=255.255.255.0, gw=192.168.1.1,
host=192.168.1.101, domain=, nis-domain=(none),
bootserver=192.168.1.1, rootserver=192.168.1.1, rootpath=
kjournald starting. Commit interval 5 seconds
EXT3-fs warning: checktime reached, running e2fsck is recommended
EXT3 FS on mmcblk0p1, internal journal
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem).
Freeing init memory: 152K
Kernel panic - not syncing: No init found. Try passing init= option to kernel.
please check if you have /linuxrc file in your SD card file system. The bootargs has "init=/linuxrc", the kernel will look for this file to load after it mounts the file system. You could get rid of "init=/linuxrc", then it will use the default init file, which I think is /init.
Also, since you don't use ram disk, you probably want to add "noinitrd" to bootargs.
Thank you for the suggestions. Unfortunately, I still haven't been able to get it to work. I changed my bootargs as you suggested but I still had the same error. I added some extra print statements into the /init/main.c file to try and see what was going wrong. What I found was that execve is returning with an error for all of the default boot options, as well as any that I am trying to give it through the 'init=' environmental variable. Although execve doesn't set errno when it fails, it does return different values. When pointing to a file that does exist on the SD card (such as /bin/busybox or /bin/sh) it returns 0xfffffff9 (which is -7), and when pointing to a file that does not exist it returns 0xfffffffe (-2). I haven't yet been able to figure out what those error codes mean, but it does at least seem like the kernel is properly reading the SD card.
I also tried using the ramdisk supplied with the example as the root filesystem with the same results. It seems to successfully mount the root directory, but it can't run init to bring up a console. In case it helps here are the results when using the ramdisk:
bootargs='mem=80M console=ttyS0,115200n8 root=/dev/ram0 rw initrd=0x82000000,8M ip=dhcp'
The last couple lines of the output from booting the kernel :
RAMDISK: Compressed image found at block 0
EXT2-fs warning: checktime reached, running e2fsck is recommended
VFS: Mounted root (ext2 filesystem).
Freeing init memory: 148K
<7>eth0: no IPv6 routers present
Then it is time to check you SD card. If you use a card reader on a Linux machine, can you see the files on the SD card?
Yea I can see the files on it, and everything looks good. I can use the SD card fine when booting the RidgeRun 2.6.29 kernel, and I haven't made any changes to it between then and trying to boot the 2.6.10 kernel. Also, since it has the same error when using the ramdisk as the filesystem then the problem must be with something else. Any ideas?
OK, that is why. The filesys of these two versions are not compatible.
My suggestion is to get a file system from LSP1.2 ( Linux kernel 2.6.10) if you could. (TI's website is down at this moment, I couldn't check if it is still available or not).
Or get the ramdisk.gz from support page, mount it and copy to SD card.
Thanks for the suggestion, but I tried that and still no luck.
Any idea why execve() would be returning with an error? That seems to be the problem, and it happens regardless of which filesystem I am using (ramdisk or SD card). The error it returns with is -7. Any ideas on why this could happen, or what this error code means?
I fixed it! The issue was with a patch I had incorrectly applied to the get_user macro in uaccess.h and it works now. Thanks for all your help.
Hey,How did you make it work? I.e. what files have you used from that page? http://designsomething.org/Leopardboard/p/support.aspxIs the "Linux Kernel & IPNC demo program" enough? Or do you need a compiler?Thanks,Mike
If all you want to do is get the demo program running, all you should need are the files on that support page. The linux kernel is pre-built as the uImage file, and the ramdisk.gz contains the file system with the busybox shell, and the ipnc demo code itself. Depending on whether or not U-Boot is flashed on your Leopardboard you may need to download that, as well as the flashing software too. If you want to make modifications to the linux kernel, or write your own application, you will have to get a compiler. I suggest trying to boot the ipnc demo program using the instructions in that readme.txt file on the support page. If you run into any specific problems post them and I'll try to help.