Problem with Wiki build Linux instructions (2440)

Wrightflyer
While waiting for the boards to arrive I've been trying to get familiar
with building the kernel, BusyBox, a rootfs, etc. following the Wiki
instructions at:

http://code.google.com/p/friendlyarm/wiki/Linux_Tutorial

The first thing to note are that the file retrieval scripts are wrong as
the Busybox website now holds the past archives as .tar.bz2 not .tar.gz as
the scripts assume. But that's easily fixed.

Part way through the Wiki it talks about preparing the rootfs in
<build-dir>/target. For the contents of target/etc it says to get a
prepared set of files from:

http://blog.leshak.ru/english/pages/how-to-install-u-boot-linux-2629-roo...

It looks like that Blog site has crashed and all previous articles/files
have gone - so that link just gives 404 errors.

Now there is a link to an OMAP site that does document how to prepare the
/etc part of the rootfs here:

http://processors.wiki.ti.com/index.php/Creating_a_Root_File_System_for_...

Can someone confirm that this is all that was contained on that Russian
blog site and that the steps given there will produce a rootfs that will
work for mini/micro2440 ?

Or is there a better way to do all this? I've seen mention of a CD/DVD that
comes with the board - maybe it has a more up to date process and
instructions?

WF.

Dave Festing
Attachment: rootfsjffs2.gz (1.02 MB)
Didn't think to make copies of the web sites referred to and canna' find a
copy on my PC.

Try this site for another version of the process required. 

http://cchia-cwp.blogspot.com/2010/03/build-root-file-system.html

The tutorial does result in a rootfs, but I could only navigate around it
using minicom.  The next step of getting a USB keyboard to work on the
device was not achieved.

Attached is rootfsjffs2.gz

Wrightflyer
Thanks Dave

The link looks very useful and when I finally found a way to mount your
rootfs image to examine the contents (found the answer from hughsw on this
page http://ubuntuforums.org/archive/index.php/t-432481.html ) it looks
equally useful.

WF.

davef
Did the mount script at the end of the tutorial not work for you?

Wrightflyer
Dave,

(BTW you are not the same davef as found on AVR Freaks are you??)

I now have my board and everything was going along swimmingly until I
thought I'd try to take a snapshot of the contents already in Nand. I
followed the instructions for using DNW but, of course, the first thing it
tells you to do is press [x] which actually (it tells you on the next
page!) has the effect of formatting the flash. So I lost the pre-loaded
bootloader, kernel and rootfs. I've now spent most of the day trying to get
something working again.

I found various guides to do this and most equate to the Youtube video on
this page:

http://narnia.cs.ttu.edu/drupal/node/131

So I'm pretty sure I'm doing everything OK but even if I try to use the
rootjffs2.gz you attached above I get a kernel boot that looks like:

===============================================================

U-Boot 1.3.2-mini2440 (May 25 2010 - 19:15:21)

I2C:   ready
DRAM:  64 MB
Flash:  2 MB
NAND:  Bad block table not found for chip 0
Bad block table not found for chip 0
256 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 256MiB 3,3V 8-bit, offset 0x60000
   Image Name:   Linux-2.6.29.4
   Created:      2009-05-20  11:45:59 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1945740 Bytes =  1.9 MB
   Load Address: 30008000
   Entry Point:  30008000
## Booting kernel from Legacy Image at 32000000 ...
   Image Name:   Linux-2.6.29.4
   Created:      2009-05-20  11:45:59 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1945740 Bytes =  1.9 MB
   Load Address: 30008000
   Entry Point:  30008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing
Linux...........................................................................
..................................................
done, booting the kernel.
Linux version 2.6.29.4 (fuchs@case) (gcc version 4.1.2) #21 Wed May 20
13:45:47 CEST 2009
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, (c) 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 noinitrd init=/sbin/init
mini2440=0tb root=/dev/mtdblock3 rootfstype=jffs2
irq: clearing pending status 02000000
irq: clearing subpending status 00000002
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x30
console [ttySAC0] enabled
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: 60748KB available (3596K code, 398K data, 132K init)
SLUB: Genslabs=12, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Calibrating delay loop... 201.93 BogoMIPS (lpj=504832)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 672 bytes
NET: Registered protocol family 16
MINI2440: Option string mini2440=0tb
MINI2440: LCD [0:240x320] 1:800x480 2:1024x768
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C24XX DMA Driver, (c) 2003-2004,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
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
NET: Registered protocol family 1
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
msgmni has been set to 118
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
Console: switching to colour frame buffer device 60x53
fb0: s3c2410fb frame buffer device
s3c2440-uart.0: ttySAC0 at MMIO 0x50000000 (irq = 70) is a S3C2440
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
dm9000 Ethernet Driver, V1.31
eth0 (dm9000): not using net_device_ops yet
eth0: dm9000e at c486a300,c486e304 IRQ 51 MAC: 08:08:11:18:12:27 (chip)
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2440-nand s3c2440-nand: Tacls=1, 9ns Twrph0=3 29ns, Twrph1=2 19ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V
8-bit)
Creating 4 MTD partitions on "NAND 256MiB 3,3V 8-bit":
0x000000000000-0x000000040000 : "u-boot"
0x000000040000-0x000000060000 : "u-boot-env"
uncorrectable error : <5>0x000000060000-0x000000560000 : "kernel"
uncorrectable error : <5>0x000000560000-0x000010000000 : "root"
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: configuration #1 chosen from 1 choice
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
input: gpio-keys as /devices/platform/gpio-keys/input/input0
s3c2440-ts s3c2440-ts: Starting
  Created group ts filter len 12 depth 2 close 10 thresh 6
  Created Median ts filter len 20 depth 2 dec 24
  Created Mean ts filter len 4 depth 2 thresh 65535
  Created Linear ts filter depth 2
