From 60eb2616ed83209b8e46aba14c19814ab4f4c1c6 Mon Sep 17 00:00:00 2001 From: ficus Date: Thu, 4 Oct 2012 16:13:54 +0200 Subject: sd card refactor --- freedom-maker/bin/copy2dream | 47 --------------------- freedom-maker/flashing-notes | 28 ------------ .../source/boot/uboot.2012.04.01-2_armel.elf | Bin 0 -> 228948 bytes .../source/boot/uboot.2012.04.01-2_armel.kwb | Bin 0 -> 196076 bytes freedom-maker/source/boot/uboot.env | 8 ++++ 5 files changed, 8 insertions(+), 75 deletions(-) delete mode 100644 freedom-maker/bin/copy2dream delete mode 100644 freedom-maker/flashing-notes create mode 100644 freedom-maker/source/boot/uboot.2012.04.01-2_armel.elf create mode 100644 freedom-maker/source/boot/uboot.2012.04.01-2_armel.kwb create mode 100644 freedom-maker/source/boot/uboot.env (limited to 'freedom-maker') diff --git a/freedom-maker/bin/copy2dream b/freedom-maker/bin/copy2dream deleted file mode 100644 index 267c2b6..0000000 --- a/freedom-maker/bin/copy2dream +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh -# -# this script assumes the current root filesystem is the source, and the -# internal microSD on a DreamPlug is the target .. all existing content on -# the microSD card will be lost. -# - -# partition microSD card inside DreamPlug -echo "=> partition internal microSD card" -parted -s /dev/sda mklabel msdos -parted -s /dev/sda mkpart primary fat16 0 128 -parted -s /dev/sda mkpart primary ext2 128 100% - -# create filesystems on new partitions -echo "=> create filesystems on internal microSD card" -mkdosfs /dev/sda1 -mke2fs -j /dev/sda2 - -echo "=> mount target partitions" -mount /dev/sda2 /media -mkdir -p /media/boot -mount /dev/sda1 /media/boot - -echo "=> copy filesystem content from USB stick to target partitions" -(cd / ; tar cpSf - `/bin/ls | grep -v boot | grep -v proc | grep -v sys | grep -v media | grep -v dev`) | (cd /media ; tar xpf -) -# the following intentionally ignores subdirectories -cp /boot/* /media/boot/ - -echo "=> touch up target root partition" -mkdir /media/proc /media/sys /media/media /media/dev -mknod /media/dev/console c 5 1 -mknod /media/dev/random c 1 8 -mknod /media/dev/urandom c 1 9 -mknod /media/dev/null c 1 3 -mknod /media/dev/ptmx c 5 2 - -# patch up /etc/fstab entry for /boot -sed -e 's/sdc/sda/g' < /etc/fstab > /media/etc/fstab - -# flash the kernel and create the device's keys -chroot /media /etc/init.d/first-run - -echo "unmount target partitions" -umount /dev/sda1 -umount /dev/sda2 - -echo "=> installation complete, see docs to boot from internal microSD" diff --git a/freedom-maker/flashing-notes b/freedom-maker/flashing-notes deleted file mode 100644 index def3f61..0000000 --- a/freedom-maker/flashing-notes +++ /dev/null @@ -1,28 +0,0 @@ -Jason says: - - Sort of. The openocd config for the sheevaplug/guruplug is what I use, - and is distributed on the dreamplug download page [1]. It does _not_ - have support for the SPI flash. You can also use the sheevaplug.cfg - shipped with openocd. So, I use openocd or tftp to transfer to RAM, - then use u-boot to write to flash. - - To test images, or to reflash, I load the known-good u-boot into RAM via - openocd, then I'll either reflash it or load a new testing one from - there. - - To write a u-boot.kwb test image to flash, here is what I do: - - openocd$ sheevaplug_init - openocd$ load_image u-boot # known good from Marvell - openocd$ load_image u-boot.kwb 0x00800000 # monster I created - openocd$ resume 0x00600000 # run the known good - - then, in u-boot - - u-boot$ sf probe 0 - u-boot$ sf erase 0x0 0x100000 - u-boot$ sf write 0x00800000 0x0 0x100000 - - If time allows, I'd like to add SPI flash support to OpenOCD. - Unfortunately, time is short and the above process works. - diff --git a/freedom-maker/source/boot/uboot.2012.04.01-2_armel.elf b/freedom-maker/source/boot/uboot.2012.04.01-2_armel.elf new file mode 100644 index 0000000..ab58a26 Binary files /dev/null and b/freedom-maker/source/boot/uboot.2012.04.01-2_armel.elf differ diff --git a/freedom-maker/source/boot/uboot.2012.04.01-2_armel.kwb b/freedom-maker/source/boot/uboot.2012.04.01-2_armel.kwb new file mode 100644 index 0000000..c524936 Binary files /dev/null and b/freedom-maker/source/boot/uboot.2012.04.01-2_armel.kwb differ diff --git a/freedom-maker/source/boot/uboot.env b/freedom-maker/source/boot/uboot.env new file mode 100644 index 0000000..06cb618 --- /dev/null +++ b/freedom-maker/source/boot/uboot.env @@ -0,0 +1,8 @@ +setenv baudrate 115200 +setenv bootcmd '${x_bootcmd_usb}; ${x_bootcmd_kernel}; ${x_bootcmd_initrd}; setenv bootargs ${x_bootargs} ${x_bootargs_root} ${x_bootargs_console}; bootm 0x6400000 0x6900000;' +setenv x_bootargs_console 'ttyS0,115200' +setenv x_bootargs_root 'root=/dev/sdb2 rootdelay=10' +setenv x_bootcmd_initrd 'fatload usb 1:1 0x6900000 uInitrd' +setenv x_bootcmd_kernel 'fatload usb 1:1 0x6400000 uImage' +setenv x_bootcmd_usb 'usb start' +saveenv -- cgit v1.2.3