This is sort of an announcement and perhaps a query to Robert Nelson to see
if he could
incorporate this in his "Demo Image" distribution
at http://elinux.org/BeagleBoardDebian
I'm using his setup_sdcard.sh shell script with some changes; the diffs are
below. I also
diddled with his uEnv.txt file.
I ran his setup_sdcard.sh script with the drive connected to my laptop
running debian.
It does all the usual stuff but does it on a usb hard drive instead of an
SD flash card.
I ran it as root with
./setup_sdcard.sh --mmc /dev/sdb --uboot bone
The changes to the setup_sdcard.sh script are to add a swap partition,
change the root
partition from mmcblk0p2 to /dev/sda3, take out the noatime option for the
root partition,
add an entry for the swap partition to /etc/fstab, and for debugging
purposes my version
of the script has verbose turned off on the tars. There wasn't an
obviously nice place to
put the mkswap call so I just jammed it into where the root filesystem is
initialized.
It may seem weird to some to have the swap partition in front of the root
partition but for
minimizing head movement it might be a better location. But I put it there
because it
made the partitioning straightforward.
After running the script with a hard drive all that's left to do is tweak
the uEnv.txt file on the
hard drive's DOS partition and then copy it to the DOS partition on the
flash card.
I couldn't have done this without the help from William Herman's The
EmbeddedHobbyist
web page, and with Robert Nelson's highly modular setup_sdcard.sh script.
A big thanks
to William and Robert.
===> setup_sdcard.sh diffs <===
475c475,476
< ${conf_boot_startmb},${conf_boot_endmb},${sfdisk_fstype},*
---
> ${conf_boot_endmb},${conf_boot_endmb},${sfdisk_fstype},*
> ,1000,S
502c503
< echo "LC_ALL=C mkfs.${ROOTFS_TYPE} ${media_prefix}2 ${ROOTFS_LABEL}"
---
> echo "LC_ALL=C mkfs.${ROOTFS_TYPE} ${media_prefix}3 ${ROOTFS_LABEL}"
517c518
< LC_ALL=C mkfs.${ROOTFS_TYPE} ${media_prefix}2 -L ${ROOTFS_LABEL} ||
format_partition_error
---
> LC_ALL=C mkfs.${ROOTFS_TYPE} -q ${media_prefix}3 -L ${ROOTFS_LABEL}
|| format_partition_error
518a520,521
>
> LC_ALL=C mkswap ${media_prefix}2
732c735
< tar xfvo "${DIR}/${DTBS_FILE}" -C
${TEMPDIR}/disk/dtbs
---
> tar xfo "${DIR}/${DTBS_FILE}" -C
${TEMPDIR}/disk/dtbs
734c737
< tar xfv "${DIR}/${DTBS_FILE}" -C
${TEMPDIR}/disk/dtbs
---
> tar xf "${DIR}/${DTBS_FILE}" -C ${TEMPDIR}/disk/dtbs
825c828
< if ! mount -t ${ROOTFS_TYPE} ${media_prefix}2 ${TEMPDIR}/disk; then
---
> if ! mount -t ${ROOTFS_TYPE} ${media_prefix}3 ${TEMPDIR}/disk; then
827c830
< echo "Unable to mount ${media_prefix}2 at ${TEMPDIR}/disk
to complete populating rootfs Partition"
---
> echo "Unable to mount ${media_prefix}3 at ${TEMPDIR}/disk
to complete populating rootfs Partition"
842c845
< tar --numeric-owner --preserve-permissions
--verbose -${DECOM} "${DIR}/${ROOTFS}" -C ${TEMPDIR}/disk/
---
> tar --numeric-owner --preserve-permissions
-${DECOM} "${DIR}/${ROOTFS}" -C ${TEMPDIR}/disk/
863c866,867
< echo "/dev/mmcblk0p2 / ${ROOTFS_TYPE}
noatime,errors=remount-ro 0 1" >> ${TEMPDIR}/disk/etc/fstab
---
> echo "/dev/sda3 / ${ROOTFS_TYPE}
errors=remount-ro 0 1" >> ${TEMPDIR}/disk/etc/fstab
> echo "/dev/sda2 none swap sw
0 0" >> ${TEMPDIR}/disk/etc/fstab
1023c1027
< SPACE_LEFT=$(df ${TEMPDIR}/disk/ | grep ${media_prefix}2 |
awk '{print $4}')
---
> SPACE_LEFT=$(df ${TEMPDIR}/disk/ | grep ${media_prefix}3 |
awk '{print $4}')
===> uEnv.txt diffs <===
21c21,23
< mmcroot=/dev/mmcblk0p2 ro
---
> bootdev=0:1
>
> mmcroot=/dev/sda3 ro
24,26c26,28
< loadkernel=load mmc ${mmcdev}:${mmcpart} 0x80300000 ${kernel_file}
< loadinitrd=load mmc ${mmcdev}:${mmcpart} 0x81600000 ${initrd_file};
setenv initrd_size ${filesize}
< loadfdt=load mmc ${mmcdev}:${mmcpart} 0x815f0000 /dtbs/${fdtfile}
---
> loadkernel=load usb ${bootdev} 0x80300000 ${kernel_file}
> loadinitrd=load usb ${bootdev} 0x81600000 ${initrd_file}; setenv
initrd_size ${filesize}
> loadfdt=load usb ${bootdev} 0x815f0000 /dtbs/${fdtfile}
34c36
< uenvcmd=run boot_ftd; run device_args; bootz 0x80300000
0x81600000:${initrd_size} 0x815f0000
---
> uenvcmd=usb start; run boot_ftd; run device_args; bootz 0x80300000
0x81600000:${initrd_size} 0x815f0000
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.