diff --git a/conf/machine/am335x-nmhw21.conf b/conf/machine/am335x-nmhw21.conf index 867922a..58a9082 100644 --- a/conf/machine/am335x-nmhw21.conf +++ b/conf/machine/am335x-nmhw21.conf @@ -10,7 +10,7 @@ KERNEL_DEFCONFIG ??= "am335x-nmhw21_defconfig" KERNEL_DEVICETREE = "am335x-nmhw21-prod1.dtb \ " -KERNEL_IMAGETYPE = "fitImage" +KERNEL_IMAGETYPE = "zImage" PREFERRED_PROVIDER_virtual/bootloader = "u-boot-am335x-nmhw21" diff --git a/conf/machine/am335x-nmhw24.conf b/conf/machine/am335x-nmhw24.conf index 0563b92..f905b39 100644 --- a/conf/machine/am335x-nmhw24.conf +++ b/conf/machine/am335x-nmhw24.conf @@ -10,7 +10,7 @@ KERNEL_DEFCONFIG ??= "am335x-nmhw24_defconfig" KERNEL_DEVICETREE = "am335x-nmhw24-prod1.dtb \ " -KERNEL_IMAGETYPE = "fitImage" +KERNEL_IMAGETYPE = "zImage" PREFERRED_PROVIDER_virtual/bootloader = "u-boot-am335x-nmhw24" diff --git a/conf/machine/am335x-nrhw16.conf b/conf/machine/am335x-nrhw16.conf index 80397b7..ebe4e53 100644 --- a/conf/machine/am335x-nrhw16.conf +++ b/conf/machine/am335x-nrhw16.conf @@ -13,7 +13,7 @@ KERNEL_DEVICETREE = "am335x-nrhw16.dtb \ am335x-nrhw16-prod4.dtb \ am335x-nrhw16-prod5.dtb \ " -KERNEL_IMAGETYPE = "fitImage" +KERNEL_IMAGETYPE = "zImage" PREFERRED_PROVIDER_virtual/bootloader = "u-boot-am335x-nrhw16-v2" diff --git a/conf/machine/am335x-nrhw20.conf b/conf/machine/am335x-nrhw20.conf index 0350a9c..d7b23bf 100644 --- a/conf/machine/am335x-nrhw20.conf +++ b/conf/machine/am335x-nrhw20.conf @@ -9,7 +9,7 @@ MACHINE_EXTRA_RRECOMMENDS = " kernel-modules kernel-devicetree" KERNEL_DEFCONFIG ??= "am335x-nrhw20_defconfig" KERNEL_DEVICETREE = "am335x-nrhw20-prod1.dtb \ " -KERNEL_IMAGETYPE = "fitImage" +KERNEL_IMAGETYPE = "zImage" PREFERRED_PROVIDER_virtual/bootloader = "u-boot-am335x-nrhw20-v1" diff --git a/conf/machine/armada-385-nrhw18.conf b/conf/machine/armada-385-nrhw18.conf index c2e6e0f..0fb55a1 100644 --- a/conf/machine/armada-385-nrhw18.conf +++ b/conf/machine/armada-385-nrhw18.conf @@ -9,7 +9,7 @@ MACHINE_EXTRA_RRECOMMENDS = " kernel-modules kernel-devicetree" KERNEL_DEFCONFIG ??= "armada-385-nrhw18_defconfig" KERNEL_DEVICETREE = "armada-385-nrhw18-prod1.dtb" -KERNEL_IMAGETYPE = "fitImage" +KERNEL_IMAGETYPE = "zImage" KERNEL_MODULE_PROBECONF += "ath10k_pci" module_conf_ath10k_pci = "options ath10k_pci irq_mode=1" diff --git a/conf/machine/imx8-mek.conf b/conf/machine/imx8-mek.conf index f0b223e..e598061 100644 --- a/conf/machine/imx8-mek.conf +++ b/conf/machine/imx8-mek.conf @@ -17,9 +17,6 @@ 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" diff --git a/conf/machine/imx8-nmhw23.conf b/conf/machine/imx8-nmhw23.conf index 473aac5..d7acdb6 100644 --- a/conf/machine/imx8-nmhw23.conf +++ b/conf/machine/imx8-nmhw23.conf @@ -22,8 +22,7 @@ SOTA_MACHINE = "${MACHINE}" KERNEL_CLASSES_append = " kernel-fitimage" -KERNEL_IMAGETYPE = "fitImage" -KERNEL_IMAGETYPE_aarch64 = "fitImage" +KERNEL_IMAGETYPE = "Image" KERNEL_ALT_IMAGETYPE = "Image" UBOOT_ENTRYPOINT = "0x80280000" #UBOOT_MACHINE = "imx8_nmhw23_defconfig" diff --git a/recipes-kernel/linux/linux-netmodule-initramfs.bb b/recipes-kernel/linux/linux-netmodule-initramfs.bb deleted file mode 100644 index ad77da8..0000000 --- a/recipes-kernel/linux/linux-netmodule-initramfs.bb +++ /dev/null @@ -1,6 +0,0 @@ -require recipes-kernel/linux/linux-netmodule_git.bb - -KERNEL_PACKAGE_NAME = "initramfs-linux" -PROVIDES += "virtual/netmodule-image" - -SRC_URI_remove_netbird = " file://wlan.cfg" diff --git a/recipes-kernel/linux/linux-netmodule_git.bb b/recipes-kernel/linux/linux-netmodule_git.bb index 98092e9..7b54860 100644 --- a/recipes-kernel/linux/linux-netmodule_git.bb +++ b/recipes-kernel/linux/linux-netmodule_git.bb @@ -39,13 +39,6 @@ do_configure_append(){ fi } -fitimage_assemble_append(){ - if [ "x${ramdiskcount}" = "x1" ] ; then - ln -sf ${2} arch/${ARCH}/boot/fitImage.initramfs - fi - -} - do_install_append(){ if [ "${KERNEL_DEVICETREE}" != "" ]; then ln -s ${KERNEL_DTB_LINK_NAME}.dtb ${D}/${KERNEL_IMAGEDEST}/devicetree.dtb diff --git a/recipes-kernel/linux/netmodule-fitimage.bb b/recipes-kernel/linux/netmodule-fitimage.bb new file mode 100644 index 0000000..bfd8e01 --- /dev/null +++ b/recipes-kernel/linux/netmodule-fitimage.bb @@ -0,0 +1,47 @@ +# Copyright (C) 2021 Lucien Mueller + +DESCRIPTION = "make fitimage" +LICENSE = "GPLv2" + + +inherit kernel-fitimage +inherit kernel-arch +inherit deploy + +do_configure[depends] += "virtual/kernel:do_deploy" +do_bundle_initramfs[depends] += "${INITRAMFS_IMAGE}:do_image_complete" +KERNEL_IMAGETYPES = "fitImage" +PACKAGE_ARCH = "${MACHINE_ARCH}" + +PROVIDES = "virtual/netmodule-image" + +addtask assemble_fitimage_initramfs before do_install after do_compile +addtask do_deploy after assemble_fitimage_initramfs + +INITRAMFS_IMAGE_NAME ?= "${INITRAMFS_IMAGE}-${MACHINE}" + +do_configure_prepend () { + install -d ${S}/arch/${ARCH}/boot/ + for DTB in ${KERNEL_DEVICETREE}; do + # We have to watch out for when the device-tree is located in its own subdirectory in the kernel sources. + # DTB_SUBDIR will contain this directory. + DTB_DEPLOY=`basename ${DTB}` + DTB_SUBDIR=`dirname ${DTB}` + install -d arch/${ARCH}/boot/${DTB_SUBDIR} + install -m 0644 ${DEPLOY_DIR_IMAGE}/${DTB_DEPLOY} arch/${ARCH}/boot/${DTB} + done + install -m 0644 ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${KERNEL_IMAGE_LINK_NAME}.bin arch/${ARCH}/boot/vmlinuz.bin +} + +kernel_do_deploy () { + # The kernel-fitimage class appends the deployment to this task. We just have to provide the task. +} + +do_deploy () { + deployDir=${DEPLOY_DIR_IMAGE} + kernel_do_deploy +} + + + +