Hi All, I have a 128Mb board and I'm unable to boot the kernel even though the kernel image loads up. And hence the second stage never executes that is the loading of the root file system. I'm using uboot 1.3.2 from (git://repo.or.cz/u-boot-openmoko/mini2440.git) and modified the code to disable USB IRQ. I have flashed u-boot.bin into the nand and NOT u-boot-nand16k.bin OR u-boot-nand2k.bin . I'm using Openembedded Ångström from (git://repo.or.cz/openembedded/mini2440.git) to build the kernel and the root file system. To burn the kernel i used the following u-boot commands =========== nfs 0x32000000 192.168.1.5:/home/arm/mini2440/root_fs/uImage-mini2440.bin nand erase kernel nand write.e 0x32000000 kernel =========== For rootfs I'm using a opie image for root filesystm and to burn it to the flash i used the following u-boot commands =========== nfs 0x32000000 192.168.1.5:/home/arm/mini2440/root_fs/mini2440.rootfs.jffs2 nand write.jffs2 0x31000000 rootfs ${filesize} setenv bootcmd nboot.e kernel \; bootm saveenv =========== To help arrive at a quick solution listed below are output of some of the u-boot commands to help debug it regards --fatbrain nand info ========== Device 0: NAND 128MiB 3,3V 8-bit, page size 2048, sector size 128 KiB STARTUP ======= U-Boot 1.3.2-mini2440 (Feb 8 2010 - 10:59:13) I2C: ready DRAM: 64 MB Flash: 2 MB NAND: 128 MiB Found Environment offset in OOB.. USB: S3C2410 USB Deviced In: serial Out: serial Err: serial MAC: 08:08:11:18:12:27 Hit any key to stop autoboot: 0 Loading from NAND 128MiB 3,3V 8-bit, offset 0x60000 Image Name: Angstrom/2.6.32+git/mini2440 Created: 2010-02-05 7:22:26 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 2069172 Bytes = 2 MB Load Address: 30008000 Entry Point: 30008000 ## Booting kernel from Legacy Image at 32000000 ... Image Name: Angstrom/2.6.32+git/mini2440 Created: 2010-02-05 7:22:26 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 2069172 Bytes = 2 MB Load Address: 30008000 Entry Point: 30008000 Verifying Checksum ... OK Loading Kernel Image ... OK OK mtdparts ========= device nand0 <mini2440-nand>, # parts = 4 #: name size offset mask_flags 0: u-boot 0x00040000 0x00000000 0 1: u-boot_env 0x00020000 0x00040000 0 2: kernel 0x00500000 0x00060000 0 3: rootfs 0x07aa0000 0x00560000 0 active partition: nand0,0 - (u-boot) 0x00040000 @ 0x00000000 defaults: mtdids : nand0=mini2440-nand mtdparts: <NULL> printenv ========= bootdelay=3 baudrate=115200 ethaddr=08:08:11:18:12:27 usbtty=cdc_acm mini2440=mini2440=0tb bootargs_base=console=ttySAC0,115200 noinitrd bootargs_init=init=/sbin/init root_nand=root=/dev/mtdblock3 rootfstype=jffs2 root_mmc=root=/dev/mmcblk0p2 rootdelay=2 root_nfs=/mnt/nfs set_root_nfs=setenv root_nfs root=/dev/nfs rw nfsroot=${serverip}:${root_nfs} ifconfig_static=run setenv ifconfig ip=${ipaddr}:${serverip}::${netmask}:mini2440:eth0 ifconfig_dhcp=run setenv ifconfig ip=dhcp ifconfig=ip=dhcp set_bootargs_mmc=setenv bootargs ${bootargs_base} ${bootargs_init} ${mini2440} ${root_mmc} set_bootargs_nand=setenv bootargs ${bootargs_base} ${bootargs_init} ${mini2440} ${root_nand} set_bootargs_nfs=run set_root_nfs; setenv bootargs ${bootargs_base} ${bootargs_init} ${mini2440} ${root_nfs} ${ifconfig} mtdids=nand0=mini2440-nand mtdparts=mtdparts=mini2440-nand:0x00040000(u-boot),0x00020000(u-boot_env),0x0050 0000(kernel),0x07aa0000(rootfs) /dev/mtdblock3=rootfstype=jffs2 console=ttySAC0,115200 mini2440=3tb root=/dev/mtdblock3 rootfstype jffs2 console ttySAC0,115200 mini2440 3tb autoload=no dnsip=192.168.1.1 autostart=no bootargs=rootfstype=jffs2 console=ttySAC0,115200 mini2440=3tb filesize=25A0000 fileaddr=31000000 gatewayip=192.168.1.1 netmask=255.255.255.0 ipaddr=192.168.1.7 serverip=192.168.1.5 bootcmd=nboot.e kernel ; bootm partition=nand0,0 mtddevnum=0 mtddevname=u-boot Environment size: 1385/131068 bytes
kernel 2.6.32 boot issues
The reason I ask is that I have had quite a bit of grief getting my own rootfs going and I have been using 32rc8 all though this process. I am sure it is mostly likely something I am doing wrong, but I have decided to go back to hopefully a kernel that has some track-record. 2.6.29.4 (factory distro for the 64M YAFFS) seems to be pretty good and the one from Kernel Concepts (says 2.6.29.24 and JFFS2), in their download package, seems to play ball. Went to kernel.org and got the latest stable release 2.6.32.7 and it wouldn't compile . . . not my week! Good luck!
I could get the 2.6.32.7 to compile. I downloaded from git://repo.or.cz/linux-2.6/mini2440.git and was able to compile. To get the kernel version, this is what I did from 1) Booted in NOR mode bootloader is now supervivi 2) Loaded the zImage to RAM ( z option ) 3) Boot linux from RAM ( g option ) the file was captured and the kernel version is 2.6.32.7 Find attached the captured file. So technically from supervivi the kernel boots up but not from u-boot. The mystery gets deeper... To me it looks like a config issue some where in u-boot some parameter need s to be set. I will try out the 2.6.29 branch so see if it boots. 2.6.32 is available from arm9.net. I'm using nfs to transfer the files from my development station. regards fatbrain
Glad to see you got 2.6.32.7 to compile see my other thread. Have you tried the download package from Kernel Concepts. Follow Forrest Bao's tutorial at: http://narnia.cs.ttu.edu/drupal/node/131 It uses u-boot.bin before recent changes. Might give you a base to start from. I am confused: 2) Loaded the zImage to RAM ( z option ) As far as I am aware u-boot can only load uImages. You are building different images between using u-boot and Supervivi?
Yes the u-boot does only uImages. To isolate the problem I'm trying to eliminate the variables ( u-boot,kernel,rootfs) so I took the the zImage booted into supervivi and loaded zImage to RAM and then booted from RAM to see if the kernel boots, and viola I found it the kernel does boot so the culprit is u-boot or some other config issue. The search continues regards --fatbrain
Hello, the 2.6.32 can't find the root partition because NAND is formated using non-standard way (at least in older devices). If you are using supervivi as a bootloader, you will have to change ./arch/arm/mach-s3c2440/mach-mini2440.c, I am attaching my version of this file look for line mtd_partition friendly_arm_default_nand_part to see the changes You can try my compiled zImage: http://s3c2440camera.googlecode.com/files/linux-2.6.32.2-FriendlyARM-zImage and modules http://s3c2440camera.googlecode.com/files/linux-2.6.32.2-FriendlyARM.tar.gz P.S. to build uImage just run make uImage ARCH=.... etc
Thanks for posting the change that is required. I assume that you have to tick YAFFS in the kernel Pseudo filesystems, which you won't find doing a mini2440_defconfig (because that doesn't show the YAFFS options.) Are you doing a menuconfig on a "default" .config before it has been changed to mini2440_defconfig? Thanks, Dave
YAFFS driver is not present in stock Linux kernel - you can download and integrate it onto the kernel from http://www.yaffs.net/ ( there is patch-ker.sh script in the sources). But it is already integrated into 2.6.32.2 kernel for mini2440 from arm9.net or from this site.
Vladimir, Thanks for that explanation. It was only recently that someone suggested that 2.6.29.4 that came on the DVD was modified to support YAFFS. You have made the process clearer to me. I was referring to 2.6.32.7 (buserror's site) in my previous post, I should have made that clear. Cheers, Dave