Skip to content
Snippets Groups Projects
Commit 5906870e authored by Bob Mottram's avatar Bob Mottram
Browse files

Support booting beaglebone from external rootfs

parent 66a19288
No related branches found
No related tags found
No related merge requests found
......@@ -40,6 +40,10 @@ enable_serial_console() {
beaglebone_setup_boot() {
beaglebone_variant="$1"
beaglebone_root_device='mmcblk0p2'
if [ "$2" ]; then
beaglebone_root_device="$2"
fi
# Setup uEnv.txt
if grep -q btrfs /etc/fstab ; then
......@@ -60,7 +64,7 @@ beaglebone_setup_boot() {
# uEnv.txt for Beaglebone
# based on https://github.com/beagleboard/image-builder/blob/master/target/boot/beagleboard.org.txt
cat >> /boot/uEnv.txt <<EOF
mmcroot=/dev/mmcblk0p2 ro
mmcroot /dev/${beaglebone_root_device} ro
mmcrootfstype=$fstype rootwait fixrtc
mmcrootflags=subvol=@
......@@ -308,19 +312,19 @@ EOF
case "$MACHINE" in
beagleboneblack)
beaglebone_setup_boot am335x-boneblack
beaglebone_setup_boot am335x-boneblack "$EXTERNAL_DRIVE"
beaglebone_flash "TI AM335x BeagleBone Black"
beaglebone_repack_kernel am335x-boneblack
enable_serial_console ttyO0
;;
beaglebonegreen)
beaglebone_setup_boot am335x-bonegreen
beaglebone_setup_boot am335x-bonegreen "$EXTERNAL_DRIVE"
beaglebone_flash "TI AM335x BeagleBone Green"
beaglebone_repack_kernel am335x-bonegreen
enable_serial_console ttyO0
;;
beaglex15)
beaglebone_setup_boot am57xx-beagle-x15
beaglebone_setup_boot am57xx-beagle-x15 "$EXTERNAL_DRIVE"
beaglebone_flash "TI AM5728 BeagleBoard-X15"
beaglebone_repack_kernel am57xx-beagle-x15
enable_serial_console ttyO0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment