CN913x Build - Script
Introduction
The main intention of this manual is to provide build scripts that are easy to handle compared to Marvell's build environment and self build for CN913x based products.
git clone https://github.com/SolidRun/cn913x_build.git
The runme.sh script is meant to build a ready to use image containing:
mv-ddr-marvell - from mainline
GitHub - MarvellEmbeddedProcessors/mv-ddr-marvellarm-trusted-firmware - from mainline
GitHub - ARM-software/arm-trusted-firmware: Read-only mirror of Trusted Firmware-A
** mrvl_scp_bl2.img is not public yet. it is provided in the binaries folderu-boot - from Marvell SDK
patches are applied on git://git.denx.de/u-boot.gitlinux - from mainline
GitHub - torvalds/linux: Linux kernel source tree
U-Boot based on SDK10
The CN913x u-boot is not public yet, and was taken from Marvell's SDK10
In order to use use the script with the SDK 1186 patches, create a directory in ROOTDIR:
mkdir $ROOTDIR/patches-sdk-u-boot/
Extract the git-u-boot--.tar.bz2 under the destination folder git-u-boot-- and copy the patches
cp <sdk patch directory>/Base_SDK/base-patches-SDK-10.3.3.0-PR8/uboot/git-uboot-2019.10-SDK-10.3.3.0-PR8/*.patch patches-sdk-u-boot/ $ROOTDIR/patches-sdk-u-boot/
The script will apply the u-boot patches onto the mainline u-boot.
If the SDK patches directory doesn't exist, the script will take by default the u-boot.bin provided in the binaries directory.
Run Script
./runme.sh
The script will generate a ready to use images at ROOTDIR/images. flash_image.bin for SPI and cn9132_cex7_config_0_ubuntu.img for eMMC or SD card
Deploy
For SD card bootable images:
Plug in a micro SD into your machine and run the following, where sdX is the location of the SD card got probed into your machine -
sudo dd if=images/cn9132-cex7_config_0_ubuntu.img of=/dev/sdX
In u-boot prompt, to continue booting from SD card:
setenv get_images "load mmc 1:1 $kernel_addr_r boot/Image; load mmc 1:1 $fdt_addr_r boot/cn9132-cex7.dtb; setenv root 'root=/dev/mmcblk1p1 rootwait rw'; setenv ramdisk_addr_r -"
boot
For burning only the flash-image.bin on an SD card
sudo dd if=images/flash-image.bin of=/dev/sdX bs=512 seek=4096
SolidRun Ltd.