s3c2440-ts s3c2440-ts: 4 filter(s) initialized
s3c2440-ts s3c2440-ts: successfully loaded
input: s3c2410 TouchScreen as /devices/virtual/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
s3c2440-i2c s3c2440-i2c: slave address 0x10
s3c2440-i2c s3c2440-i2c: bus frequency set to 395 KHz
at24 0-0050: 1024 byte 24c08 EEPROM (writable)
s3c2440-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
cpuidle: using governor ladder
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
mapped channel 0 to 0
s3c2440-sdi s3c2440-sdi: powered down.
s3c2440-sdi s3c2440-sdi: initialisation done.
s3c2440-sdi s3c2440-sdi: running at 0kHz (requested: 0kHz).
s3c2440-sdi s3c2440-sdi: running at 198kHz (requested: 197kHz).
s3c2440-sdi s3c2440-sdi: running at 198kHz (requested: 197kHz).
s3c2440-sdi s3c2440-sdi: running at 198kHz (requested: 197kHz).
Registered led device: led1
s3c2440-sdi s3c2440-sdi: running at 198kHz (requested: 197kHz).
s3c2440-sdi s3c2440-sdi: running at 198kHz (requested: 197kHz).
Registered led device: led2
s3c2440-sdi s3c2440-sdi: running at 198kHz (requested: 197kHz).
Registered led device: led3
Registered led device: led4
s3c2440-sdi s3c2440-sdi: running at 198kHz (requested: 197kHz).
s3c2440-sdi s3c2440-sdi: running at 16875kHz (requested: 25000kHz).
s3c2440-sdi s3c2440-sdi: running at 16875kHz (requested: 25000kHz).
mmc0: new SD card at address 0002
mmcblk0: mmc0:0002 00000 971 MiB (ro)
 mmcblk0: p1
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
Advanced Linux Sound Architecture Driver Version 1.0.18a.
No device for DAI UDA134X
No device for DAI s3c24xx-i2s
S3C24XX_UDA134X SoC Audio driver
UDA134X SoC Audio Codec
asoc: UDA134X <-> s3c24xx-i2s mapping ok
ALSA device list:
  #0: S3C24XX_UDA134X (UDA134X)
TCP cubic registered
NET: Registered protocol family 17
usb 1-1: new full speed USB device using s3c2410-ohci and address 2
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
s3c2410-rtc s3c2410-rtc: hctosys: invalid date/time
Empty flash at 0x00003f58 ends at 0x00004000
Empty flash at 0x00007ffc ends at 0x00008000
Empty flash at 0x0000bf5c ends at 0x0000c000
uncorrectable error : <4>mtd->read(0x10030 bytes from 0xffd0) returned ECC
error
Empty flash at 0x0000ffcc ends at 0x00010000
Empty flash at 0x00013ffc ends at 0x00014000
Empty flash at 0x00017ffc ends at 0x00018000
uncorrectable error : <4>mtd->read(0x4074 bytes from 0x1bf8c) returned ECC
error
Empty flash at 0x0001bf88 ends at 0x0001c000
Empty flash at 0x00027ffc ends at 0x00028000
Empty flash at 0x0002bffc ends at 0x0002c000
Empty flash at 0x0002fffc ends at 0x00030000
Empty flash at 0x00033ffc ends at 0x00034000
uncorrectable error : <4>mtd->read(0x8034 bytes from 0x37fcc) returned ECC
error
Empty flash at 0x00037fc8 ends at 0x00038000
Empty flash at 0x0003bffc ends at 0x0003c000
uncorrectable error : <4>mtd->read(0x1c06c bytes from 0x43f94) returned ECC
error
Empty flash at 0x00043f90 ends at 0x00044000
Empty flash at 0x00047ffc ends at 0x00048000
Empty flash at 0x0004ff64 ends at 0x0004ffe4
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0004ffe4:
0xffff instead
Empty flash at 0x0004ffe8 ends ...stripped-down

