barebox Kernel panic - not syncing

Jaydeep Gajjar
Hello everyone !

I am trying to port linux 3.2.9 to mini2440 with pengutronix BSP.
i have successfully compiled the kernel, root-file system and also loaded
the kernel image and root-fs image to mini2440.

but after booting this gives me following error:

uncorrectable error : 
uncorrectable error : 
uncorrectable error : 
uncorrectable error : 
uncorrectable error : 
uncorrectable error : 
uncorrectable error : 
mtd->read(0x1faa4 bytes from 0x8055c) returned ECC error
uncorrectable error : 
mtd->read(0x8c68 bytes from 0x97398) returned ECC error
VFS: Mounted root (jffs2 filesystem) on device 31:3.
Freeing init memory: 124K
Kernel panic - not syncing: No init found.  Try passing init= option to
kernel. See Linux Documentation/init.txt for guidance.
Backtrace: 
[<c0012a94>] (dump_backtrace+0x0/0xfc) from [<c03039a0>]
(dump_stack+0x18/0x1c)
 r7:00000013 r6:c0024228 r5:c03f1378 r4:c043fd28
[<c0303988>] (dump_stack+0x0/0x1c) from [<c0303a04>] (panic+0x60/0x194)
[<c03039a4>] (panic+0x0/0x194) from [<c00086f0>] (init_post+0xa8/0xcc)
 r3:00000044 r2:c04f20a8 r1:c04f20a8 r0:c0393399
[<c0008648>] (init_post+0x0/0xcc) from [<c03f1420>] (kernel_init+0xa8/0xcc)
 r5:c03f1378 r4:c043f900
[<c03f1378>] (kernel_init+0x0/0xcc) from [<c0024228>] (do_exit+0x0/0x29c)


i have tried to get init with '/sbin/init' or '/linuxrc' in bootargs.but
failed. i have also changed the loading init with upstart but failed.

any suggestions ?
Thanks in advance.

Juergen Beisert
There is something really broken with your NAND configuration. Did you
wrote this JFFS2 rootfile image with the help of Barebox into the NAND?
What kind of flash device is on your MIni2440? Did you use the correct
PTXdist project NAND layout configuration, with regard to your NAND device
(64 MiB NAND versus all other known sizes)?
Can show us the full text log beginning with the starting Barebox?

Jaydeep Gajjar
Hello Juergen.

yes, i had wrote JFFS2 rootfile to NAND with barebox.
my mini2440 has 1GB flash. so ,i selected the 128M configuration.
i have checked the barebox configuration in platformconfig. that is also
barbox-NAND-128M.config

i have checked that my sysroot-target has '/sbin/init' and '/linuxrc' which
is link to '/bin/busybox'. so what is problem ?

Juergen Beisert
-> Can show us the full text log beginning with the starting Barebox?

Jaydeep Gajjar
This is log when i start mini2440.

booting kernel of type uimage from /dev/nand0.kernel.bb
   Verifying Checksum ... OK
   Image Name:   Linux-3.2.9-SLTL
   Created:      2012-03-12   6:58:12 UTC
   Image Type:   <NULL> <NULL> <NULL> (<NULL>)
   Data Size:    2158768 Bytes =  2.1 MB
   Load Address: 30008000
   Entry Point:  30008000
OK
commandline: console=ttySAC0,115200 mini2440=0tbc
ip=192.168.1.230:192.168.1.7:192.168.1.2:255.255.255.0:::
root=/dev/mtdblock3 rootfstype=jffs2 noinitrd mtd)
arch_number: 1999

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Linux version 3.2.9-SLTL (jaydeep@ubuntu) (gcc version 4.3.2 (Sourcery G++
Lite 2008q3-72) ) #1 Mon Mar 12 12:28:08 IST 2012
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: MINI2440
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C24XX Clocks, Copyright 2004 Simtec Electronics
S3C244X: core 405.000 MHz, memory 101.250 MHz, peripheral 50.625 MHz
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: console=ttySAC0,115200 mini2440=0tbc
ip=192.168.1.230:192.168.1.7:192.168.1.2:255.255.255.0:::
root=/dev/mtdblock3 rootfstype=jffs2 noin)
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 60444k/60444k available, 5092k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xc4800000 - 0xf6000000   ( 792 MB)
    lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .text : 0xc0008000 - 0xc03e3000   (3948 kB)
      .init : 0xc03e3000 - 0xc0403000   ( 128 kB)
      .data : 0xc0404000 - 0xc0433360   ( 189 kB)
       .bss : 0xc0433384 - 0xc0462f3c   ( 191 kB)
SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:85
irq: clearing pending ext status 00000080
irq: clearing subpending status 00000003
irq: clearing subpending status 00000002
Console: colour dummy device 80x30
Calibrating delay loop... 201.52 BogoMIPS (lpj=503808)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
MINI2440: Option string mini2440=0tbc
MINI2440: 't' ignored, touchscreen not compiled in
MINI2440: LCD [0:240x320] 1:800x480 2:1024x768
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C244X: Clock Support, DVS off
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
s3c-i2c s3c2440-i2c: slave address 0x10
s3c-i2c s3c2440-i2c: bus frequency set to 98 KHz
s3c-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
Advanced Linux Sound Architecture Driver Version 1.0.24.
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
NetWinder Floating Point Emulator V0.97 (double precision)
audit: initializing netlink socket (disabled)
type=2000 audit(0.110:1): initialized
JFFS2 version 2.2. (NAND) &#65533;© 2001-2006 Red Hat, Inc.
msgmni has been set to 118
alg: No test for stdrng (krng)
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
io scheduler noop registered (default)
Console: switching to colour frame buffer device 30x20
fb0: s3c2410fb frame buffer device
s3c2440-uart.0: ttySAC0 at MMIO 0x50000000 (irq = 70) is a S3C2440
console [ttySAC0] enabled
s3c2440-uart.1: ttySAC1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: ttySAC2 at MMIO 0x50008000 (irq = 76) is a S3C2440
loop: module loaded
at24 0-0050: 1024 byte 24c08 EEPROM, writable, 16 bytes/write
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c24xx-nand s3c2440-nand: Tacls=1, 9ns Twrph0=3 29ns, Twrph1=2 19ns
s3c24xx-nand s3c2440-nand: NAND soft ECC
NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB 3,3V
8-bit)
Creating 4 MTD partitions on "nand":
0x000000000000-0x000000040000 : "u-boot"
0x000000040000-0x000000060000 : "u-boot-env"
0x000000060000-0x000000560000 : "kernel"
0x000000560000-0x000040000000 : "root"
dm9000 Ethernet Driver, V1.31
eth0: dm9000e at c486a300,c486c304 IRQ 51 MAC: aa:bb:cc:dd:ee:ff (chip)
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: S3C24XX OHCI
usb usb1: Manufacturer: Linux 3.2.9-SLTL ohci_hcd
usb usb1: SerialNumber: s3c24xx
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver ums-alauda
usbcore: registered new interface driver ums-cypress
usbcore: registered new interface driver ums-datafab
usbcore: registered new interface driver ums-freecom
usbcore: registered new interface driver ums-isd200
usbcore: registered new interface driver ums-jumpshot
usbcore: registered new interface driver ums-karma
usbcore: registered new interface driver ums-onetouch
usbcore: registered new interface driver ums-sddr09
usbcore: registered new interface driver ums-sddr55
usbcore: registered new interface driver ums-usbat
mousedev: PS/2 mouse device common for all mice
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
s3c-rtc s3c2410-rtc: rtc disabled, re-enabling
s3c-rtc s3c2410-rtc: rtc core: registered s3c as rtc0
i2c /dev entries driver
Linux video capture interface: v2.00
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq disabled
s3c-sdi s3c2440-sdi: powered down.
s3c-sdi s3c2440-sdi: mmc0 - using pio, sw SDIO IRQ
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
ALSA device list:
  No soundcards found.
TCP cubic registered
NET: Registered protocol family 17
s3c-rtc s3c2410-rtc: setting system clock to 2124-05-16 08:04:11 UTC
(576552955)
dm9000 dm9000: eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
IP-Config: Complete:
     device=eth0, addr=192.168.1.230, mask=255.255.255.0, gw=192.168.1.2,
     host=192.168.1.230, domain=, nis-domain=(none),
     bootserver=192.168.1.7, rootserver=192.168.1.7, rootpath=
Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
empty_blocks 8147, bad_blocks 0, c->nr_blocks 8149
VFS: Cannot open root device "mtdblock3" or unknown-block(31,3)
Please append a correct "root=" boot option; here are the available
partitions:
1f00             256 mtdblock0  (driver?)
1f01             128 mtdblock1  (driver?)
1f02            5120 mtdblock2  (driver?)
1f03         1043072 mtdblock3  (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on
unknown-block(31,3)
Backtrace: 
[<c0013208>] (dump_backtrace+0x0/0x10c) from [<c0304ee8>]
(dump_stack+0x18/0x1c)
 r7:00000013 r6:00008000 r5:c3811000 r4:c3823f38
[<c0304ed0>] (dump_stack+0x0/0x1c) from [<c0304f4c>] (panic+0x60/0x1ac)
[<c0304eec>] (panic+0x0/0x1ac) from [<c03e3ce0>]
(mount_block_root+0x178/0x234)
 r3:00000000 r2:c3848574 r1:c3823f38 r0:c03848bc
[<c03e3b68>] (mount_block_root+0x0/0x234) from [<c03e3e24>]
(mount_root+0x88/0x108)
[<c03e3d9c>] (mount_root+0x0/0x108) from [<c03e3fa0>]
(prepare_namespace+0xfc/0x194)
 r7:00000013 r6:c0433400 r5:c03fbfec r4:c03fbff8
[<c03e3ea4>] (prepare_namespace+0x0/0x194) from [<c03e32f4>]
(kernel_init+0xf0/0x130)
 r6:c0402000 r5:c0401c94 r4:c0402000
[<c03e3204>] (kernel_init+0x0/0x130) from [<c0024c98>] (do_exit+0x0/0x2a0)
 r7:00000013 r6:c0024c98 r5:c03e3204 r4:00000000

Juergen Beisert
Did you modify the Barebox's '/env/config' or '/env/bin/boot'?
I miss the
'mtdparts=nand:512k(barebox),384k(bareboxenv),2048k(kernel),-(root)' kernel
command line parameter. Without this parameter, Barebox and the kernel are
using different partition sizes and locations. That is why your kernel
fails to mount the root filesystem.

Jaydeep Gajjar
Thanks for reply.

i am currently checking it.
but i am facing a new problem when i upload kernel to board.

tftp communication is ok.
but, when i issue 'boot nand' command it shows following,

booting kernel of type uimage from /dev/nand0.kernel.bb
   Verifying Checksum ... Bad Data CRC

there is no error in uploading.so where is problem?

Thanks.

Juergen Beisert
Seems your whole NAND partitioning is completely messed up. First check, if
your /env/config defines a NAND partition layout:

mini2440:/ cat /env/config
[...]
# NAND boot settings
# Device name used by the kernel
nand_device="nand"
# partition definition in the NAND
nand_parts="512k(barebox),384k(bareboxenv),2048k(kernel),-(root)"
# rootfs's partition number in the NAND
rootfs_mtdblock_nand=3
# used when manually booting with "boot nand" command
rootfs_mtdblock_type=jffs2nv/config' still defines the 
[...]

This 'nand_parts' partition definition setting must be used by Barebox and
the kernel.

freqclock
Hello Juergen,

I am trying to bootup mini2440 with Pengutronix BSP, All images compiled
well, barebox loaded perfect, but when I am trying to run kernel it gives
'uncorrectable error :' error.

Here is my command line : commandline: console=ttySAC0,115200 mini2440=0tbc
ip=none root=/dev/mtdblock3 rootfstype=jffs2 noinitrd
mtdparts=nand:512k(barebox),384k(bareboxenv),2048k(k)

I read this thread about the same problem facing by Jaydeep, but there is
no solution describe over here.

could you please tell where should I look for the error, how can i solve
this error?

Thanks & Regards,
Freqclock.

freqclock
Hello Juerge,

Do i need to make changes in mach-mini2440.c? because there is a definition
and declaration for the nand initialization.

Juergen Beisert
Did you really read the thread? I wrote at "2012-03-12 09:22:50" the kernel
command line must contain:

'mtdparts=nand:512k(barebox),384k(bareboxenv),2048k(kernel),-(root)'

And you report your kernel command line contains:

'mtdparts=nand:512k(barebox),384k(bareboxenv),2048k(k)'.

Do you now see the difference?

freqclock
Juergen,

Please check the command line, it is as per the expected.

commandline: console=ttySAC0,115200  ip=none root=/dev/mtdblock3
rootfstype=jffs2 noinitrd
mtdparts=nand:512k(barebox),384k(bareboxenv),2048k(kernel),-(root), in
previous case it was there but not printing on the console. 

I am still facing the same problem of 'uncorrectable error : '. Please help
me out there.

Look forward to hear from you soon.

Regards,
freqclock

freqclock
some kernel logs for more information.

--
JFFS2 version 2.2. (NAND) (SUMMARY)  &#65533;&#2665; 2001-2006 Red Hat,
Inc.
msgmni has been set to 119
io scheduler noop registered
io scheduler deadline registered (default)
Console: switching to colour frame buffer device 30x20
fb0: s3c2410fb frame buffer device
s3c2440-uart.0: ttySAC0 at MMIO 0x50000000 (irq = 70) is a S3C2440
console [ttySAC0] enabled
s3c2440-uart.1: ttySAC1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: ttySAC2 at MMIO 0x50008000 (irq = 76) is a S3C2440
loop: module loaded
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c24xx-nand s3c2440-nand: Tacls=1, 9ns Twrph0=3 29ns, Twrph1=2 19ns
s3c24xx-nand s3c2440-nand: NAND soft ECC
s3c24xx-nand s3c2440-nand: Using flash based BBT
NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB 3,3V
8-bit)
Creating 4 MTD partitions on "nand":
0x000000000000-0x000000040000 : "u-boot"
0x000000040000-0x000000060000 : "u-boot-env"
0x000000060000-0x000000560000 : "kernel"
0x000000560000-0x000040000000 : "root"
dm9000 Ethernet Driver, V1.31
eth0: dm9000e at c4878300,c487a304 IRQ 51 MAC: 70:71:bc:cc:24:91 (chip)
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: S3C24XX OHCI
usb usb1: Manufacturer: Linux 3.1.1-ptx-2011.11.0-SLTL ohci_hcd
usb usb1: SerialNumber: s3c24xx
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
mousedev: PS/2 mouse device common for all mice
samsung-ts s3c2440-ts: driver attached, registering input device
input: S3C24XX TouchScreen as /devices/virtual/input/input0
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
s3c-rtc s3c2410-rtc: rtc disabled, re-enabling
s3c-rtc s3c2410-rtc: rtc core: registered s3c as rtc0
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
TCP cubic registered
NET: Registered protocol family 17
s3c-rtc s3c2410-rtc: setting system clock to 2012-04-02 16:40:49 UTC
(1333384849)
uncorrectable error : 
uncorrectable error : 
uncorrectable error : 
uncorrectable error : 
uncorrectable error : 
uncorrectable error : 
uncorrectable error : 
uncorrectable error : 
mtd->read(0x800 bytes from 0x1f800) returned ECC error
uncorrectable error : 
mtd->read(0x100 bytes from 0x0) returned ECC error
uncorrectable error : 
uncorrectable error : 
uncorrectable error : 
uncorrectable error : 
uncorrectable error : 

--

Juergen Beisert
> Please check the command line, it is as per the expected.

