...
Currently mv-ddr-marvell and atf are taken from the mainline, however, u-boot and mrvl_scp_bl2.img are still not public and must be taken from marvell SDK10, or get the binaries from SolidRun GitHub at https://github.com/GitHub - SolidRun/cn913x_build.git .
Build Instructions
Fetch sources
...
Code Block |
---|
# SPI Flash CONFIG_ENV_IS_IN_MMC=n CONFIG_ENV_IS_IN_SPI_FLASH=y # eMMC boot 0 CONFIG_MVEBU_MMC_BOOT=y CONFIG_ENV_IS_IN_MMC=y CONFIG_ENV_IS_IN_SPI_FLASH=n CONFIG_SYS_MMC_ENV_DEV=1 CONFIG_SYS_MMC_ENV_PART=1 #eMMc boot 1 CONFIG_MVEBU_MMC_BOOT=y CONFIG_ENV_IS_IN_MMC=y CONFIG_ENV_IS_IN_SPI_FLASH=n CONFIG_SYS_MMC_ENV_DEV=1 CONFIG_SYS_MMC_ENV_PART=2 # microSD CONFIG_MVEBU_MMC_BOOT=y CONFIG_ENV_IS_IN_MMC=y CONFIG_ENV_IS_IN_SPI_FLASH=n CONFIG_SYS_MMC_ENV_DEV=1 CONFIG_SYS_MMC_ENV_PART=0 #Remove any other CONFIG_ENV_IS_IN_* occurrences in defconfig file |
Note |
---|
Note: Since not all of the options are exposed by menuconfig, appending them to |
Deploy
From Linux
To microSD
...
Code Block |
---|
dd if=flash-image.bin of=/dev/sdX conv=sync |
To eMMC bootYboot
Since the eMMC is soldered to the board, this procedure has to be done on the device itself after booting into a Linux system first. Please note that as with the eMMC data partition, the Boot ROM expects to find the bootable image at the start of the partition without any offset.
...
Code Block |
---|
# start USB stack usb start # scanning usb for storage devices... 1 Storage Device(s) found <-- indicates success # load flash-image.bin to ram load usb 0:1 $kernel_addr_r flash-image.bin # u-boot will indicate how many btes were read. Make sure to verify the number! # initialize spi flash sf probe # optionally erase sf erase 0 0x800000 # finally write loaded file sf write $kernel_addr_r 0 0x$filesize |
https://github.com/SolidRun/u-boot-armada38x/blob/u-boot-2013.01-15t1-clearfog/download-serial.sh
An example is as follows -
...
Embedded in download-serial.sh a small C program that gets built every time the script runs and requires curses libraries.
Verified Boot
TBD Read more here: Verified Boot