2.5.3.4.1 Create the sdcard.img File for boot.bin and harmony.bin
In this application note, the genimage open-source tool is used to create the sdcard.img bootable file. The required source code and instructions on how to build and install it locally can be found here.
To generate the bootable image, the genimage tool requires a configuration file that describes the layout and content of a bootable image. For this application note, a simple configuration file will be created as shown below.
Using this configuration file, the bootable image sdcard.img is generated with the following command:
genimage --inputhpath genimage_data --rootpath genimage_data --outputpath . --config genimage_data/genimage.cfg -tmppath genimage.tmp
where:
genimage_data is the root directory for the boot.bin, harmony.bin and genimage.cfg files.
To program the sdcard.img file into the SD card inserted into the SDMMC1 slot of the SAM9X60-Curiosity board, use the SAM-BA tool as follows:
sam-ba --device sam9x60 -a sdmmc:1:1:0:0:5 -c write:<sdcard.img_root_path>/sdcard.img
For more details on the parameters used, refer to the SAM-BA tools documentation (see References).
