mirror of
https://git.busybox.net/buildroot.git
synced 2024-11-23 13:33:28 +08:00
379a21b4f4
Add defconfig for the Khadas VIM3 board which uses a A311D SoC with a 4x ARM Cortex-A73 + 2x ARM Cortex-A53 big.LITTLE architecture. This defconfig includes the Linux mainline kernel version 6.3 as well as mainline uboot version 2023.04 with an in-tree .dts and uboot-defconfig. It also includes the host-tool amlogic-boot-fip which is necessary for signing the bootloader. This host tool is used in the post-image.sh script in order to generate the signed binary. This binary is then flashed to the final sdcard.img after it is generated using genimage. It is done in this way because the bootloader image needs to be flashed in 2 steps. First the first 444 bytes need to be flashed to the beginning of the sdcard.img, then we need to skip 68 bytes in the source and the destination and then write the remaining bootloader image to the sdcard.img. Ref: http://docs.khadas.com/products/sbc/vim3/development/create-bootable-tf-card Signed-off-by: Sebastian Weyer <sebastian.weyer@smile.fr> [Romain: add BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_3=y add BR2_TARGET_UBOOT_NEEDS_OPENSSL=y add BR2_PACKAGE_HOST_DOSFSTOOLS=y for genimage vfat support ] Signed-off-by: Romain Naour <romain.naour@smile.fr>
24 lines
534 B
Bash
Executable File
24 lines
534 B
Bash
Executable File
#!/bin/sh
|
|
|
|
BOARD_DIR="$(dirname "$0")"
|
|
|
|
support/scripts/genimage.sh -c "${BOARD_DIR}/genimage.cfg"
|
|
|
|
AMLOGIC_DIR=${BINARIES_DIR}/amlogic-boot-fip
|
|
FIP_DIR=${BINARIES_DIR}/fip
|
|
|
|
mkdir -p "${FIP_DIR}"
|
|
|
|
(cd "${AMLOGIC_DIR}" && \
|
|
./build-fip.sh khadas-vim3 \
|
|
"${BINARIES_DIR}"/u-boot.bin \
|
|
"${FIP_DIR}")
|
|
|
|
dd if="${FIP_DIR}"/u-boot.bin.sd.bin \
|
|
of="${BINARIES_DIR}"/sdcard.img \
|
|
conv=fsync,notrunc bs=1 count=444
|
|
|
|
dd if="${FIP_DIR}"/u-boot.bin.sd.bin \
|
|
of="${BINARIES_DIR}"/sdcard.img \
|
|
conv=fsync,notrunc bs=512 skip=1 seek=1
|