feat(cn9130-cf-pro): use same BSP recipes as Nitroc

This commit is contained in:
Sam Dolt 2024-03-18 16:00:26 +01:00
parent 2be0c69de4
commit 81c834a892
8 changed files with 57 additions and 86 deletions

View File

@ -4,4 +4,18 @@
# #
require conf/machine/include/cn913x.inc require conf/machine/include/cn913x.inc
require conf/machine/include/cn913x-solidrun.inc
# Bootloader configuration
# *****************************************************************************
# Set the configuration and device tree for the board
UBOOT_MACHINE = "cn9130-clearfog-pro_defconfig"
UBOOT_BUILDENV_DEVICE_TREE ??= "cn9130-cf-pro"
# Kernel configuration
# ******************************************************************************
KERNEL_DEFCONFIG ?= "nitroc_defconfig"
KERNEL_DEVICETREE ?= "\
marvell/cn9130-cf-pro.dtb \
"

View File

@ -3,8 +3,37 @@
#@DESCRIPTION: CN9131 SOM based on Bldn MBV-A/B #@DESCRIPTION: CN9131 SOM based on Bldn MBV-A/B
# #
# Use source code provided by Solidrun for Falcon support
# Bootloader configuration
# *****************************************************************************
PREFERRED_VERSION_u-boot ?= "2019.10-solidrun"
# Solidrun made cn913x use the same defconfig for u-boot, but another devicetree
# by settings UBOOT_BUILDENV_DEVICE_TREE in the machine configuration file
UBOOT_MACHINE = "sr_cn913x_cex7_defconfig"
UBOOT_BUILDENV_DEVICE_TREE ??= "${MACHINE}"
UBOOT_ENTRYPOINT = "0x7000000"
UBOOT_LOADADDRESS = "0x7000000"
# Kernel configuration
# ******************************************************************************
PREFERRED_PROVIDER_virtual/kernel ?= "linux-netmodule"
PREFERRED_VERSION_linux-netmodule ?= "git-5.15-solidrun"
PREFERRED_VERSION_trusted_firmware_a ?= "2.6"
KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
KERNEL_DEFCONFIG ?= "cn9130-netmodule_defconfig"
KERNEL_DEVICETREE ?= "\
marvell/${MACHINE}.dtb \
"
require conf/machine/include/cn913x.inc require conf/machine/include/cn913x.inc
require conf/machine/include/cn913x-solidrun.inc
### Device specific settings ### Device specific settings
# Needed for phy firmware # Needed for phy firmware

View File

@ -8,8 +8,6 @@ require conf/machine/include/cn913x.inc
# Bootloader configuration # Bootloader configuration
# ***************************************************************************** # *****************************************************************************
PREFERRED_VERSION_u-boot ?= "2020.10-marvell"
# Set the configuration and device tree for Nitroc # Set the configuration and device tree for Nitroc
UBOOT_MACHINE = "nitroc_defconfig" UBOOT_MACHINE = "nitroc_defconfig"
UBOOT_BUILDENV_DEVICE_TREE ??= "cn9131-nitroc-v1" UBOOT_BUILDENV_DEVICE_TREE ??= "cn9131-nitroc-v1"
@ -17,11 +15,6 @@ UBOOT_BUILDENV_DEVICE_TREE ??= "cn9131-nitroc-v1"
# Kernel configuration # Kernel configuration
# ****************************************************************************** # ******************************************************************************
PREFERRED_PROVIDER_virtual/kernel ?= "linux-nitroc"
PREFERRED_VERSION_linux-netmodule ?= "v6.6.y%"
PREFERRED_VERSION_trusted-firmware-a ?= "2.9-nitroc"
KERNEL_IMAGETYPE = "Image"
KERNEL_DEFCONFIG ?= "nitroc_defconfig" KERNEL_DEFCONFIG ?= "nitroc_defconfig"
KERNEL_DEVICETREE ?= "\ KERNEL_DEVICETREE ?= "\
marvell/cn9131-nitroc-v1.dtb \ marvell/cn9131-nitroc-v1.dtb \

View File

@ -1,30 +0,0 @@
# Use source code provided by Solidrun for Falcon support
# Bootloader configuration
# *****************************************************************************
PREFERRED_VERSION_u-boot ?= "2019.10-solidrun"
# Solidrun made cn913x use the same defconfig for u-boot, but another devicetree
# by settings UBOOT_BUILDENV_DEVICE_TREE in the machine configuration file
UBOOT_MACHINE = "sr_cn913x_cex7_defconfig"
UBOOT_BUILDENV_DEVICE_TREE ??= "${MACHINE}"
UBOOT_ENTRYPOINT = "0x7000000"
UBOOT_LOADADDRESS = "0x7000000"
# Kernel configuration
# ******************************************************************************
PREFERRED_PROVIDER_virtual/kernel ?= "linux-netmodule"
PREFERRED_VERSION_linux-netmodule ?= "git-5.15-solidrun"
PREFERRED_VERSION_trusted_firmware_a = "2.6"
KERNEL_IMAGETYPE = "Image"
KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
KERNEL_DEFCONFIG ?= "cn9130-netmodule_defconfig"
KERNEL_DEVICETREE ?= "\
marvell/${MACHINE}.dtb \
"