Wrightflyer
YOIKS! It cut my message - here's the rest:

Empty flash at 0x00073fa4 ends at 0x00074000
Empty flash at 0x00077ffc ends at 0x00078000
Empty flash at 0x0007bffc ends at 0x0007c000

<HUGE snip of similar output>

VFS: Mounted root (jffs2 filesystem) on device 31:3.
Freeing init memory: 132K
uncorrectable error : <4>mtd->read(0xa0 bytes from 0x127f60) returned ECC
error
uncorrectable error : <4>mtd->read(0x128 bytes from 0x127ed8) returned ECC
error
uncorrectable error : <4>mtd->read(0x1ac bytes from 0x127e54) returned ECC
error
uncorrectable error : <4>mtd->read(0x234 bytes from 0x127dcc) returned ECC
error
uncorrectable error : <4>mtd->read(0x2b8 bytes from 0x127d48) returned ECC
error
uncorrectable error : <4>mtd->read(0x16c bytes from 0x127694) returned ECC
error
uncorrectable error : <4>mtd->read(0x1f0 bytes from 0x127610) returned ECC
error
uncorrectable error : <4>mtd->read(0x814 bytes from 0x122fec) returned ECC
error
uncorrectable error : <4>mtd->read(0x90 bytes from 0x122f70) returned ECC
error
uncorrectable error : <4>mtd->read(0x108 bytes from 0x122ef8) returned ECC
error
uncorrectable error : <4>mtd->read(0x184 bytes from 0x122e7c) returned ECC
error
uncorrectable error : <4>mtd->read(0x274 bytes from 0x12758c) returned ECC
error
uncorrectable error : <4>mtd->read(0x2f4 bytes from 0x12750c) returned ECC
error
uncorrectable error : <4>mtd->read(0x81c bytes from 0x126fe4) returned ECC
error
uncorrectable error : <4>mtd->read(0xa0 bytes from 0x126f60) returned ECC
error
uncorrectable error : <4>mtd->read(0x124 bytes from 0x126edc) returned ECC
error
uncorrectable error : <4>mtd->read(0x1a8 bytes from 0x126e58) returned ECC
error
uncorrectable error : <4>mtd->read(0x22c bytes from 0x126dd4) returned ECC
error
uncorrectable error : <4>mtd->read(0x2b0 bytes from 0x126d50) returned ECC
error
uncorrectable error : <4>mtd->read(0x2c8 bytes from 0x127538) returned ECC
error

<HUGE snip of similar output>

Kernel panic - not syncing: Attempted to kill init!

===============================================================

Do you have any idea what I've done wrong here??

In case it helps here are the steps I used to program the code:

===============================================================

##### FriendlyARM BIOS 2.0 for 2440 #####
[x] format NAND FLASH for Linux
[v] Download vivi
[k] Download linux kernel
[y] Download root_yaffs image
[a] Absolute User Application
[n] Download Nboot for WinCE
[l] Download WinCE boot-logo
[w] Download WinCE NK.bin
[d] Download & Run
[z] Download zImage into RAM
[g] Boot linux from RAM
[f] Format the nand flash
[b] Boot the system
[s] Set the boot parameters
[u] Backup NAND Flash to HOST through USB(upload)
[r] Restore NAND Flash from HOST through USB
[q] Goto shell of vivi
[i] Version: 0945-2K
Enter your selection: q
Supervivi>
Supervivi> load ram 0x31000000 250000 u
USB host is connected. Waiting a download.

Now, Downloading [ADDRESS:31000000h,TOTAL:246174]
RECEIVED FILE SIZE:  246174 (240KB/S, 1S)
Downloaded file at 0x31000000, size = 246164 bytes
Supervivi> go 0x31000000
go to 0x31000000
  argument 0 = 0x00000000
  argument 1 = 0x00000000
  argument 2 = 0x00000000