Sorry, no, it isn't because this list is the built in partition layout. 

> [...]
> Creating 4 MTD partitions on "nand":
> 0x000000000000-0x000000040000 : "u-boot"
> 0x000000040000-0x000000060000 : "u-boot-env"
> 0x000000060000-0x000000560000 : "kernel"
> 0x000000560000-0x000040000000 : "root"
> [...]

It seems your kernel does not receive the correct 'mtdparts' values.

davef
Did you manage to place barebox-image  into flash?  Maybe, cut and paste
what you see when you stop the autoboot and do a /env/config

freqclock
Juergen,

http://www.friendlyarm.net/forum/topic/3916#18886
Please check, I've wrote do i need to make changes in mini2440.c file
according to the partition. 

@Davef,
Yes, barebox installed correctly into flash.

--
Board: Mini 2440
NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB 3,3V
8-bit)
Bad block table found at page 524224, version 0x01
Bad block table found at page 524160, version 0x01
dm9000 i/o: 0x20000300, id: 0x90000a46 
eth@eth0: got MAC address from EEPROM: FF:FF:FF:FF:FF:FF
refclk:    12000 kHz
mpll:     405000 kHz
upll:      48000 kHz
fclk:     405000 kHz
hclk:     101250 kHz
pclk:      50625 kHz
SDRAM1:   CL2@101MHz
Malloc space: 0x33a00000 -> 0x33e00000 (size  4 MB)
Stack space : 0x339f8000 -> 0x33a00000 (size 32 kB)
running /env/bin/init...

Hit any key to stop autoboot:  3
mini2440:/ . /env/config 
mini2440:/ 
--

here is the cut and paste of what you are saying.

@Juergen,
I think I need to make changes in mini2440.c file for the partition. can
you please confirm the same and if Yes, what value must be there in .c file
for correct kernel parameter.

Regards,
freqclock

davef
Sorry, I should have said:

edit /env/config

freqclock
@dave,

what value i should look for?

freqclock
@daveg, @juergen,

what should i do, so that kernel receive correct partition? Please help me
in this case.


Regards,
Freqclock

davef
Just cut and paste the whole output.  It is only about 30 lines or so.

freqclock
@davef,
here it is
--
#!/bin/sh

machine=mini2440
user=

# use 'dhcp' to do dhcp in barebox and in kernel
# use 'none' if you want to skip kernel ip autoconfiguration
ip=none

# or set your networking parameters here
eth0.ipaddr=192.168.1.230
eth0.netmask=255.255.255.0
eth0.gateway=192.168.1.1
eth0.serverip=192.168.1.232
eth0.ethaddr=70:71:bc:cc:24:91

# autoboot settings
# can be either 'tftp', 'nfs', 'nand' or 'mmc'
kernel_loc=nand
# can be either 'net', 'nand', 'initrd' or 'mmc'
rootfs_loc=nand
# can be either 'jffs2' or 'ubifs' for flash o
rootfs_type=jffs2

rootfsimage=root-${machine}.${rootfs_type}

# The image type of the kernel. Can be uimage, zimage, raw, or raw_lzo
#kernelimage_type=zimage
#kernelimage=zImage-${machine}
kernelimage_type=uimage
kernelimage=uImage-$machine
#kernelimage_type=raw
#kernelimage=Image-$machine
#kernelimage_type=raw_lzo
#kernelimage=Image-$machine.lzo

# the name of the barebox image used by the update script
bareboximage=barebox-$machine

# the name of the barebox default environment used by the update script
bareboxenvimage=barebox-default-environment-$machine

if [ -n $user ]; then
        kernelimage="${user}"-"${kernelimage}"
        nfsroot="${eth0.serverip}:/home/${user}/nfsroot/${machine}"
        rootfsimage="${user}"-"${rootfsimage}"
else
        nfsroot="/path/to/nfs/root"
fi

autoboot_timeout=3

#
# "mini2440" kernel parameter
# 0 .. 9 = screen type
# b = backlight enabled
# t = touch enabled
# c = camera enabled
# Note: can be "mini2440= " if nothing of these components are connected
#
bootargs="console=ttySAC0,115200 "

# NAND boot settings
# Device name used by the kernel
nand_device="nand"
# partition definition in the NAND
nand_parts="512k(barebox),384k(bareboxenv),2048k(kernel),-(root)"
# rootfs's partition number in the NAND
rootfs_mtdblock_nand=3
# used when manually booting with "boot nand" command
rootfs_mtdblock_type=jffs2

# MMC/SD boot settings
# partition number to read the kernel from
# (starting with # 0, Barebox's counting scheme)
kernel_mmc_part=0
# rootfs's partition number
# (starting with # 1, Kernel's counting scheme)
rootfs_mmc_part=2
# used when manually booting with "boot mmc" command
rootfs_mmc_type=ext2
--

as per juergen, perhaps my kernel is not taking the barebox cmd line
argument.

davef
Just heading home to where my env/config file is.  

bootargs="console=ttySAC0,115200 does not look right.

While I am on the bike, why did you change it from the default?

freqclock
@davef,

yes, i changed it, but that is the second thing, with this param kenel and
file system must be load perfectly, touch screen is the second things,
first i need to boot the kernel and filesystem, I will look into touch
screen things later on.

Juergen Beisert
When the kernel starts, it outputs very early a line starting with "Kernel
command line: [...]". Can you show us this line for your kernel? Maybe it
gives us an idea what is going wrong at your side.

davef
My understanding of the bootargs line is that if you do not want the
touchscreen you still have to say:

bootargs="console=ttySAC0,115200 mini2440="

Try that.

Don't forget:

CTRL D (enter)
saveenv (enter)
boot nand (enter)

freqclock
@davef,

tried the same, but no luck :(

davef
The guru should be back on-line in a few hours :)

Maybe try "Updating the Persistent Environment" in the BSP manual. 

Which version of the BSP are you using and which kernel version (default?)
Have you changed the default configuration file?

What was the size of your barebox image?  How did you load the kernel and
root filesystem on to the platform?

I've run out of ideas.

Good luck!

freqclock
@dave,

thank you for all the efforts,

well I am using barebox version 'barebox 2011.05.0-mini2440-ptx-2011.11.0'
and kernel is linux3.1. Yes I have tried every possibilities, but all try
fail. 

regards,
freqclock

Juergen Beisert
@freqclock

we need the full boot log, starting with reset, Barebox's messages and then
the kernel's messages. *All* lines are useful.

freqclock
@juergen,

Ok, here it is.
--
barebox 2011.05.0-mini2440-ptx-2011.11.0 (Mar 30 2012 - 10:08:39)

Board: Mini 2440
NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB 3,3V
8-bit)
Bad block table found at page 524224, version 0x01
Bad block table found at page 524160, version 0x01
dm9000 i/o: 0x20000300, id: 0x90000a46 
eth@eth0: got MAC address from EEPROM: FF:FF:FF:FF:FF:FF
refclk:    12000 kHz
mpll:     405000 kHz
upll:      48000 kHz
fclk:     405000 kHz
hclk:     101250 kHz
pclk:      50625 kHz
SDRAM1:   CL2@101MHz
Malloc space: 0x33a00000 -> 0x33e00000 (size  4 MB)
Stack space : 0x339f8000 -> 0x33a00000 (size 32 kB)
running /env/bin/init...

Hit any key to stop autoboot:  3
mini2440:/ boot nand
booting kernel of type uimage from /dev/nand0.kernel.bb
   Verifying Checksum ... OK
   Image Name:   Linux-3.1.1-ptx-2011.11.0-SLTL
   Created:      2012-04-03   5:12:42 UTC
   Image Type:   <NULL> <NULL> <NULL> (<NULL>)
   Data Size:    1876484 Bytes =  1.8 MB
   Load Address: 30008000
   Entry Point:  30008000
OK
commandline: console=ttySAC0,115200 mini2440= ip=none root=/dev/mtdblock3
rootfstype=jffs2 noinitrd
mtdparts=nand:512k(barebox),384k(bareboxenv),2048k(kerne)
arch_number: 1999

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Linux version 3.1.1-ptx-2011.11.0-SLTL (root@sltl-desktop) (gcc version
4.6.2 (OSELAS.Toolchain-2011.11.0) ) #2 Tue Apr 3 10:42:37 IST 2012
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: MINI2440
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C24XX Clocks, Copyright 2004 Simtec Electronics
S3C244X: core 405.000 MHz, memory 101.250 MHz, peripheral 50.625 MHz
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: console=ttySAC0,115200 mini2440= ip=none
root=/dev/mtdblock3 rootfstype=jffs2 noinitrd
mtdparts=nand:512k(barebox),384k(bareboxenv),204)
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 61080k/61080k available, 4456k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
    vmalloc : 0xc4800000 - 0xf6000000   ( 792 MB)
    lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .text : 0xc0008000 - 0xc0356000   (3384 kB)
      .init : 0xc0356000 - 0xc0373000   ( 116 kB)
      .data : 0xc0374000 - 0xc0395200   ( 133 kB)
       .bss : 0xc0395224 - 0xc03c386c   ( 186 kB)
SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:85
irq: clearing pending ext status 00000080
irq: clearing subpending status 00000003
irq: clearing subpending status 00000002
Console: colour dummy device 80x30
Calibrating delay loop... 201.52 BogoMIPS (lpj=503808)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
MINI2440: Option string mini2440=
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C24XX DMA Driver, Copyright 2003-2006 Simtec Electronics
DMA channel 0 at c4804000, irq 33
DMA channel 1 at c4804040, irq 34
DMA channel 2 at c4804080, irq 35
DMA channel 3 at c48040c0, irq 36
S3C244X: Clock Support, DVS off
s3c24xx-pwm s3c24xx-pwm.0: tin at 98876, tdiv at 98876, tin=divclk, base 0
S3C24XX CPU Frequency driver, s3c244x cpu support
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
NetWinder Floating Point Emulator V0.97 (double precision)
s3c-adc s3c24xx-adc: attached adc driver
JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
msgmni has been set to 119
io scheduler noop registered
io scheduler deadline registered (default)
s3c2440-uart.0: ttySAC0 at MMIO 0x50000000 (irq = 70) is a S3C2440
console [ttySAC0] enabled
s3c2440-uart.1: ttySAC1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: ttySAC2 at MMIO 0x50008000 (irq = 76) is a S3C2440
loop: module loaded
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c24xx-nand s3c2440-nand: Tacls=1, 9ns Twrph0=3 29ns, Twrph1=2 19ns
s3c24xx-nand s3c2440-nand: NAND soft ECC
s3c24xx-nand s3c2440-nand: Using flash based BBT
NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB 3,3V
8-bit)
Creating 4 MTD partitions on "nand":
0x000000000000-0x000000040000 : "u-boot"
0x000000040000-0x000000060000 : "u-boot-env"
0x000000060000-0x000000560000 : "kernel"
0x000000560000-0x000040560000 : "root"
mtd: partition "root" extends beyond the end of device "nand" -- size
truncated to 0x3faa0000
dm9000 Ethernet Driver, V1.31
eth0: dm9000e at c4878300,c487a304 IRQ 51 MAC: 70:71:bc:cc:24:91 (chip)
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: S3C24XX OHCI
usb usb1: Manufacturer: Linux 3.1.1-ptx-2011.11.0-SLTL ohci_hcd
usb usb1: SerialNumber: s3c24xx
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
mousedev: PS/2 mouse device common for all mice
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
s3c-rtc s3c2410-rtc: rtc disabled, re-enabling
s3c-rtc s3c2410-rtc: rtc core: registered s3c as rtc0
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
TCP cubic registered
NET: Registered protocol family 17
s3c-rtc s3c2410-rtc: setting system clock to 2012-04-03 12:09:04 UTC
(1333454944)
uncorrectable error : 
uncorrectable error : 
uncorrectable error : 
uncorrectable error : 
uncorrectable error : 
uncorrectable error : 
uncorrectable error : 
uncorrectable error : 
mtd->read(0x800 bytes from 0x1f800) returned ECC error
uncorrectable error : 
mtd->read(0x100 bytes from 0x0) returned ECC error
uncorrectable error : 
uncorrectable error : 
uncorrectable error : 
uncorrectable error : 
uncorrectable error : 
uncorrectable error : 

--

Juergen Beisert
The command line is still messed up:

> [...]
> Kernel command line: console=ttySAC0,115200 mini2440= ip=none
> root=/dev/mtdblock3 rootfstype=jffs2 noinitrd
> mtdparts=nand:512k(barebox),384k(bareboxenv),204)
>[...]

The last line should be instead:
mtdparts=nand:512k(barebox),384k(bareboxenv),2048k(kernel),-(root)

Does your serial line lose characters? But it seems this broken string is
really forwarded to the kernel. Sorry, no idea what is going wrong at your
side.

The error you see is, that Barebox uses the defined partitions and aligns
the JFFS2 filesystem according to it, but the kernel "sees" a different
partition layout and starts to expect the filesystem at an offset where it
is not stored to.

freqclock
@juergen,

Yes, problem is with different parameter, can you please tell me do i need
to make changes in mach-mini2440.c for the value of partition size?

after changing the parameter in /env/config, now i am getting.

mini2440:/ boot nand
booting kernel of type uimage from /dev/nand0.kernel.bb
err -74
could not read: error 74

totally stuck, don't know what to do, heading for the cold coffee and
format everything and installing fresh.. :)

Thanks for the time and help.

Juergen Beisert
What parameters did you change in 'env/config'? As you list it at
2012-04-03 07:54:20 it seems okay. What did you change this time?
After changing the partition layout you must re-program the flash. Like a
harddisk: if you change the partition table you also must re-format the
partitions.
Re-start with the built-in environment in your Barebox:

mini2440:/ erase /dev/nand0.bareboxenv.bb
mini2440:/ reset

Check if the /env/config now contains the correct nand partition
description. If not, change it, save it, make it persistent with the
"savenenv" command. If you changed something in the partition layout, then
you also need a "reset" command again, to make the new partition layout
valid.
Then re-flash again the kernel and the root filesystem.

freqclock
Hello Juerge,

when i tried to erase root partion, i got,

mini2440:/ erase /dev/nand0.root.bb 
Skipping bad block at 0x3ff80000
Skipping bad block at 0x3ffa0000
Skipping bad block at 0x3ffc0000
Skipping bad block at 0x3ffe0000

I have tried removing mini2440 and 115200 from bootargs and now will be
able to exact kernel command line.

--
barebox 2011.05.0-mini2440-ptx-2011.11.0 (Mar 30 2012 - 10:08:39)

Board: Mini 2440
NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB 3,3V
8-bit)
Bad block table found at page 524224, version 0x01
Bad block table found at page 524160, version 0x01
dm9000 i/o: 0x20000300, id: 0x90000a46 
eth@eth0: got MAC address from EEPROM: FF:FF:FF:FF:FF:FF
refclk:    12000 kHz
mpll:     405000 kHz
upll:      48000 kHz
fclk:     405000 kHz
hclk:     101250 kHz
pclk:      50625 kHz
SDRAM1:   CL2@101MHz
Malloc space: 0x33a00000 -> 0x33e00000 (size  4 MB)
Stack space : 0x339f8000 -> 0x33a00000 (size 32 kB)
running /env/bin/init...

Hit any key to stop autoboot:  3
mini2440:/ 
mini2440:/ 
mini2440:/ boot nand
booting kernel of type uimage from /dev/nand0.kernel.bb
   Verifying Checksum ... OK
   Image Name:   Linux-3.1.1-ptx-2011.11.0-SLTL
   Created:      2012-04-03   5:12:42 UTC
   Image Type:   <NULL> <NULL> <NULL> (<NULL>)
   Data Size:    1876484 Bytes =  1.8 MB
   Load Address: 30008000
   Entry Point:  30008000
