I run ArchLinux ARM on my BBB from the on board eMMC. I create a microSD image on another ARM Linux system (a PogoPlug). I have a series of three scripts: Script1 partitions/formats the microSD card, Script 2 installs the ArchLinux files on the microSD card, Script 3 I execute on the BBB once I've booted the BBB with the microSD I just prepared. There are some custom/unique items on my scripts (e.g., to run Script 2 it assume the Script 3 file called "bbb-make-emmc-arch.sh" is actually on your Linux system so it can be copied to the microSD card and executed as the last step), but there is still helpful information for folks who may want to run ArchLinux ARM (or even other flavors of Linux) on the BBB's onboard eMMC.
Script 1 - Partition/Format the microSD card: # bbb-fdisk-sd.sh # This script is used to create a new (clean) install of ArchLinux to the BeagleBoneBlack's # onboard eMMC memory. This script assumes you have booted the BeagleBoneBlack (not using # the onboard eMMC) and now want to install ArchLinux in the onboard eMMC memory. BOOTLOADER=BeagleBone-bootloader.tar.gz ARCHLINUX=ArchLinuxARM-am33x-latest.tar.gz WORKINGDIR=/tmp BOOTDEV=/dev/mmcblk1p1 BOOTTMP=$WORKINGDIR/boot ROOTDEV=/dev/mmcblk1p2 ROOTTMP=$WORKINGDIR/root BOOTIMAGE=$ROOTTMP/boot/zImage clear while true do echo "You need the mkfs.vfat format and wget commands." echo "Use pacman -Sy wget AND pacman -Sy dosfstools (for vfat format)." echo read -p "Are these two commands installed (answer yes or no)? " ANSWER case $ANSWER in yes) break;; no) exit;; *) echo "ERROR: Please answer yes or no.";; esac done mkfs.vfat -F 16 -n "bootloader" $BOOTDEV sleep 1 mkfs.ext4 -L "rootfs" $ROOTDEV sleep 1 mkdir $BOOTTMP mkdir $ROOTTMP mount $BOOTDEV $BOOTTMP mount $ROOTDEV $ROOTTMP wget http://archlinuxarm.org/os/omap/$BOOTLOADER -O $WORKINGDIR/$BOOTLOADER sleep 1 wget http://archlinuxarm.org/os/$ARCHLINUX -O $WORKINGDIR/$ARCHLINUX sleep 1 if which pv &> /dev/null then pv $WORKINGDIR/$BOOTLOADER | tar xzf - -C $BOOTTMP pv $WORKINGDIR/$ARCHLINUX | tar xzf - -C $ROOTTMP else tar xvf $WORKINGDIR/$BOOTLOADER -C $BOOTTMP tar xvf $WORKINGDIR/$ARCHLINUX -C $ROOTTMP fi echo "Copying Boot Image" cp $BOOTIMAGE $BOOTTMP echo "Synching" sync umount $BOOTTMP umount $ROOTTMP rmdir $BOOTTMP rmdir $ROOTTMP clear while true do read -p "Delete downloaded files (answer yes or no)? " ANSWER case $ANSWER in yes) rm $WORKINGDIR/$BOOTLOADER rm $WORKINGDIR/$ARCHLINUX exit ;; no) exit;; *) echo "ERROR: Please answer yes or no.";; esac done Script 2 - Install the applicable ArchLinux files on the microSD card: # bbb-make-sd-arch.sh # This script is used to create a new (clean) install of ArchLinux for the BeagleBone or # BeagleBoneBlack on a microSD card. Verify your media devices before you proceed. This # script assumes your media device is /dev/sd?. Ensure you have partitioned (fdisk) your # media before proceeding. You will need two partitions. The first partition does not need # to be large, but needs to be set to bootable and must be type 'e' which is FAT 16. # The second partition is a normal Linux partition, probably ext4. If you can't mkfs.vfat, # download the dosfstools (pacman -Sy dosfstools). clear DEVICELIST=`ls /dev/sd? 2> /dev/null | sed s:/dev/::` if [ -z "${DEVICELIST}" ]; then echo "ERROR: No /dev/sd? devices" exit fi echo Device Choices: $DEVICELIST echo while true do read -p "Enter device name: " DEVICECHOICE if echo "$DEVICECHOICE" | grep -q "$DEVICELIST" then break else echo "ERROR: You entered an invalid device name." fi done echo while true do read -p "Are you sure you want to use /dev/$DEVICECHOICE (answer yes or no)? " ANSWER case $ANSWER in yes) break;; no) exit;; *) echo "ERROR: Please answer yes or no.";; esac done BOOTLOADER=BeagleBone-bootloader.tar.gz ARCHLINUX=ArchLinuxARM-am33x-latest.tar.gz WORKINGDIR=. BOOTDEV=/dev/$DEVICECHOICE'1' BOOTTMP=$WORKINGDIR/boot ROOTDEV=/dev/$DEVICECHOICE'2' ROOTTMP=$WORKINGDIR/root BOOTIMAGE=$ROOTTMP/boot/zImage BBBSCRIPT=/home/public/bbb-make-emmc-arch.sh mkfs.vfat -F 16 -n "bootloader" $BOOTDEV sleep 1 mkfs.ext4 -L "rootfs" $ROOTDEV sleep 1 mkdir $BOOTTMP mkdir $ROOTTMP mount $BOOTDEV $BOOTTMP mount $ROOTDEV $ROOTTMP wget http://archlinuxarm.org/os/omap/$BOOTLOADER -O $WORKINGDIR/$BOOTLOADER sleep 1 wget http://archlinuxarm.org/os/$ARCHLINUX -O $WORKINGDIR/$ARCHLINUX sleep 1 if which pv &> /dev/null then pv $WORKINGDIR/$BOOTLOADER | tar xzf - -C $BOOTTMP pv $WORKINGDIR/$ARCHLINUX | tar xzf - -C $ROOTTMP else tar xvf $WORKINGDIR/$BOOTLOADER -C $BOOTTMP tar xvf $WORKINGDIR/$ARCHLINUX -C $ROOTTMP fi echo "Copying Boot Image" cp $BOOTIMAGE $BOOTTMP echo "Copying" $BBBSCRIPT "script to /" cp $BBBSCRIPT / echo "Synching" sync umount $BOOTTMP umount $ROOTTMP rmdir $BOOTTMP rmdir $ROOTTMP clear echo "Upload Complete" echo while true do read -p "Delete downloaded files (answer yes or no)? " ANSWER case $ANSWER in yes ) rm $WORKINGDIR/$BOOTLOADER rm $WORKINGDIR/$ARCHLINUX exit ;; no ) exit;; * ) echo "ERROR: Please answer yes or no.";; esac done Script 3 - Script to execute on the BBB after you have booted from the microSD card: # bbb-make-emmc-arch.sh # This script is used to create a new (clean) install of ArchLinux ARM to the BeagleBone Black's # onboard eMMC storage. This script assumes you have booted the BeagleBone Black using a microSD # card with the appropriate ArchLinux ARM files and now want to install ArchLinux in the onboard # eMMC memory. BOOTLOADER=BeagleBone-bootloader.tar.gz ARCHLINUX=ArchLinuxARM-am33x-latest.tar.gz WORKINGDIR=/tmp BOOTDEV=/dev/mmcblk1p1 BOOTTMP=$WORKINGDIR/boot ROOTDEV=/dev/mmcblk1p2 ROOTTMP=$WORKINGDIR/root BOOTIMAGE=$ROOTTMP/boot/zImage clear while true do echo "You need the mkfs.vfat format and wget commands." echo "Use pacman -Sy wget AND pacman -Sy dosfstools (for vfat format)." echo read -p "Are these two commands installed (answer yes or no)? " ANSWER case $ANSWER in yes) break;; no) exit;; *) echo "ERROR: Please answer yes or no.";; esac done mkfs.vfat -F 16 -n "bootloader" $BOOTDEV sleep 1 mkfs.ext4 -L "rootfs" $ROOTDEV sleep 1 mkdir $BOOTTMP mkdir $ROOTTMP mount $BOOTDEV $BOOTTMP mount $ROOTDEV $ROOTTMP wget http://archlinuxarm.org/os/omap/$BOOTLOADER -O $WORKINGDIR/$BOOTLOADER sleep 1 wget http://archlinuxarm.org/os/$ARCHLINUX -O $WORKINGDIR/$ARCHLINUX sleep 1 if which pv &> /dev/null then pv $WORKINGDIR/$BOOTLOADER | tar xzf - -C $BOOTTMP pv $WORKINGDIR/$ARCHLINUX | tar xzf - -C $ROOTTMP else tar xvf $WORKINGDIR/$BOOTLOADER -C $BOOTTMP tar xvf $WORKINGDIR/$ARCHLINUX -C $ROOTTMP fi echo "Copying Boot Image" cp $BOOTIMAGE $BOOTTMP echo "Synching" sync umount $BOOTTMP umount $ROOTTMP rmdir $BOOTTMP rmdir $ROOTTMP clear while true do read -p "Delete downloaded files (answer yes or no)? " ANSWER case $ANSWER in yes) rm $WORKINGDIR/$BOOTLOADER rm $WORKINGDIR/$ARCHLINUX exit ;; no) exit;; *) echo "ERROR: Please answer yes or no.";; esac done -- 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/d/optout.
