Source code for the "Casu firmware" running on a Beaglebone.
Point the environment variable CROSS_ENV_ROOT to the root of your crosscompiling environment (i.e., the place where you have copied the relevant parts of the Beaglebone filesystem :)
Use the standard cmake build procedure, using the provided toolchain file. From the top-level directory:
$ mkdir build-arm
$ cd build-arm
$ cmake .. -DCMAKE_TOOLCHAIN_FILE=Toolchain-arm-linux-gnueabihf.cmake
$ make
Below is the full backup and restore procedure. Depending on your use-case, only some steps may apply.
Insert the SD card. Check the mount point locations using the df command. Assuming that the internal flash memory (i.e., the device where / is mounted) is located at /dev/mmcblk1 and the SD is at /dev/mmcblk0, backing up is performed using the following command:
sudo dd if=/dev/mmcblk1 of=/dev/mmcblk0 bs=4M
TODO: check if sudo is really necessary TODO: check additional options for the case where we're backing up to an SD card which is larger than the BeagleBone's internal memory
By default, no progress is displayed on Ubuntu 14.04. To display the current status of the dd process, send the following signal:
sudo kill -USR1 $(pgrep ^dd)
On ubuntu 16.04 the option status=progress will display the progress.
sudo dd if=/dev/mmcblk0 | gzip > filename.gz
Image backups are available for download here.
Insert the SD card into the BeagleBone. Boot from the SD card by holding the "User" button down while powering the BeagleBone (the cape needs to be removed for accessing the "User" button). Restore the image from the SD card to the BeagleBone's internal memory (check which device is which using df)
sudo dd if=/dev/mmcblk0 of=/dev/mmcblk` bs=4M
If the SD card is larger than the BeagleBone's internal memory, you might get a "Not enough space on the device" error which can be safely ignored.
The following steps are necessary to configure the Beaglebone
- Assign the appropriate IP adress in
/etc/network/interfaces(from the10.42.0.1xxrange) - configure the hostnames in
/etc/hosts - update (and rebuild) the firmware
- provide the appropriate
.fbcfiles - install the appropriate script and systemd service to start the appropriate firmware