[armedslack] Help deciding which bits of mtd-utils to include in the installer

Stuart Winter m-lists at biscuit.org.uk
Mon Sep 7 11:16:43 UTC 2009


> > ARM won't yet support installation to flash/NAND, I know there are some
> > people who'd want to do it.
> >
> What type of devices you plan to address?

How many are there?
I thought that the mtd-utils are able to work with the NAND flash devices,
so I thought as a minimum I'd include:
usr/sbin/nandwrite
usr/sbin/flash_eraseall

On The Sheevaplug these mtd devices show as:
root at stokely:~# mtdinfo
Count of MTD devices:           3
Present MTD devices:            mtd0, mtd1, mtd2
Sysfs interface supported:      yes
root at stokely:~#

root at stokely:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00020000 "u-boot"
mtd1: 00400000 00020000 "uImage"
mtd2: 1fb00000 00020000 "root"
root at stokely:~#

And I can mount them as block devices:
root at stokely:~# mount /dev/mtdblock2 /mnt/floppy/ -t jffs2
root at stokely:~# ls /mnt/floppy/
bin/  boot/  dev/  etc/  home/  lib/  media/  mnt/  opt/  proc/  root/
sbin/  selinux/  srv/  sys/  tmp/  usr/  var/
root at stokely:~#

> Concerning the NSLU2, I only access the mtd block devices, detected
> directly by the kernel by the MTD drivers (attached my config for NSLU2,
> kernel 2.6.7.4). To flash the kernel and the initrd, I grabbed a script
> from debian. There is some magic FIS decoding to calculate some offsets
> but this is particular to the NSLU2. He is a modified debian script,
> works only for flashing my custom kernel, only for NSLU2 (I did not
> update it for other devices). I commented out the annoying things (dpkg
> calls), and hardcoded values, it works...

Ah that's interesting.

I'm only going to support the hardware that ARMedslack provides kernels
for, which would be the SheevaPlug at the moment (I won't get into the ARM
versatile board).  The point of this excercise was to provide useful tools
to work with the onboard NAND for people who are installing onto the
SheevaPlug, but who wanted to put the Kernel or to install onto the NAND
rather than a USB device.

I would like to provide the ability to flash the kernel & initrd to
NAND on the Sheevaplug so that we can avoid u-boot's flaky USB support;
but the challenge would be that the user would have to update offsets
in the u-boot boot parameters manually.

I think I'll put this idea on the back burner for a while :-)

-- 
Stuart Winter
Slackware ARM: www.armedslack.org




More information about the ARMedslack mailing list