August 20, 2018

Artik 710 -- emmc partition layout

In boot-firmwares-artik710/partition.txt, we see the following:
flash=mmc,0:2ndboot:2nd:0x200,0x10000:bl1-emmcboot.img;
flash=mmc,0:fip-loader:boot:0x10200,0x50000:fip-loader-emmc.img;
flash=mmc,0:fip-secure:boot:0x60200,0x180000:fip-secure.img;
flash=mmc,0:fip-nonsecure:boot:0x1E0200,0x100000:fip-nonsecure.img;
flash=mmc,0:env:env:0x2E0200,0x4000:params.bin;
flash=mmc,0:boot:ext4:0x400000,0x2000000:boot.img;
flash=mmc,0:modules:ext4:0x2400000,0x2000000:modules.img;
flash=mmc,0:rootfs:ext4:0x4400000,0:rootfs.img;
This is some kind of file that gets read by "fastboot", whatever it is, but it is fairly easy to guess at what is going on. We get a byte offset (in hex) and the size of a partition. What would be nice would be to convert this to sector counts and consider using "dd" to place images onto an SD card. We really only care about the first 4 (but it is interesting to see what the U-Boot env variables are specified also. A 512 byte sector is 0x200 bytes.

So, in units of 512 byte sectors, we get:

    bl1-emmcboot.img    1  128
 fip-loader-emmc.img  129  640
      fip-secure.img  769 3072
   fip-nonsecure.img 3841 2048
          params.bin 5889   32
Compare this to the following scheme that we use to put files on our functioning SD card for the Nanopi3 Fire3 board:
	dd if=bl1-mmcboot.bin of=${DEV} bs=512 seek=1 conv=fdatasync
	dd if=fip-loader.img  of=${DEV} bs=512 seek=129 conv=fdatasync
	dd if=fip-secure.img  of=${DEV} bs=512 seek=769 conv=fdatasync
	dd if=fip-nonsecure.img of=${DEV} bs=512 seek=3841 conv=fdatasync

Build U-Boot for the artik710

This is the usual business. Note that I place the definition of the CROSS_COMPILE variable inside the Makefile since I rebuild often enough that typing it every time becomes odious:
CROSS_COMPILE = aarch64-linux-gnu-
The process is as follows:
make distclean
make artik710_raptor_defconfig
make


Have any comments? Questions? Drop me a line!

Tom's electronics pages / tom@mmto.org