diff --git a/layers/meta-netmodule-legacy-bsp/conf/machine/include/ti33x.inc b/layers/meta-netmodule-legacy-bsp/conf/machine/include/ti33x.inc index 9f0d43e..aeeb1b6 100644 --- a/layers/meta-netmodule-legacy-bsp/conf/machine/include/ti33x.inc +++ b/layers/meta-netmodule-legacy-bsp/conf/machine/include/ti33x.inc @@ -33,6 +33,8 @@ include conf/machine/include/arm/armv7a/tune-cortexa8.inc KERNEL_IMAGETYPE = "zImage" +PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ti33x" + UBOOT_MACHINE = "${MACHINE}_defconfig" # SPL_BINARY = "MLO" UBOOT_SUFFIX = "img" diff --git a/layers/meta-netmodule-legacy-bsp/conf/machine/netmodule-hw16.conf b/layers/meta-netmodule-legacy-bsp/conf/machine/netmodule-hw16.conf index 0d1b541..caeb614 100644 --- a/layers/meta-netmodule-legacy-bsp/conf/machine/netmodule-hw16.conf +++ b/layers/meta-netmodule-legacy-bsp/conf/machine/netmodule-hw16.conf @@ -10,3 +10,4 @@ NM_MODELS = "800" # WARNING: This file needs to be kept in sync with HW24. Therefor use the common include: require conf/machine/include/am335x-nrhw16-nrhw24.inc +UBOOT_MACHINE = "am335x_nbhw16_defconfig" diff --git a/layers/meta-netmodule-legacy-bsp/conf/machine/netmodule-hw20.conf b/layers/meta-netmodule-legacy-bsp/conf/machine/netmodule-hw20.conf index de2a385..de35d85 100644 --- a/layers/meta-netmodule-legacy-bsp/conf/machine/netmodule-hw20.conf +++ b/layers/meta-netmodule-legacy-bsp/conf/machine/netmodule-hw20.conf @@ -8,6 +8,8 @@ NRHW = "20" NM_MODELS = "1601 B-1601" MAX_FS_SIZE = "279542" +UBOOT_MACHINE = "am335x_nrhw20_defconfig" + KERNEL_DEVICETREE = "\ am335x-nrhw20-prod1.dtb \ " diff --git a/layers/meta-netmodule-legacy-bsp/conf/machine/netmodule-hw22.conf b/layers/meta-netmodule-legacy-bsp/conf/machine/netmodule-hw22.conf index 1c40b09..05e5618 100644 --- a/layers/meta-netmodule-legacy-bsp/conf/machine/netmodule-hw22.conf +++ b/layers/meta-netmodule-legacy-bsp/conf/machine/netmodule-hw22.conf @@ -8,6 +8,8 @@ NRHW = "22" NM_MODELS = "650" MAX_FS_SIZE = "279542" +UBOOT_MACHINE = "am335x_nrhw22_defconfig" + KERNEL_DEVICETREE = "\ am335x-nrhw22-prod1.dtb \ " diff --git a/layers/meta-netmodule-legacy-bsp/conf/machine/netmodule-hw24.conf b/layers/meta-netmodule-legacy-bsp/conf/machine/netmodule-hw24.conf index f1d8b09..73bc495 100644 --- a/layers/meta-netmodule-legacy-bsp/conf/machine/netmodule-hw24.conf +++ b/layers/meta-netmodule-legacy-bsp/conf/machine/netmodule-hw24.conf @@ -7,6 +7,8 @@ require conf/machine/include/ti33x.inc NRHW = "24" NM_MODELS = "B-800" +UBOOT_MACHINE = "am335x_nrhw24_defconfig" + # WARNING: This file needs to be kept in sync with HW24. Therefor use the common include: require conf/machine/include/am335x-nrhw16-nrhw24.inc diff --git a/layers/meta-netmodule-legacy-bsp/conf/machine/netmodule-hw25.conf b/layers/meta-netmodule-legacy-bsp/conf/machine/netmodule-hw25.conf index b30ea7f..e7835d6 100644 --- a/layers/meta-netmodule-legacy-bsp/conf/machine/netmodule-hw25.conf +++ b/layers/meta-netmodule-legacy-bsp/conf/machine/netmodule-hw25.conf @@ -8,6 +8,8 @@ NRHW = "25" NM_MODELS ?= "660 670" MAX_FS_SIZE = "279542" +UBOOT_MACHINE = "am335x_hw25_defconfig" + KERNEL_DEVICETREE = "\ am335x-hw25-prod1.dtb \ " diff --git a/layers/meta-netmodule-legacy-bsp/conf/machine/netmodule-hw26.conf b/layers/meta-netmodule-legacy-bsp/conf/machine/netmodule-hw26.conf index d315afc..760d02e 100644 --- a/layers/meta-netmodule-legacy-bsp/conf/machine/netmodule-hw26.conf +++ b/layers/meta-netmodule-legacy-bsp/conf/machine/netmodule-hw26.conf @@ -8,6 +8,10 @@ NRHW = "26" NM_MODELS = "G-800" MAX_FS_SIZE = "279542" + +# HW26 is based on HW21, the boot config is the same +UBOOT_MACHINE = "am335x_nmhw21_defconfig" + KERNEL_DEVICETREE = "\ am335x-hw26-prod1.dtb \ " diff --git a/layers/meta-netmodule-legacy-bsp/recipes-bsp/u-boot/u-boot-nm.inc b/layers/meta-netmodule-legacy-bsp/recipes-bsp/u-boot/u-boot-nm.inc new file mode 100644 index 0000000..999b2cc --- /dev/null +++ b/layers/meta-netmodule-legacy-bsp/recipes-bsp/u-boot/u-boot-nm.inc @@ -0,0 +1,19 @@ +require recipes-bsp/u-boot/u-boot.inc + +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6" + +S = "${WORKDIR}/git" +B = "${WORKDIR}/build" +do_configure[cleandirs] = "${B}" +UBOOT_INITIAL_ENV = "" + +# This variable is set to "0" in distro in order to get reproducible build +# It is however not needed for uboot and unsetting it allows us to keep the build date in uboot output +unset SOURCE_DATE_EPOCH + + +# CFLAGS are unset by u-boot.inc +# The user flags should be passed by KCFLAGS, but for some reason, it does not work +# KCCPFLAGS on the other hand also end in the actual cflags +export KCPPFLAGS = "-DCONFIG_NRSW_BUILD" diff --git a/layers/meta-netmodule-legacy-bsp/recipes-bsp/u-boot/u-boot-ti33x_git.bb b/layers/meta-netmodule-legacy-bsp/recipes-bsp/u-boot/u-boot-ti33x_git.bb new file mode 100644 index 0000000..c61dc16 --- /dev/null +++ b/layers/meta-netmodule-legacy-bsp/recipes-bsp/u-boot/u-boot-ti33x_git.bb @@ -0,0 +1,22 @@ +require u-boot-nm.inc + +SRC_URI = "git://git.netmodule.intranet/nmrouter/u-boot.git;protocol=ssh;user=gitea;branch=nrsw-sitara-2016.04" + +SRCREV = "66fb8f8532ba174b14542c0c8a0245818df14f02" + +SPL_BINARY = "MLO" +UBOOT_SUFFIX = "img" + +do_deploy() { + # xmodem files + cp ${B}/spl/u-boot-spl.bin ${DEPLOYDIR}/spl-u-boot-${MACHINE}.xmodem.bin + cp ${B}/u-boot.bin ${DEPLOYDIR}/u-boot-${MACHINE}.xmodem.bin + + # files for wic file + cp ${B}/MLO ${DEPLOYDIR}/ + cp ${B}/u-boot.img ${DEPLOYDIR}/ + + # files for user usage + cp ${B}/MLO ${DEPLOYDIR}/spl-u-boot-${MACHINE}.${UBOOT_SUFFIX} + cp ${B}/u-boot.img ${DEPLOYDIR}/u-boot-${MACHINE}.${UBOOT_SUFFIX} +}