View File

@ -11,8 +11,16 @@ require conf/machine/include/soc-family.inc
# ***************************************************************************** # *****************************************************************************
PREFERRED_PROVIDER_virtual/bootloader = "u-boot" PREFERRED_PROVIDER_virtual/bootloader = "u-boot"
PREFERRED_VERSION_u-boot ?= "2020.10-marvell"
# Kernel configuration
# ******************************************************************************
PREFERRED_PROVIDER_virtual/kernel ?= "linux-nitroc"
PREFERRED_VERSION_linux-netmodule ?= "v6.6.y%"
PREFERRED_VERSION_trusted-firmware-a ?= "2.9-nitroc"
KERNEL_IMAGETYPE = "Image"
# getty configuration # getty configuration
# ****************************************************************************** # ******************************************************************************

View File

@ -2,7 +2,7 @@ require recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc
DEPENDS += "mv-ddr-marvell binaries-marvell coreutils-native" DEPENDS += "mv-ddr-marvell binaries-marvell coreutils-native"
COMPATIBLE_MACHINE = "cn9131-nitroc" COMPATIBLE_MACHINE = "cn9131-nitroc|cn9130-cf-pro"
LIC_FILES_CHKSUM += "file://docs/license.rst;md5=b2c740efedc159745b9b31f88ff03dde" LIC_FILES_CHKSUM += "file://docs/license.rst;md5=b2c740efedc159745b9b31f88ff03dde"
@ -11,7 +11,8 @@ SRCREV = "41911b0db0a07878a384e8358950b79e6df7d1be"
EXTRA_OEMAKE += "MV_DDR_PATH=${PKG_CONFIG_SYSROOT_DIR}/usr/src/mv-ddr-marvell DDR_TOPOLOGY=2 SCP_BL2=${PKG_CONFIG_SYSROOT_DIR}/usr/src/binaries-marvell/mrvl_scp_bl2.img" EXTRA_OEMAKE += "MV_DDR_PATH=${PKG_CONFIG_SYSROOT_DIR}/usr/src/mv-ddr-marvell DDR_TOPOLOGY=2 SCP_BL2=${PKG_CONFIG_SYSROOT_DIR}/usr/src/binaries-marvell/mrvl_scp_bl2.img"
TFA_PLATFORM = "t9130_nitroc" TFA_PLATFORM:cn9131-nitroc = "t9130_nitroc"
TFA_PLATFORM:cn9130-cf-pro = "t9130_clearfog_pro"
TFA_BUILD_TARGET = "all mrvl_flash" TFA_BUILD_TARGET = "all mrvl_flash"
TFA_INSTALL_TARGET = "flash-image" TFA_INSTALL_TARGET = "flash-image"
TFA_DEBUG = "1" TFA_DEBUG = "1"

View File

@ -1,44 +0,0 @@
HOMEPAGE = "http://www.denx.de/wiki/U-Boot/WebHome"
DESCRIPTION = "U-Boot, a boot loader for Embedded boards based on PowerPC, \
ARM, MIPS and several other processors, which can be installed in a boot \
ROM and used to initialize and test the hardware or to download and run \
application code."
SECTION = "bootloaders"
DEPENDS += "flex-native bison-native"
COMPATIBLE_MACHINE = "cn913x"
LICENSE = "GPL-2.0-or-later"
LIC_FILES_CHKSUM = "file://Licenses/README;md5=2ca5f2c35c8cc335f0a19756634782f1"
PE = "1"
FILESEXTRAPATHS:prepend := "${THISDIR}/files_2023.04-marvell:"
# We use the revision in order to avoid having to fetch it from the
# repo during parse
SRCREV = "6add83991b2887619d0b25e4068b4c0082a4596a"
# Patch from https://github.com/SolidRun/cn913x_build
# Git SHA: f33e2aeb01c7ee061be7b053035ae87ce30fce4a
SRC_URI = "git://source.denx.de/u-boot/custodians/u-boot-marvell.git;branch=master;protocol=https \
${@bb.utils.contains("IMAGE_FEATURES", "debug-tweaks", "file://debug-tweaks.cfg", "", d)} \
file://uefi.cfg \
file://uefi-secureboot.cfg \
file://0001-add-support-for-cn9130-cf-pro-and-cn9130-bldn-mbv.patch \
"
S = "${WORKDIR}/git"
require recipes-bsp/u-boot/u-boot.inc
require recipes-bsp/u-boot/u-boot-coreos.inc
# Solidrun patches require to build out-of-the-tree
B = "${WORKDIR}/build"
DEPENDS += "bc-native dtc-native u-boot-mkimage-native"
do_compile:prepend() {
export DEVICE_TREE="${UBOOT_BUILDENV_DEVICE_TREE}"
}
SYSROOT_DIRS += " /boot "

View File

@ -1,5 +1,5 @@
DESCRIPTION = "Linux kernel for the Nitroc hardware" DESCRIPTION = "Linux kernel for the Nitroc hardware"
COMPATIBLE_MACHINE = "cn9131-nitroc" COMPATIBLE_MACHINE = "cn9131-nitroc|cn9130-cf-pro"
inherit kernel inherit kernel