Writing images to microSD
There are several ways to write the rootfs and kernel image created by Yocto to a bootable disk. The type of image and how it is written to disk affects the boot process in subtle ways, therefore it is recommended to use a single method: mkefidisk.sh in meta-oim/scripts.
If you don’t have a linux machine available to write the disk, then UNetbootin (for Windows or MacOS) can be used; see the description at the end of this document. Note that mkefidisk.sh is unlikely to work inside a VM.
mkefidisk (Recommended)
The following incantation is suitable for writing to a microSD card on Linux:
sudo ../meta-oim/scripts/mkefidisk.sh /dev/sdX tmp/deploy/images/genericx86-64/openivi-image-genericx86-64.iso /dev/mmcblk0
If the SOTA_TOML environment variable is set, then mkefidisk will copy that file into /etc/sota.toml, provisioning the machine at image creation time. Since sudo squashes environment variables by default, the value of SOTA_TOML needs to be passed in explicitly:
sudo SOTA_TOML=/tmp/mysota.toml ../meta-oim/scripts/mkefidisk.sh /dev/sdX tmp/deploy/images/genericx86-64/openivi-image-genericx86-64.iso /dev/mmcblk0
Provisioning options
There are 4 ways to provision sota_client:
-
Ethernet MAC address based - traditional
-
sota.toml stored in efivars - First get the sota.toml onto the device, then run
ota-plus-demo-provision sota.toml
to save it in EFI. ota-plus-demo-provision will read from there even after the SD card has been reflashed. -
mkefidisk.sh - As above, passed via the
SOTA_TOML
environment variable. -
Plug in a fat32 formatted USB pen drive with the label 'PROVISION' containing a
sota.toml
file in the root directory. Theusb-key-provision
package will automatically copy this to/etc
and restart SOTA Client.
If /etc/sota.toml
exists, then provisioning based on Ethernet MAC address or EFI variables will not be run. This means that changes made manually or by inserting a USB pen drive will stick.
UNetbootin (Backup)
As a backup, UNetbootin can be used to write the image.
Here are the installation steps:
-
Download and install UNetbootin
-
Download the OpenIVI image.
-
Unzip the image. (You should be able to simply double-click it to unzip.)
-
Remove the microSD card from the OpenIVI unit. Unscrew the cover of the unit with the screws on the back. The microSD card slot is in the top left of the MinnowBoard Turbot, next to the USB connectors. This is easier with small hands.
-
Plug the microSD card into a laptop (either Windows or Mac) using a SD card reader
-
Open UNetbootin, and select the "Diskimage - ISO" option.
-
Select the OpenIVI image you downloaded.
-
Select the microSD card you just inserted, and click OK. Copying the image may take a few minutes.
-
Close UNetbootin and eject the microSD card from your computer.
-
You can now insert this microSD card back into the OpenIVI head unit.
-
Connect OpenIVI to the network using wired ethernet, and power it on.
-
The device should boot into the OpenIVI graphical interface. If this is an ATS image, it will appear in the sales demo account of ATS Garage