OK
commandline: console=ttySAC0 ip=none root=/dev/mtdblock3 rootfstype=jffs2
noinitrd mtdparts=nand:512k(barebox),384k(bareboxenv),2048k(kernel),-(root)
arch_number: 1999

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Linux version 3.1.1-ptx-2011.11.0-SLTL (root@sltl-desktop) (gcc version
4.6.2 (OSELAS.Toolchain-2011.11.0) ) #2 Tue Apr 3 10:42:37 IST 2012
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: MINI2440
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C24XX Clocks, Copyright 2004 Simtec Electronics
S3C244X: core 405.000 MHz, memory 101.250 MHz, peripheral 50.625 MHz
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: console=ttySAC0 ip=none root=/dev/mtdblock3
rootfstype=jffs2 noinitrd
mtdparts=nand:512k(barebox),384k(bareboxenv),2048k(kernel),-(root)
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 61080k/61080k available, 4456k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
    vmalloc : 0xc4800000 - 0xf6000000   ( 792 MB)
    lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .text : 0xc0008000 - 0xc0356000   (3384 kB)
      .init : 0xc0356000 - 0xc0373000   ( 116 kB)
      .data : 0xc0374000 - 0xc0395200   ( 133 kB)
       .bss : 0xc0395224 - 0xc03c386c   ( 186 kB)
SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:85
irq: clearing pending ext status 00000080
irq: clearing subpending status 00000003
irq: clearing subpending status 00000002
Console: colour dummy device 80x30
Calibrating delay loop... 201.52 BogoMIPS (lpj=503808)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
MINI2440: Option string mini2440=0tb
MINI2440: LCD
 [0:240x320]
 1:800x480
 2:1024x768
 3:240x320
 4:640x480
 5:240x320
 6:320x240
 7:480x272

S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C24XX DMA Driver, Copyright 2003-2006 Simtec Electronics
DMA channel 0 at c4804000, irq 33
DMA channel 1 at c4804040, irq 34
DMA channel 2 at c4804080, irq 35
DMA channel 3 at c48040c0, irq 36
S3C244X: Clock Support, DVS off
s3c24xx-pwm s3c24xx-pwm.0: tin at 98876, tdiv at 98876, tin=divclk, base 0
S3C24XX CPU Frequency driver, s3c244x cpu support
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
NetWinder Floating Point Emulator V0.97 (double precision)
s3c-adc s3c24xx-adc: attached adc driver
JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
msgmni has been set to 119
io scheduler noop registered
io scheduler deadline registered (default)
Console: switching to colour frame buffer device 30x20
fb0: s3c2410fb frame buffer device
s3c2440-uart.0: ttySAC0 at MMIO 0x50000000 (irq = 70) is a S3C2440
console [ttySAC0] enabled
s3c2440-uart.1: ttySAC1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: ttySAC2 at MMIO 0x50008000 (irq = 76) is a S3C2440
loop: module loaded
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c24xx-nand s3c2440-nand: Tacls=1, 9ns Twrph0=3 29ns, Twrph1=2 19ns
s3c24xx-nand s3c2440-nand: NAND soft ECC
s3c24xx-nand s3c2440-nand: Using flash based BBT
NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB 3,3V
8-bit)
Creating 4 MTD partitions on "nand":
0x000000000000-0x000000040000 : "u-boot"
0x000000040000-0x000000060000 : "u-boot-env"
0x000000060000-0x000000560000 : "kernel"
0x000000560000-0x000040560000 : "root"
mtd: partition "root" extends beyond the end of device "nand" -- size
truncated to 0x3faa0000
dm9000 Ethernet Driver, V1.31
eth0: dm9000e at c4878300,c487a304 IRQ 51 MAC: 70:71:bc:cc:24:91 (chip)
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: S3C24XX OHCI
usb usb1: Manufacturer: Linux 3.1.1-ptx-2011.11.0-SLTL ohci_hcd
usb usb1: SerialNumber: s3c24xx
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
mousedev: PS/2 mouse device common for all mice
samsung-ts s3c2440-ts: driver attached, registering input device
input: S3C24XX TouchScreen as /devices/virtual/input/input0
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
s3c-rtc s3c2410-rtc: rtc disabled, re-enabling
s3c-rtc s3c2410-rtc: rtc core: registered s3c as rtc0
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
TCP cubic registered
NET: Registered protocol family 17
s3c-rtc s3c2410-rtc: setting system clock to 2012-04-04 11:14:28 UTC
(1333538068)
uncorrectable error : 
uncorrectable error : 
uncorrectable error : 
uncorrectable error : 
uncorrectable error : 
uncorrectable error : 
uncorrectable error : 
uncorrectable error : 
mtd->read(0x800 bytes from 0x1f800) returned ECC error
uncorrectable error : 
mtd->read(0x100 bytes from 0x0) returned ECC error

--

I am following the exact produce mentioned in the BSP pdf, but don't know
what I am doing wrong? please tell me, do i need to make changes in
mini2440.c for partition layout?

regards,
freqclock

davef
> How do you load the kernel and
> root filesystem on to the platform?

davef
I never had to mess with any of the kernel files.

freqclock
@davef,

i load barebox, kernel and rootfs reading howto from BSP pdf.

totally lost, can you please share the video? 

Thank you for your time.

--
freqclock

davef
share the video?

davef
It appears to me that you do not have barebox in flash, but still have
u-boot in there. 

At least you managed to get u-boot in there.  Which tutorial did you follow
to accomplish that?

   ~ update -t barebox -d nand

runs correctly.  Could you show us a screen shot of what you see when that
finishes?

freqclock
@davef,

No, Barebox is there, please check the log when barebox start. I haven't
installed uboot in board

--

barebox 2011.05.0-mini2440-ptx-2011.11.0 (Mar 30 2012 - 10:08:39)

Board: Mini 2440
NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB 3,3V
8-bit)
Bad block table found at page 524224, version 0x01
Bad block table found at page 524160, version 0x01
dm9000 i/o: 0x20000300, id: 0x90000a46 
eth@eth0: got MAC address from EEPROM: FF:FF:FF:FF:FF:FF
refclk:    12000 kHz
mpll:     405000 kHz
upll:      48000 kHz
fclk:     405000 kHz
hclk:     101250 kHz
pclk:      50625 kHz
SDRAM1:   CL2@101MHz
Malloc space: 0x33a00000 -> 0x33e00000 (size  4 MB)
Stack space : 0x339f8000 -> 0x33a00000 (size 32 kB)
running /env/bin/init...

Hit any key to stop autoboot:  3
mini2440:/ 
mini2440:/ 
mini2440:/ boot nand
booting kernel of type uimage from /dev/nand0.kernel.bb
   Verifying Checksum ... OK
   Image Name:   Linux-3.1.1-ptx-2011.11.0-SLTL
   Created:      2012-04-03   5:12:42 UTC
   Image Type:   <NULL> <NULL> <NULL> (<NULL>)
   Data Size:    1876484 Bytes =  1.8 MB
   Load Address: 30008000
   Entry Point:  30008000
OK
commandline: console=ttySAC0 ip=none root=/dev/mtdblock3 rootfstype=jffs2
noinitrd mtdparts=nand:512k(barebox),384k(bareboxenv),2048k(kernel),-(root)
arch_number: 1999

Starting kernel ...

--
command I am using to update barebox..

mini2440:/ update -t barebox -d nand
phy0: Link is up - 100/Full
T host 192.168.1.232 is alive

erasing partition /dev/nand0.barebox.bb


flashing barebox-mini2440 to /dev/nand0.barebox.bb

TFTP from server 192.168.X.XXX ('barebox-mini2440' ->
'/dev/nand0.barebox.bb')
        #############################


Thanks & Regards,
Freqclock

davef
Creating 4 MTD partitions on "nand":
0x000000000000-0x000000040000 : "u-boot"
0x000000040000-0x000000060000 : "u-boot-env"
0x000000060000-0x000000560000 : "kernel"
0x000000560000-0x000040560000 : "root"

Well, I don't understand why you get the correct partition sizes with the
labels u-boot and u-boot-env after them.

> What was the size of your barebox image?

Please answer that question.

And it sounds like you haven't tried:

update -t bareboxenv -d nand

as mentioned earlier.  I don't know if it will make any difference, but we
are running out of ideas here!

I see you have changed the sizes of the partitions:
512k(barebox),384k(bareboxenv),2048k(kernel),-(root)

256k(barebox),64k(bareboxenv),2048k(kernel0,-(root) is enough for me.

Why have you changed the first two?

davef
Just a minute here . . . which hardware platform did you select?

ptxdist platform
configs/platform-friendlyarm-mini2440/platformconfig-NAND-??

davef
> Well, I don't understand why you get the correct partition sizes
> with the labels u-boot and u-boot-env after them.

I don't think you are even getting the correct partition sizes. x40000 is
about 256k and you are trying to set it to 512k in /env/config

freqclock
@davef,

>configs/platform-friendlyarm-mini2440/platformconfig-NAND-??

i selected 128M NAND partition.

>I see you have changed the sizes of the partitions:
>512k(barebox),384k(bareboxenv),2048k(kernel),-(root)

>256k(barebox),64k(bareboxenv),2048k(kernel0,-(root) is enough for me.

>Why have you changed the first two?

as Juergen replied in one post above.



Thanks & Regards,
freqclock

Juergen Beisert
@freqclock: from your kernel log everything seems correct. The kernel
command line is now correct and also correctly forwarded to the kernel. The
only problem is, the "mtdparts" seems to be ignored by your kernel, as it
always falls back to the built in partition table. Did you change anything
in the kernel configuration?

I just started my own Mini2440 and its kernel states:
[...]
Kernel command line: console=ttySAC0,115200 mini2440=0tbc
ip=192.168.1.241:192.168.1.7:192.168.1.1:255.255.255.0::: root=/dev/nfs
nfsroot=/home/jb/OSELAS.BSP-Pengutronix-Mini2440/platform-mini2440/root,v3,tcp
noinitrd mtdparts=nand:512k(barebox),384k(bareboxenv),2048k(kernel),-(root)
[...]
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c24xx-nand s3c2440-nand: Tacls=1, 9ns Twrph0=3 29ns, Twrph1=2 19ns
s3c24xx-nand s3c2440-nand: NAND hardware ECC
s3c24xx-nand s3c2440-nand: Using flash based BBT
NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V
8-bit)
4 cmdlinepart partitions found on MTD device nand
Creating 4 MTD partitions on "nand":
0x000000000000-0x000000080000 : "barebox"
0x000000080000-0x0000000e0000 : "bareboxenv"
0x0000000e0000-0x0000002e0000 : "kernel"
0x0000002e0000-0x000008000000 : "root"
s3c24xx-nand s3c2440-nand: clock idle support enabled
[...]

On the other hand your kernel outputs "3.1.1-ptx-2011.11.0-SLTL". A not
modified kernel from my Mini2440-BSP should output "3.1.1-ptx-2011.11.0"
instead. What did you change in the kernel you are using compared to the
original kernel from my Mini2440 BSP?

davef
>I see you have changed the sizes of the partitions:
>512k(barebox),384k(bareboxenv),2048k(kernel),-(root)

Sorry, I thought there was a rule about the sizes of the partitions and
384K did not fit the rule, ie powers of 2.

I still don't see where he said to change to those specific numbers. 

I'll go back to my SPI driver. I would be interested to know why one needs
such big partitions for barebox and bareboxenv.

Juergen Beisert
@davef The partitions size is all right for the NAND types with 128 kiB
erase blocks. To be save you need at least two or better three of these
blocks to form one partition. This is for the case one of the blocks is
already bad or becomes bad in the future. For the NAND types with 16 kiB
erase blocks you should also reserve more than one of them to form a
partition. But with four erase blocks you get a barboxenv with 64 kiB in
this case, with the 128 kiB erase blocks it would be 512 kiB.
And you are right: these partitions are mostly empty. But you always need
more than one block. No other way.

freqclock
@juergen, @davef,

Ok, I remove the kernel and compile it fresh, now barebox find the correct
partion.

---
NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB 3,3V
8-bit)
4 cmdlinepart partitions found on MTD device nand
Creating 4 MTD partitions on "nand":
0x000000000000-0x000000080000 : "barebox"
0x000000080000-0x0000000e0000 : "bareboxenv"
0x0000000e0000-0x0000002e0000 : "kernel"
s3c24xx-nand s3c2440-nand: clock idle support enabled
dm9000 Ethernet Driver, V1.31
--

but, but now I am getting.
--TCP cubic registered
NET: Registered protocol family 17
input: gpio-keys as /devices/platform/gpio-keys/input/input2
s3c-rtc s3c2410-rtc: setting system clock to 2012-04-05 12:14:13 UTC
(1333628053)
Empty flash at 0x00003ffc ends at 0x00004000
Empty flash at 0x00007ffc ends at 0x00008000
Empty flash at 0x0000bffc ends at 0x0000c000
Empty flash at 0x0000fffc ends at 0x00010000
Empty flash at 0x00013ffc ends at 0x00014000
Empty flash at 0x00017ffc ends at 0x00018000
Empty flash at 0x0001bf88 ends at 0x0001c000
Empty flash at 0x00023ffc ends at 0x00024000
Empty flash at 0x00027ffc ends at 0x00028000
--


did u see, my root file size and NAND size is different than yours.

--
0x0000002e0000-0x000040000000 : "root" - my
0x0000002e0000-0x000008000000 : "root" - your,

NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V
8-bit) - Your
NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB 3,3V
8-bit) - My

and in barebox selection i enabled 128M configuration. what could be wrong
over here..? is barebox support 1Gig NAND size? is it possible?

Look forward to hear from you.

davef
Thanks for the clarification, Juergen.

Multiples of the erase block size.

Juergen Beisert
My NAND has only 128 MiB, yours 1 GiB. So, why you wonder that your root
filesystem is larger than mine? The 64 MiB/128 MiB selection is only
required due to different erase block sizes. But I guess, also your 1 GiB
NAND has 128 kiB sized erase blocks, like my 128 MiB. Seems to work now
your system.

freqclock
@Juergen,

I was hoping the same, but i am not getting

Empty flash at 0x00003ffc ends at 0x00004000

at the end of the message, i got prompt and i am able to log in into the
system, but don't know why this message appear.

Please Help.

--
freqclock

freqclock
@juergen, @davef,

Can you please let me know the solution? plz

Juergen Beisert
You do not need a solution any more. You're done.

freqclock
:)

Ok, Thanks a lot for the Help, support and time. I am still not done with
the barebox image mount correctly in my 1Gib NAND mini2440. If you guys can
help me out in the situation, that will great help for me.


Regards,
freqclock

freqclock
@Juergen, @Dave,

Finally done. :)

Steps I follow:
First of find the nand page size and eraseable size using uboot, after that
 create filesystem with that page size and eraseable block. 

build all the image and follow step as per the pdf and DONE.

--

Registered led device: led1
Registered led device: led2
Registered led device: led3
Registered led device: led4
Registered led device: backlight
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
S3C24XX_UDA134X SoC Audio driver
UDA134X SoC Audio Codec
asoc: uda134x-hifi <-> s3c24xx-iis mapping ok
ALSA device list:
  #0: S3C24XX_UDA134X
