digital-domain.net
Running Fedora 14 on the SheevaPlug from a SD card
This SheevaPlug has the following specs:
- 1.2GHz Marvel Kirkwood ARM processor
- 512MB RAM
- 512MB NAND Flash
- 1 x Gigabit ethernet interface
- 1 x eSATA port
- 1 x SD card slot
- 1 x USB 2.0 port
- 1 x mini USB serial console port
Upgrade u-boot
Follow the instructions here.
In addition to the above, you should set and save the following:
Marvell> setenv mainlineLinux yes
Marvell> setenv arcNumber 2097
Marvell> saveenv
Prep the SD card
I'm not using swap and just created a single partition on the card:
/dev/mmcblk0p1
Create a filesystem on the card. I'm using ext4.
# mkfs.ext4 -L fedoraarm /dev/<sd_card_root>
Prevent periodic fsck's at mount.
# tune2fs -c 0 /dev/<sd_card_root>
Next put the Fedora 14 rootfs onto the card. You can get the rootfs from here.
# cd /mnt/<sd_card_root>
# tar -xvpf /path/to/f14-rootfs-2011-06-23.tar.bz2
Next:
- Grab current kernel images/modules from here.
- Put the config, uImage and System.map into
/boot on the sd card.
- Untar the modules from the root of the sd card.
Booting Fedora
Put the SD card into the SheevaPlug.
From the u-boot/Marvell prompt load the kernel image into memory, there are
numerous ways of doing this. We'll use tftp.
Marvell> setenv serverip 192.168.1.2
Marvell> setenv ipaddr 192.168.1.3
Marvell> tftpboot 0x6400000 sheeva-3.0.4-uImage
Change the above accordingly.
From here we can write the kernel image into the NAND.
Marvell> nand erase 0x100000 0x400000
Marvell> nand write 0x6400000 0x100000 0x400000
WARNING: Using the wrong values
here can render your device un-bootable.
See
here for a means to fix it.
You can elect to not write the kernel to NAND here and instead write it from
under Linux once booted.
Set the various boot environment variables.
Marvell> setenv bootargs_console console=ttyS0,115200
Marvell> setenv bootargs_root 'root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait'
If you wrote the kernel into NAND as above, then you can also do this:
Marvell> setenv bootcmd 'setenv bootargs $(bootargs_console) $(bootargs_root); nand read 0x6400000 0x100000 0x400000; bootm 0x6400000'
If not, then do this:
Marvell> setenv bootcmd 'setenv bootargs $(bootargs_console) $(bootargs_root); bootm 0x6400000'
Then
Marvell> saveenv
Marvell> boot
Once booted. If you didn't write the kernel into NAND above, then do it here:. You'll need the mtd-utils package.
# flash_eraseall /dev/mtd1
# nandwrite -p /dev/mtd1 /boot/sheeva-3.0.4-uImage
WARNING: You should double check
that /dev/mtd1 is the uImage partition, by
inspecting the contents of /proc/mtd
You should then go back to u-boot and set the first bootcmd variable and save it.
Useful links
Andrew Clayton; Sun Oct 2, 2011