diff --git a/layers/meta-netmodule-legacy-bsp/conf/machine/netmodule-hw17.conf b/layers/meta-netmodule-legacy-bsp/conf/machine/netmodule-hw17.conf index c26911a..cbb6a05 100644 --- a/layers/meta-netmodule-legacy-bsp/conf/machine/netmodule-hw17.conf +++ b/layers/meta-netmodule-legacy-bsp/conf/machine/netmodule-hw17.conf @@ -14,3 +14,7 @@ KERNEL_DEVICETREE = "openwrt-nbhw17.dtb" EXT_SERIAL_CONSOLE ?= "115200;ttyS1" SERIAL_CONSOLES = "${EXT_SERIAL_CONSOLE}" + +MACHINE_FEATURES += " \ + fpga \ + " \ No newline at end of file diff --git a/layers/meta-netmodule-legacy-bsp/conf/machine/netmodule-hw18.conf b/layers/meta-netmodule-legacy-bsp/conf/machine/netmodule-hw18.conf index 708adae..74f3641 100644 --- a/layers/meta-netmodule-legacy-bsp/conf/machine/netmodule-hw18.conf +++ b/layers/meta-netmodule-legacy-bsp/conf/machine/netmodule-hw18.conf @@ -18,3 +18,7 @@ KERNEL_DEVICETREE = " \ DEBUG_SERIAL_CONSOLE ?= "115200;ttyS0" EXT_SERIAL_CONSOLE ?= "115200;ttyS1" SERIAL_CONSOLES = "${EXT_SERIAL_CONSOLE} ${DEBUG_SERIAL_CONSOLE}" + +MACHINE_FEATURES += " \ + fpga \ + " \ No newline at end of file diff --git a/layers/meta-netmodule-legacy-bsp/recipes-bsp/fpga-image/fpga-image.bb b/layers/meta-netmodule-legacy-bsp/recipes-bsp/fpga-image/fpga-image.bb new file mode 100644 index 0000000..cc4daa3 --- /dev/null +++ b/layers/meta-netmodule-legacy-bsp/recipes-bsp/fpga-image/fpga-image.bb @@ -0,0 +1,26 @@ +DESCRIPTION = "Fpga images" +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Proprietary;md5=0557f9d92cf58f2ccdd50f62f8ac0b28" + +inherit deploy + +COMPATIBLE_MACHINE = "(netmodule-hw17|netmodule-hw18)" +SRC_URI = "file://LG00000000" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +PV = "1.0.0" + + +do_install () { + install -d ${D}/logic + install -m 0644 ${WORKDIR}/LG00000000 ${D}/logic/ +} + +do_deploy () { + cp ${WORKDIR}/LG00000000 ${DEPLOYDIR}/fpga-image-${MACHINE} +} + +FILES:${PN} += "/logic/LG00000000" + +addtask deploy before do_build after do_compile diff --git a/layers/meta-netmodule-legacy-bsp/recipes-bsp/fpga-image/fpga-image/netmodule-hw17/LG00000000 b/layers/meta-netmodule-legacy-bsp/recipes-bsp/fpga-image/fpga-image/netmodule-hw17/LG00000000 new file mode 100644 index 0000000..5813a63 Binary files /dev/null and b/layers/meta-netmodule-legacy-bsp/recipes-bsp/fpga-image/fpga-image/netmodule-hw17/LG00000000 differ diff --git a/layers/meta-netmodule-legacy-bsp/recipes-bsp/fpga-image/fpga-image/netmodule-hw18/LG00000000 b/layers/meta-netmodule-legacy-bsp/recipes-bsp/fpga-image/fpga-image/netmodule-hw18/LG00000000 new file mode 100644 index 0000000..dc25cdb Binary files /dev/null and b/layers/meta-netmodule-legacy-bsp/recipes-bsp/fpga-image/fpga-image/netmodule-hw18/LG00000000 differ diff --git a/layers/meta-nwl-distro/classes/kernel-fitimage-fpga.bbclass b/layers/meta-nwl-distro/classes/kernel-fitimage-fpga.bbclass new file mode 100644 index 0000000..9e0e2b7 --- /dev/null +++ b/layers/meta-nwl-distro/classes/kernel-fitimage-fpga.bbclass @@ -0,0 +1,23 @@ +do_assemble_fitimage[depends] += "fpga-image:do_deploy" + +# +# Emit the fitImage ITS fpga section +# +# $1 ... .its filename +# $2 ... Image counter +# $3 ... Path to fpga image +fitimage_emit_section_kernel:append() { + fpgacount=1 + cat << EOF >> ${1} + fpga-${fpgacount} { + description = "FPGA"; + data = /incbin/("${DEPLOY_DIR_IMAGE}/fpga-image-${MACHINE}"); + type = "fpga"; + arch = "${UBOOT_ARCH}"; + compression = "none"; + hash-1 { + algo = "sha1"; + }; + }; +EOF +} diff --git a/layers/meta-nwl-distro/classes/nwl-image-fitimage.bbclass b/layers/meta-nwl-distro/classes/nwl-image-fitimage.bbclass index 7fc7e2a..e3c5cbd 100644 --- a/layers/meta-nwl-distro/classes/nwl-image-fitimage.bbclass +++ b/layers/meta-nwl-distro/classes/nwl-image-fitimage.bbclass @@ -19,6 +19,8 @@ kernel_do_deploy () { inherit kernel-fitimage inherit kernel-arch +inherit ${@bb.utils.contains('MACHINE_FEATURES', 'fpga', 'kernel-fitimage-fpga', '', d)} + do_assemble_fitimage:prepend() { install -d ${S}/arch/${ARCH}/boot/