TCP cubic registered
NET: Registered protocol family 17
input: gpio-keys as /devices/platform/gpio-keys/input/input2
s3c-rtc s3c2410-rtc: setting system clock to 2012-04-14 17:16:09 UTC
(1334423769)
VFS: Mounted root (jffs2 filesystem) on device 31:3.
devtmpfs: mounted
--
and after i got root prompt. 

The problem now is I have lcd of size 800x480 and i have given option
'1tbc' in mini2440= parameter. but unable to get lcd working, no power,
nothing display on the screen.

Thanks & Regards,
freqclock

Juergen Beisert
> build all the image and follow step as per the pdf and DONE.

\o/

> The problem now is I have lcd of size 800x480 and i have given option
> '1tbc' in mini2440= parameter. but unable to get lcd working, no power,
> nothing display on the screen.

What do you mean by "no power"? There is no switch to enable or disable the
LCD's power.

What did you try to get something to display on the LCD?

freqclock
@Juergen,

> build all the image and follow step as per the pdf and DONE.
I have to find the exact page size and erasable block size in order to
create jffs2 file system, to find the both the parameter, i installed uboot
and using 'nand info' command I found the parameter and using that parater
i generate jffs2 file system. Please add this steps to pdf, so that newbie
like me won't find it difficult.

>>What do you mean by "no power"? There is no switch to enable or disable
the LCD's power.
I have enable penguine logo in kernel config but there is no logo on
display and lcd remain power off.  I am using 7" lcd.


Thanks & Regards,
freqclock

Classmate
Where can i find the pdf , is it the manual that comes with thee board?
thanks

Juergen Beisert
freqclock: To see the logo, you must also enable the "framebuffer console".
Or just run "fbtest" or "ts_calibrate" to see, if these tool create a
visible output.

miniarm
@juergen,

I found that linux version below 3.1 doesn't see correct linux partition,
because my linux 3.1 see correct linux partition, but linux 2.6.33 doesn't
see correct partition.

I am getting the same error as received by freqclock for 2.6.33 version.

Linux version 2.6.33-mini2440 (root@mini2440-desktop) (gcc version 4.6.2
(OSELAS.Toolchain-2011.11.0) ) #22 PREEMPT Sat Oct 6 11:37:51 IST 2012
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: Mini2440 - ARM9 development board
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C24XX Clocks, Copyright 2004 Simtec Electronics
S3C244X: core 405.000 MHz, memory 101.250 MHz, peripheral 50.625 MHz
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: console=ttySAC0,115200 mini2440=0tbc ip=none
root=/dev/mtdblock3 rootfstype=jffs2 noinitrd
mtdparts=nand:512k(barebox),384k(bareboxenv))
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 61468KB available (2880K code, 337K data, 104K init, 0K highmem)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:85
irq: clearing pending ext status 00000080
irq: clearing subpending status 00000003
irq: clearing subpending status 00000002
Console: colour dummy device 80x30
console [ttySAC0] enabled
Calibrating delay loop... 201.93 BogoMIPS (lpj=504832)
Mount-cache hash table entries: 512
Initializing cgroup subsys blkio
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
Mini2440: Features string mini2440=0tbc
Mini2440 Buttons:
 [0: ENTER ] [1: UP    ] [2: POWER ]
 [3: LEFT  ] [4: DOWN  ] [5: RIGHT ]
Mini2440 LCD type:
  NONE
> 0: NL2432HC22 3.5" (240x320)
  1: TD035STED4 3.5" (240x320)
  2: AT056TN52  5.6" (640x480)
  3: AT070TN83  7.0" (800x480)
  4: VGA board       (1024x768)
s3c24xx-adc s3c24xx-adc: attached adc driver
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C24XX DMA Driver, Copyright 2003-2006 Simtec Electronics
DMA channel 0 at c4808000, irq 33
DMA channel 1 at c4808040, irq 34
DMA channel 2 at c4808080, irq 35
DMA channel 3 at c48080c0, irq 36
S3C244X: Clock Support, DVS off
bio: create slab <bio-0> at 0
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
s3c-i2c s3c2440-i2c: slave address 0x10
s3c-i2c s3c2440-i2c: bus frequency set to 98 KHz
s3c-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
NTFS driver 2.1.29 [Flags: R/W].
JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
msgmni has been set to 120
alg: No test for stdrng (krng)
alg: No test for fips(ansi_cprng) (fips_ansi_cprng)
io scheduler noop registered
io scheduler cfq registered (default)
Console: switching to colour frame buffer device 40x29
fb0: s3c2410fb frame buffer device
pwm     initialized
s3c2440-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440
brd: module loaded
loop: module loaded
at24 0-0050: 1024 byte 24c08 EEPROM (writable)
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c24xx-nand s3c2440-nand: Tacls=1, 9ns Twrph0=3 29ns, Twrph1=2 19ns
s3c24xx-nand s3c2440-nand: NAND hardware ECC
NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB 3,3V
8-bit)
Creating 4 MTD partitions on "NAND 1GiB 3,3V 8-bit":
0x000000000000-0x000000040000 : "u-boot"
0x000000040000-0x000000060000 : "u-boot-env"
0x000000060000-0x000000560000 : "kernel"
0x000000560000-0x000040000000 : "root"
dm9000 Ethernet Driver, V1.31
Now use the MAC address: 1C:F7:1A:3D:89:E3
eth0: dm9000e at c4942300,c4946304 IRQ 51 MAC: 1c:f7:1a:3d:89:e3 (mini2440)
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: S3C24XX OHCI
usb usb1: Manufacturer: Linux 2.6.33-mini2440 ohci_hcd
usb usb1: SerialNumber: s3c24xx
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
usbcore: registered new interface driver libusual
s3c2440-usbgadget s3c2440-usbgadget: S3C2440: increasing FIFO to 128 bytes
mice: PS/2 mouse device common for all mice
s3c24xx-ts s3c2440-ts: driver attached, registering input device
input: S3C24XX TouchScreen as /devices/virtual/input/input0
input: OnBoard Buzzer as /devices/platform/buzzer/input/input1
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
s3c2410-rtc s3c2410-rtc: rtc disabled, re-enabling
s3c2410-rtc s3c2410-rtc: rtc core: registered s3c as rtc0
i2c /dev entries driver
cpuidle: using governor ladder
Registered led device: led1
Registered led device: led2
Registered led device: led3
Registered led device: led4
Registered led device: backlight
TCP cubic registered
NET: Registered protocol family 17
s3c2410-rtc s3c2410-rtc: hctosys: invalid date/time
eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
IP-Config: Complete:
     device=eth0, addr=192.168.1.167, mask=255.255.255.0, gw=192.168.1.1,
     host=192.168.1.167, domain=, nis-domain=(none),
     bootserver=192.168.1.232, rootserver=192.168.1.232, rootpath=
VFS: Mounted root (jffs2 filesystem) on device 31:3.
Freeing init memory: 104K
Warning: unable to open an initial console.
Kernel panic - not syncing: No init found.  Try passing init= option to
kernel.
[<c0028b90>] (unwind_backtrace+0x0/0xcc) from [<c02463ec>]
(panic+0x54/0x134)
[<c02463ec>] (panic+0x54/0x134) from [<c0246260>] (init_post+0xdc/0x10c)
[<c0246260>] (init_post+0xdc/0x10c) from [<c00089d4>]
(kernel_init+0x100/0x134)
[<c00089d4>] (kernel_init+0x100/0x134) from [<c0023e74>]
(kernel_thread_exit+0x0/0x8)

can you please tell me why linux version below 3.1 doesn't see correct
linux partition.

the only reason to port different kernel is, I have written a kernel module
  , access module from user space with c program using ioctl. 

Please let me know the solution.

miniarm
I am also trying to compile version 2.6.38, it is downloading... from
pengutronics.

Juergen Beisert
You must extend the kernel command line with the "mtdparts" parameter to
let the kernel know your intended NAND flash partitioning. Otherwise it
falls back to the compiled in partitioning which does not match your
requirements.

miniarm
@juergen,

I also did the same thing, but no luck :(.

I have given kernel command line in config file (/env/config).

Now the question is, in linux 3.1 I didn't give mtdparts command in config
file, its automatically detect by kernel when mounting.

miniarm
I have also tried linux 2.6.35.9 and still got the same result. Kernel see
the right partition size, but unable to init the system.

could you please explain me what could be wrong over here... why my kernel
can't see right partition size?



Please check the below log for linux 2.6.35.9.


mini2440:/ boot nand
booting kernel of type uimage from /dev/nand0.kernel.bb
   Verifying Checksum ... OK
   Image Name:   Linux-2.6.35.9-ipipe
   Created:      2012-10-06   9:44:33 UTC
   Image Type:   <NULL> <NULL> <NULL> (<NULL>)
   Data Size:    2043876 Bytes =  1.9 MB
   Load Address: 30008000
   Entry Point:  30008000
OK
commandline: console=ttySAC0,115200 init=/linuxrc ip=none
root=/dev/mtdblock3 rootfstype=jffs2 noinitrd
mtdparts=nand:512k(barebox),384k(bareboxenv),2048k(k)
arch_number: 1999

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Initializing cgroup subsys cpu
Linux version 2.6.35.9-ipipe (root@mini2440-desktop) (gcc version 4.6.2
(OSELAS.Toolchain-2011.11.0) ) #36 PREEMPT Sat Oct 6 15:14:30 IST 2012
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: MINI2440
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C24XX Clocks, Copyright 2004 Simtec Electronics
S3C244X: core 405.000 MHz, memory 101.250 MHz, peripheral 50.625 MHz
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: console=ttySAC0,115200 init=/linuxrc ip=none
root=/dev/mtdblock3 rootfstype=jffs2 noinitrd
mtdparts=nand:512k(barebox),384k(bareboxenv))
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 60888k/60888k available, 4648k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
    vmalloc : 0xc4800000 - 0xe0000000   ( 440 MB)
    lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .init : 0xc0008000 - 0xc0023000   ( 108 kB)
      .text : 0xc0023000 - 0xc0391000   (3512 kB)
      .data : 0xc0392000 - 0xc03acd80   ( 108 kB)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
        RCU-based detection of stalled CPUs is disabled.
        Verbose stalled-CPUs detection is disabled.
NR_IRQS:85
fiq inited
irq: clearing pending ext status 00000080
irq: clearing subpending status 00000003
irq: clearing subpending status 00000002
I-pipe, 8.437 MHz clocksource
I-pipe 1.18-01: pipeline enabled.
Console: colour dummy device 80x30
console [ttySAC0] enabled
Calibrating delay loop... 201.93 BogoMIPS (lpj=504832)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
Initializing cgroup subsys devices
CPU: Testing write buffer coherency: ok
gpiochip_add: gpios 288..303 (GPIOK) failed to register
gpiochip_add: gpios 320..334 (GPIOL) failed to register
gpiochip_add: gpios 352..353 (GPIOM) failed to register
NET: Registered protocol family 16
MINI2440: Option string mini2440=3tb
Setup SPI0
MINI2440: LCD 0:240x320 1:800x480 2:1024x768 [3:320x240] 4:640x480
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C24XX DMA Driver, Copyright 2003-2006 Simtec Electronics
DMA channel 0 at c4808000, irq 33
DMA channel 1 at c4808040, irq 34
DMA channel 2 at c4808080, irq 35
DMA channel 3 at c48080c0, irq 36
S3C244X: Clock Support, DVS off
s3c-adc s3c24xx-adc: attached adc driver
S3C24XX CPU Frequency driver, s3c244x cpu support
bio: create slab <bio-0> at 0
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Switching to clocksource ipipe_tsc
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
msgmni has been set to 118
io scheduler noop registered
io scheduler cfq registered (default)
Console: switching to colour frame buffer device 40x15
fb0: s3c2410fb frame buffer device
Hello, Mini2440 module is installed !
pwm    initialized
s3c2440-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440
loop: module loaded
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c24xx-nand s3c2440-nand: Tacls=3, 29ns Twrph0=7 69ns, Twrph1=3 29ns
s3c24xx-nand s3c2440-nand: NAND hardware ECC
NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB 3,3V
8-bit)
Scanning device for bad blocks
Creating 5 MTD partitions on "NAND 1GiB 3,3V 8-bit":
0x000000000000-0x000000040000 : "supervivi"
0x000000040000-0x000000060000 : "param"
0x000000060000-0x000000560000 : "kernel"
0x000000560000-0x000040560000 : "root"
mtd: partition "root" extends beyond the end of device "NAND 1GiB 3,3V
8-bit" -- size truncated to 0x3faa0000
0x000000000000-0x000040000000 : "nand"
s3c24xx-nand s3c2440-nand: clock idle support enabled
dm9000 Ethernet Driver, V1.31
dm9000 dm9000: eth%d: Invalid ethernet MAC address. Please set using
ifconfig
eth0: dm9000e at c485c300,c4860304 IRQ 51 MAC: ff:ff:ff:ff:ff:ff (chip)
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
mice: PS/2 mouse device common for all mice
samsung-ts s3c2440-ts: driver attached, registering input device
input: S3C24XX TouchScreen as /devices/virtual/input/input0
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
s3c-rtc s3c2410-rtc: rtc disabled, re-enabling
s3c-rtc s3c2410-rtc: rtc core: registered s3c as rtc0
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
s3c-sdi s3c2440-sdi: powered down.
s3c-sdi s3c2440-sdi: mmc0 - using pio, sw SDIO IRQ
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
TCP cubic registered
NET: Registered protocol family 17
s3c-rtc s3c2410-rtc: setting system clock to 2000-01-01 01:06:07 UTC
(946688767)
Empty flash at 0x0149c2ec ends at 0x0149c800
JFFS2 notice: (1) jffs2_build_xattr_subsystem: complete building xattr
subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0
orphan) found.
VFS: Mounted root (jffs2 filesystem) on device 31:3.
Freeing init memory: 108K
Failed to execute /linuxrc.  Attempting defaults...
Kernel panic - not syncing: No init found.  Try passing init= option to
kernel. See Linux Documentation/init.txt for guidance.
Backtrace: 
[<c0027b8c>] (dump_backtrace+0x0/0x10c) from [<c02e3c3c>]
(dump_stack+0x18/0x1c)
 r6:c0042478 r5:c001e520 r4:c03ad810 r3:00000000
[<c02e3c24>] (dump_stack+0x0/0x1c) from [<c02e3ea0>] (panic+0x78/0xe8)
[<c02e3e28>] (panic+0x0/0xe8) from [<c02e3bf8>] (init_post+0xb4/0xe0)
 r3:60000013 r2:00000000 r1:00000000 r0:c034f148
[<c02e3b44>] (init_post+0x0/0xe0) from [<c0008abc>]
(kernel_init+0x12c/0x16c)
 r4:c001e520 r3:c3801080
[<c0008990>] (kernel_init+0x0/0x16c) from [<c0042478>] (do_exit+0x0/0x734)
 r5:c0008990 r4:00000000

Juergen Beisert
As long as you see a partition table listing "supervivi" something went
wrong. Maybe a typo in the kernel command line or the kernel just ignores
any "mtdparts" kernel parameter.

miniarm
Hello Juergen,

I don't understand why old kernel can't see mtdparts value. If I try to use
 other kernel as per above post, kernel can't find the perfect partition.
It  always find default partition.

Can you please tell me the solution, If you have tried porting old kernel
in new BSP.

Please let me know the possible solution for the same?

Imed
Hello,
MTD parts barebox commadline is not enough, you must setup also correct
partition in your kernel source code under arch/arm/mach-mini(or something
similar).
Look at the board source code and you will see a defined NAND partition
table.
Set up correctly this partition table with your images sizes (calculate
them to be safe and more self-confident), rebuild your kernel.
Reboot your board.
Good luck,
Imed