Add imx8-nmhw22 target

This commit is contained in:
Andrejs Cainikovs 2019-05-10 12:52:43 +02:00 committed by Ramon Moesching
parent dc30f20654
commit 5e82c74c04
5 changed files with 74 additions and 5 deletions

View File

@ -0,0 +1 @@
WKS_FILE_sota = "sdimage-sota-nmhw22.wks"

View File

@ -0,0 +1,28 @@
#@TYPE: Machine
#@NAME: NetModule HW 22
#@DESCRIPTION: Machine configuration for the nmhw22 mainboard
require conf/machine/include/arm/arch-arm64.inc
IMAGE_FSTYPES += "tar.gz cpio cpio.gz.u-boot"
IMAGE_CLASSES += "image_types"
MACHINE_EXTRA_RRECOMMENDS = " kernel-modules kernel-devicetree"
KERNEL_DEFCONFIG = ""
KERNEL_DEVICETREE = "freescale/fsl-imx8qxp-mek.dtb freescale/fsl-imx8qxp-mek-dom0.dtb"
SOTA_MACHINE = "${MACHINE}"
KERNEL_CLASSES_append = " kernel-fitimage"
KERNEL_IMAGETYPE = "Image"
KERNEL_IMAGETYPES = "fitImage Image"
KERNEL_IMAGETYPE_sota = "fitImage"
KERNEL_IMAGETYPES_sota = "fitImage"
UBOOT_ENTRYPOINT ?= "0x80020000"
UBOOT_MACHINE = "imx8qxp_mek_defconfig"
IMAGE_BOOT_FILES = "flash.bin"
PREFERRED_PROVIDER_virtual/kernel = "linux-netmodule"
PREFERRED_PROVIDER_virtual/bootloader = "u-boot-imx8-nmhw22"

View File

@ -0,0 +1,36 @@
require u-boot-nm.inc
DEPENDS += "bc-native coreutils-native dtc-native"
# Force machine configuration for this recipe
UBOOT_MACHINE = "imx8qxp_mek_defconfig"
# Be aware github/netmodule git
SRC_URI = "git://git.netmodule.intranet/nmrouter/u-boot;protocol=ssh;user=gitea;branch=develop/nmhw22-bringup"
# License
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://Licenses/README;md5=30503fd321432fc713238f582193b78e"
# Should be updated when a new U-Boot Version is available
SRCREV ?= "${AUTOREV}"
PV = "v2019.04pre+git${SRCPV}"
UBOOT_BINARY = "flash.bin"
UBOOT_MAKE_TARGET = "flash.bin"
do_compile() {
export ATF_LOAD_ADDR=0x80000000
export BL33_LOAD_ADDR=0x80020000
oe_runmake ${UBOOT_MACHINE}
# TODO: move this to U-Boot defconfig
echo "CONFIG_CMD_EXT2=y" >> ${B}/.config
echo "CONFIG_CMD_EXT4=y" >> ${B}/.config
echo "CONFIG_CMD_EXT4_WRITE=y" >> ${B}/.config
oe_runmake ${UBOOT_MAKE_TARGET}
dd if=${S}/u-boot.itb of=${S}/flash.bin bs=512 seek=528
}
do_deploy_append() {
cp ${S}/flash.bin ${DEPLOYDIR}/flash.bin
}

View File

@ -62,9 +62,9 @@ do_install_append_am335x-nrhw16() {
ln -s am335x-nrhw16-prod4.dtb ${D}/${KERNEL_IMAGEDEST}/am335x-nbhw16-prod4.dtb ln -s am335x-nrhw16-prod4.dtb ${D}/${KERNEL_IMAGEDEST}/am335x-nbhw16-prod4.dtb
ln -s am335x-nrhw16-prod5.dtb ${D}/${KERNEL_IMAGEDEST}/am335x-nbhw16-prod5.dtb ln -s am335x-nrhw16-prod5.dtb ${D}/${KERNEL_IMAGEDEST}/am335x-nbhw16-prod5.dtb
} }
======= # NMHW22
do_configure_prepend_imx8-mek() { do_configure_prepend_imx8-nmhw22() {
install -d ${B} install -d ${B}
mkdir -p ${B} mkdir -p ${B}
cp ${S}/arch/arm64/configs/defconfig ${B}/.config cp ${S}/arch/arm64/configs/defconfig ${B}/.config
@ -74,6 +74,5 @@ do_configure_prepend_imx8-mek() {
echo "CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024" >> ${B}/.config echo "CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024" >> ${B}/.config
echo "CONFIG_INITRAMFS_COMPRESSION_GZIP=y" >> ${B}/.config echo "CONFIG_INITRAMFS_COMPRESSION_GZIP=y" >> ${B}/.config
} }
EXTRA_OEMAKE_append_imx8-mek = " ARCH=arm64" EXTRA_OEMAKE_append_imx8-nmhw22 = " ARCH=arm64"
KERNEL_EXTRA_ARGS_append_imx8-mek += "LOADADDR=${UBOOT_ENTRYPOINT}" KERNEL_EXTRA_ARGS_append_imx8-nmhw22 += "LOADADDR=${UBOOT_ENTRYPOINT}"

View File

@ -0,0 +1,5 @@
# short-description: Create OTA-enabled SD card image
# long-description: Creates a partitioned SD card image with OSTree
part u-boot --source rawcopy --sourceparams="file=flash.bin" --ondisk mmcblk --no-table --align 32
part / --source otaimage --ondisk mmcblk --fstype=ext4 --align 4096