á argument 3 = 0x00000000

U-Boot 1.3.2-mini2440 (May 25 2010 - 19:15:21)

I2C:   ready
DRAM:  64 MB
Flash:  2 MB
NAND:  Bad block table not found for chip 0
Bad block table not found for chip 0
256 MiB
*** Warning - bad CRC or NAND, using default environment

USB:   S3C2410 USB Deviced
In:    serial
Out:   serial
Err:   serial
MAC: 08:08:11:18:12:27
Hit any key to stop autoboot:  0
MINI2440 # nand scrub

NAND scrub: device 0 whole chip
Warning: scrub option will erase all factory set bad blocks!
         There is no reliable way to recover them.
         Use this command only for testing purposes if you
         are sure of what you are doing!

Really scrub this NAND flash? <y/N>
Erasing at 0x8500000 --  52% complete.
NAND 256MiB 3,3V 8-bit: MTD Erase failure: -5
Erasing at 0xb320000 --  70% complete.
NAND 256MiB 3,3V 8-bit: MTD Erase failure: -5
Erasing at 0xdc20000 --  86% complete.
NAND 256MiB 3,3V 8-bit: MTD Erase failure: -5
Erasing at 0xffe0000 -- 100% complete.
Bad block table not found for chip 0
Bad block table not found for chip 0
OK
MINI2440 # nand createbbt
Create BBT and erase everything ? <y/N>
Skipping bad block at  0x085a0000
Skipping bad block at  0x0b4e0000
Skipping bad block at  0x0dd40000
Skipping bad block at  0x0ff80000
Skipping bad block at  0x0ffa0000
Skipping bad block at  0x0ffc0000
Skipping bad block at  0x0ffe0000

Creating BBT. Please wait ...Bad block table not found for chip 0
Bad block table not found for chip 0
Bad block table written to 0x0ffe0000, version 0x01
Bad block table written to 0x0ffc0000, version 0x01

MINI2440 # nand write 0x31000000 u-boot

NAND write: device 0 offset 0x0, size 0x40000
 262144 bytes written: OK

U-Boot 1.3.2-mini2440 (May 25 2010 - 19:15:21)

I2C:   ready
DRAM:  64 MB
Flash:  2 MB
NAND:  256 MiB
*** Warning - bad CRC or NAND, using default environment

USB:   S3C2410 USB Deviced
In:    serial
Out:   serial
Err:   serial
MAC: 08:08:11:18:12:27
Hit any key to stop autoboot:  0

MINI2440 # dynenv set 40000
device 0 offset 0x40000, size 0xffc0000
45 4e 56 30 - 00 00 04 00

MINI2440 # mmcinit
mmc: Probing for SDHC ...
mmc: SD 2.0 or later card found
trying to detect SD Card...
Manufacturer:       0x1b, OEM "SM"
Product name:       "00000", revision 1.0
Serial number:      2984865336
Manufacturing date: 4/2008
CRC:                0x55, b0 = 1
READ_BL_LEN=15, C_SIZE_MULT=7, C_SIZE=3453
size = 2329935872
SD Card detected RCA: 0x2 type: SD
MINI2440 # fatload mmc 0:1 0x31000000 fui
reading fui

1945804 bytes read
MINI2440 # nand write 0x31000000 kernel

NAND write: device 0 offset 0x60000, size 0x500000
 5242880 bytes written: OK

MINI2440 # nand erase root

NAND erase: device 0 offset 0x560000, size 0xfaa0000
Skipping bad block at  0x085a0000
Skipping bad block at  0x0b4e0000
Skipping bad block at  0x0dd40000
Skipping bad block at  0x0ff80000
Skipping bad block at  0x0ffa0000
Skipping bad block at  0x0ffc0000
Skipping bad block at  0x0ffe0000

OK
MINI2440 # mmc
mmc: Probing for SDHC ...
mmc: SD 2.0 or later card found
trying to detect SD Card...
Manufacturer:       0x1b, OEM "SM"
Product name:       "00000", revision 1.0
Serial number:      2984865336
Manufacturing date: 4/2008
CRC:                0x55, b0 = 1
READ_BL_LEN=15, C_SIZE_MULT=7, C_SIZE=3453
size = 2329935872
SD Card detected RCA: 0x2 type: SD
MINI2440 # fatload mmc 0:1 0x31000000 rootfsjffs2
reading rootfsjffs2

2097152 bytes read
MINI2440 # nand write.jffs2 0x31000000 root ${filesize}

NAND write: device 0 offset 0x560000, size 0x200000

Writing data at 0x75f800 -- 100% complete.
 2097152 bytes written: OK
MINI2440 # printenv
bootdelay=3
baudrate=115200
ethaddr=08:08:11:18:12:27
ipaddr=10.0.0.111
serverip=10.0.0.4
netmask=255.255.255.0
usbtty=cdc_acm
mtdparts=mtdparts=mini2440-nand:256k@0(u-boot),128k(env),5m(kernel),-(root)
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
bootargs=console=ttySAC0,115200 noinitrd init=/sbin/init mini2440=0tb
root=/dev/mtdblock3 rootfstype=jffs2
bootcmd=nboot.e kernel ; bootm
partition=nand0,0
mtddevnum=0
mtddevname=u-boot
filesize=200000

davef
Yup, the same davef.  Cut my teeth on the ATmega32 and still use it for
serious I/O and peripherals.  It is so easy c.f. the ARM!

First, the procedure I based my tutorial on is the 64M machine.  You need
the right version of u-boot for the 256M machine.  Search around here and
at:
http://billforums.station51.net/
for the drama people have had to go through to get u-boot working on the
bigger mini2440s.  On second thought it does appear you have realised this.

*****
Supervivi> load ram 0x31000000 250000 u
USB host is connected. Waiting a download.

Now, Downloading [ADDRESS:31000000h,TOTAL:246174]
RECEIVED FILE SIZE:  246174 (240KB/S, 1S)
Downloaded file at 0x31000000, size = 246164 bytes
*****

This doesn't not look right.  Where did you get 250000 from?  Perhaps if
this number is bigger than required you are OK.

First I'd try < load ram 0x31000000 246164 u then read what other people
really had to do!

I imagine you set your environment variables somewhere, see the last few
steps in the tutorial @ narnia

Could you try the rootfs in the tutorial @ narnia first?  


From my tutorial:

Make your rootfs.jffs2 image

[mini2440-bootstrap] # mkfs.jffs2 –lqnp –e 16 –r target –o
output/my_rootfs.jffs2

You do know the 16 will be different for the 256Mflash?

HTH.

Cheers,
davef

Wrightflyer
Dave,

Then you'll know me as "clawson" on Freaks ;-)

As for the 250000. I just picked it out of the air. The guide I followed
had that figure as something like 239000 but the u-boot.bin I was trying to
use was (as you see above) 246164 so to save typing I just rounded that up
to 250000

And no, I hadn't realised all the implications of the differing Nand size.
So it looks like I probably cannot just take existing rootfs images and
hope to bolt them in but must build one specifically.

I had tried to build my own YAFFS rather than JFFS (and set the rootfstype=
accordingly and the "nand write.yaffs") but it looks like I need to
concentrate on making/using JFFS2 instead.

Cliff

Wrightflyer
PS to be honest, to just get the machine running again I may just get it to
mount the MMC with an EXT3 image as rootfs and worry about getting things
into Nand later. (clearly the kernel itself is happy the way I'm writing
it).

davef
Cliff,

Maybe something here:
http://processors.wiki.ti.com/index.php?title=Filesystem_in_NOR_or_NAND

I find TI good for tutorials.

The mini2440 was my introduction to the Linux and ARM world.  A year later
I can say it was a steep learning curve c.f. the AVR series AND there would
still be a LONG way to go for me to become reasonably competent.  

Good luck with your ARM adventure.

Cheers,
Dave

Wrightflyer
Dave,

I finally solved it. The problem was the kernel. I was using a pre-built
u-image (I think it was the one from
http://labs.kernelconcepts.de/Projects/Micro2440/#Downloads - which is the
site given in the "guide" at Narnia). It was a 2.6.29 vintage kernel. I
finally bit the bullet and used the file-download.sh on your guide and then
built that kernel (the one from git://repo.or.cz/linux-2.6/mini2440.git -
that is "buserror"s latest) to build a 2.6.32 and that does match with the
JFFS2 I have built. The rootfs mounts and I get a login console.

Thank God!

Cliff

Wrightflyer
Oh bugger,

Now my /dev/adc, /dev/leds, /dev/pwm and other S3C specific drivers have
disappeared. Are these created by mdev from the details in /etc/mdev.conf?
My kernel boot doesn't have the "buttons initialized" (etc.) output ?!?

Cliff

davef
Cliff,

You just exceeded my knowledge base :(

Dave