buildroot/configs/nezha_defconfig
Peter Korsgaard acbe6a0a89 configs/nezha_defconfig: new defconfig
Add a defconfig for the Allwinner Nezha, a raspberrypi-style board built
around the RISC-V 64bit D1 SoC.

There is currently no upstream support, so use the git repos from Samuel
Holland as explained on the linux-sunxi wiki:

https://linux-sunxi.org/Allwinner_Nezha

The U-Boot DTB is also used by opensbi, but the two branches are
unfortunately not in sync at the moment, so add a patch to fix the
compatible for the PLIC so opensbi makes it available to S-Mode (Linux).

The use of the sun20i-d1-spl SPL bootloader / TOC1 file format also makes it
a bit more complicated to build the boot image.  As this is expected to only
be a temporary issue, add a U-Boot patch to build the TOC1 image as part of
the build rather than adding explicit support in our U-Boot package to do
it.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2021-11-08 09:45:50 +01:00

34 lines
1.5 KiB
Plaintext

BR2_riscv=y
BR2_GLOBAL_PATCH_DIR="board/nezha/patches"
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_14=y
BR2_ROOTFS_OVERLAY="board/nezha/overlay"
BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/nezha/genimage.cfg"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,smaeul,linux,012f5a3d01be6d44e32c74bb3637ec281790b297)/linux-012f5a3d01be6d44e32c74bb3637ec281790b297.tar.gz"
BR2_LINUX_KERNEL_DEFCONFIG="nezha"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun20i-d1-nezha"
BR2_LINUX_KERNEL_INSTALL_TARGET=y
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
# BR2_TARGET_ROOTFS_TAR is not set
BR2_TARGET_OPENSBI=y
BR2_TARGET_OPENSBI_CUSTOM_TARBALL=y
BR2_TARGET_OPENSBI_CUSTOM_TARBALL_LOCATION="$(call github,smaeul,opensbi,b9125c6f8909d1cc0417795737fc13cb6297ff11)/opensbi-b9125c6f8909d1cc0417795737fc13cb6297ff11.tar.gz"
BR2_TARGET_OPENSBI_PLAT="generic"
# BR2_TARGET_OPENSBI_INSTALL_JUMP_IMG is not set
BR2_TARGET_SUN20I_D1_SPL=y
BR2_TARGET_UBOOT=y
BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
BR2_TARGET_UBOOT_CUSTOM_TARBALL=y
BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,smaeul,u-boot,62392d3b8a624a80646c1876533336f90140088d)/uboot-62392d3b8a624a80646c1876533336f90140088d.tar.gz"
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nezha"
BR2_TARGET_UBOOT_NEEDS_DTC=y
BR2_TARGET_UBOOT_NEEDS_OPENSBI=y
# BR2_TARGET_UBOOT_FORMAT_BIN is not set
BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.toc1"
BR2_PACKAGE_HOST_GENIMAGE=y