-
Notifications
You must be signed in to change notification settings - Fork 6
Making the SD Card
Louis Thiery edited this page Aug 20, 2014
·
6 revisions
The SD card has 3 partitions:
- boot partition used when you hold down S2
- root partition to be flashed over to eMMC when you hold down S2
- data partition to be mounted on /var/lib/couchdb
It holds normal boot information, but also the trigger file (flash-eMMC.txt) and a board specific script for the flasher (SOC.sh). It is identical to what we would want on the eMMC's boot partition, except we don't want the trigger file.
The root partition is the most recent ArchLinux distribution that has been configured by our installer script.
In addition, we've added Robert Nelson explaining how this works, which require a few additional systemd processes:
- boot.service: mounts "this" media's boot partition; when we boot from SD card and it is the SD card one which has the trigger file
- emmc.service: starts a series of scripts:
- /etc/init.d/boot_scripts.sh: This script takes care of a few generic tasks, setting the clock, regenerating ssh keys, before calling the board specific script below
- /boot/uboot/SOC.sh (requires boot.service): It takes care of flashing blank eeprom, getting the mac address, setting up the gadget drivers, enablng the local dhcp server, calling the flasher.sh script, and finishing the microSD resize when needed.
- /opt/scripts/boot/am335x_evm.sh: it takes care of flashing blank eeprom, getting the mac address, setting up the gadget drivers, enablng the local dhcp server, calling the flasher.sh script, and finishing the microSD resize when needed.
- /opt/scripts/tools/beaglebone-black-eMMC-flasher.sh
/opt/scripts/tools/eMMC/beaglebone-black-make-microSD-flasher-from-eMMC.sh
You might want to manually go to /var/lib/couchdb and rm all files there, bc the above seems to leave traces of old partitions.