Skip to content

Instantly share code, notes, and snippets.

@danfragoso
Created October 3, 2017 15:03
Show Gist options
  • Save danfragoso/7ddd0ab36b1f52fd5e56a7d9b8ce4e05 to your computer and use it in GitHub Desktop.
Save danfragoso/7ddd0ab36b1f52fd5e56a7d9b8ce4e05 to your computer and use it in GitHub Desktop.
This script will boot an Edison board with the Root Filesystem on an external storage medium (SD CARD, mounted at '/dev/mmcblk1p1').
: '
DrFarm 2017
This script will boot an Edison board with the Root Filesystem on an external
storage medium (SD CARD, mounted at '/dev/mmcblk1p1').
'
echo 'Intel Edison SD Boot'
fw_setenv mmc-bootargs 'setenv bootargs root=${myrootfs} rootdelay=3 rootfstype=ext4 ${bootargs_console} ${bootargs_debug} systemd.unit=${bootargs_target}.target hardware_id=${hardware_id} g_multi.iSerialNumber=${serial#} g_multi.dev_addr=${usb0addr}'
fw_setenv myrootfs_sdcard '/dev/mmcblk1p1'
UUID=$(fw_printenv uuid_rootfs | cut -c '13-999')
fw_setenv myrootfs_emmc "PARTUUID="$UUID
fw_setenv myrootfs '/dev/mmcblk1p1'
fw_setenv do_boot_emmc 'setenv myrootfs ${myrootfs_emmc}; run do_boot'
fw_setenv do_boot_sdcard 'setenv myrootfs ${myrootfs_sdcard}; run do_boot'
echo 'rebooting'
reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment