summaryrefslogtreecommitdiffstats
path: root/meta/classes/kernel-fitimage.bbclass
AgeCommit message (Collapse)Author
2021-05-25uboot-sign/kernel-fitimage: split generate_rsa_keys taskMing Liu
Currently generate_rsa_keys tasks are being executed parallelly in kernel and uboot's task list, and both of them are calling openssl to generate rsa keys in same path, this can lead to race condition. Let's split it to kernel_generate_rsa_keys and uboot_generate_rsa_keys. (From OE-Core rev: 36814f5467c9abd84aeb05916b4fd49f766f4f9f) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-25kernel-fitimage.bbclass: drop unit addresses from bootscr sectionsMing Liu
In commit 6047be9f: [ kernel-fitimage: Don't use unit addresses on FIT ] It had dropped unit addresses from FIT image but missed on bootscr part. Drop unit addresses from bootscr sections in this patch. (From OE-Core rev: 0ef3a5e2a6d4507c8d9bc6143f9aa65e6cdb1ed7) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-22kernel-fitimage.bbclass: fix a wrong conditional checkMing Liu
It should check if "${UBOOT_SIGN_ENABLE}" equals to "1" instead of checking if "${UBOOT_SIGN_ENABLE}" is not empty since it could be "0". (From OE-Core rev: 900949af7fe357ee66065ba150b0b1914e8ca581) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-06u-boot: Add infrastructure to SPL verified bootKlaus Heinrich Kiwi
Add the necessary infrastructure to create a U-boot proper fitimage, sign it (using the same keys as the kernel-fitimage), and put the public key in the SPL binary so that verified SPL boot can be accomplished. (From OE-Core rev: 5af4dfe83c2f6509015916262be32fc09bc9714d) Signed-off-by: Klaus Heinrich Kiwi <klaus@linux.vnet.ibm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-06u-boot: Move definitions to common locationsKlaus Heinrich Kiwi
Move some definitions from u-boot.inc into uboot-config.bbclass and similarly from kernel-fitimage.bbclass into uboot-sign.bbclass, so that they can be useful when signing the U-boot proper fitimage, for a verified-boot SPL. (From OE-Core rev: cc6c3e31526d3b6ef3a87ba5e548fcad7483bd51) Signed-off-by: Klaus Heinrich Kiwi <klaus@linux.vnet.ibm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-20kernel-fitimage.bbclass: support both ↵Ming Liu
KERNEL_DEVICETREE/EXTERNAL_KERNEL_DEVICETREE There are user cases that a developer wants to add both in-tree and out-of-tree devicetrees to fitimage, and this is quite normal, for instance, a developer might need the devicetrees from kernel source meanwhile maintaining his/her own devicetree overlays to be applied on top of them. To support that, we now allow KERNEL_DEVICETREE and EXTERNAL_KERNEL_DEVICETREE to be both set in configuration files, and the devicetrees in EXTERNAL_KERNEL_DEVICETREE have higher priority to override the same names in KERNEL_DEVICETREE. (From OE-Core rev: c461b245076be066512ac7b074020f6032056b8d) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-23kernel-fitimage: Don't use unit addresses on FITKlaus Heinrich Kiwi
Das U-Boot 2021.4-rc1 has the following commit: commit 3f04db891a353f4b127ed57279279f851c6b4917 Author: Simon Glass <sjg@chromium.org> Date: Mon Feb 15 17:08:12 2021 -0700 image: Check for unit addresses in FITs Using unit addresses in a FIT is a security risk. Add a check for this and disallow it. CVE-2021-27138 Adjust the kernel-fitimage.bbclass accordingly to not use unit addresses. This changte is required before we can bump U-Boot to 2021.4. (From OE-Core rev: 6047be9f8f0f5d616fda11d83b682c1b8aeaa0ae) Signed-off-by: Klaus Heinrich Kiwi <klaus@linux.vnet.ibm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-19kernel-fitimage: fix dtbo support for fit imagesAnthony Bagwell
8a2f4e143 added support for u-boot boot script but missed adding the extra parameter to fitimage_emit_section_config on the dtbo branch (From OE-Core rev: 22bac8aea0d5d28cc5a3bf20edf638225cce2f88) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-20kernel-fitimage: adding support for Initramfs bundle and u-boot scriptAbdellatif El Khlifi
This commit adds Initramfs bundle support to the FIT image in addition to u-boot boot script capability. These new features are selectable. In case of Initramfs, the kernel is configured to be bundled with the rootfs in the same binary (ie: zImage-initramfs-<machine>.bin). When the kernel is copied to RAM and executed, it unpacks the Initramfs rootfs. For more information about Initramfs please read: https://www.kernel.org/doc/Documentation/filesystems/ramfs-rootfs-initramfs.txt For more details about the Initramfs bundle and boot script implementation please check the kernel-fitimage.bbclass paragraph in Yocto reference or mega manual. Current limitations: - Initramfs bundle FIT support has been tested on ARM 32-bit - The kernel image type in case of ARM 32-bit is zImage Change-Id: I901bfd899e8d733c5b9a2b6645b1d4748f4b1fda (From OE-Core rev: 19fa415c8769a67b52babd80f71d68bf36a21db2) Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-20classes/kernel-fitimage: add ability to sign individual imagesLuca Boccassi
Add the ability to have the kernel, dtb and ramdisk individually signed by setting FIT_SIGN_INDIVIDUAL = "1". This could be useful if you are intending to verify signatures before using kexec for example. (From OE-Core rev: 51b6e87df6babf74e73a6d704f044bd88c277ac9) Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-20classes/kernel-fitimage: add ability to add additional signing optionsPaul Eggleton
Add a UBOOT_MKIMAGE_SIGN_ARGS variable to enable passing additional options to uboot-mkimage when it is run the second time to perform signing. (From OE-Core rev: 8fd7ee7414b45a1feeef7982af3583475902a677) Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-20classes/kernel-fitimage: allow substituting mkimage commandPaul Eggleton
Add a UBOOT_MKIMAGE and UBOOT_MKIMAGE_SIGN variables to allow specifying an alternative uboot-mkimage executable (or wrapper script/function). (From OE-Core rev: aee5bac02eff28a75fa1eee646bc511984013aa4) Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-20classes/kernel-fitimage: make fitimage_emit_section_config more readableEaswar Hariharan
fitimage_emit_section_config() has a number of arguments, add named variables to make the function a bit more readable. (From OE-Core rev: a82340eed3165825c129c1f2b1ebf250e0e699c2) Signed-off-by: Easwar Hariharan <eahariha@microsoft.com> Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-20classes/kernel-fitimage: add variable for descriptionPaul Eggleton
Add a FIT_DESC variable to make it possible to change how the description is set in the FIT image. (From OE-Core rev: 47c5ea69e1a6c4fd3aa766d5223aff1201a4a1d8) Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-06kernel-fitimage: generate openssl RSA keys for signing fitimageUsama Arif
The keys are only generated if they dont exist. The key generation can be turned off by setting FIT_GENERATE_KEYS to "0". The default key length for private keys is 2048 and the default format for public key certificate is x.509. (From OE-Core rev: 8dfaf5cd4eb5c8e352e7833ec47db1a14ea58b47) Signed-off-by: Usama Arif <usama.arif@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-08kernel-fitimage: build configuration for image tree when dtb is not presentUsama Arif
This patch adds support for adding configuration node even when dtb is not part of the FIT image. The conf and default node number are therefore changed to point to kernel ID rather than dtb ID when dtb does not exist. (From OE-Core rev: 2d9f3c3d763e2bca704da4019add973b9a2c572f) Signed-off-by: Usama Arif <usama.arif@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-14kernel-fitimage: fix devicetree reproducibilityAlex Kiernan
Ensure that the order of dtb/dtbo files in the generated fitimage is reproducible. Fixes: 71bfa9838cbf ("kernel-fitimage: Handle overlays in EXTERNAL_KERNEL_DEVICETREE") (From OE-Core rev: 9e4a91b63dd8e0c1708da2ac7de461b35fb0b011) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-13kernel-fitimage: Handle overlays in EXTERNAL_KERNEL_DEVICETREEAlex Kiernan
When using EXTERNAL_KERNEL_DEVICETREE, collect DTB overlays too (*.dtbo) as well as iterating down into sub-directories so using the behaviour for naming which matches KERNEL_DEVICETREE. (From OE-Core rev: 169ebd59f11845a3a5a7157719217ccf0844e448) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-31kernel-fitimage: introduce FIT_SIGN_ALGRichard Leitner
make fitImage configuration signature algorithm selectable with FIT_SIGN_ALG. (From OE-Core rev: e24b27a2b49e97cec6153f2d642d17a901b8ba12) Signed-off-by: Richard Leitner <richard.leitner@skidata.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-23kernel-fitimage: Cope with non-standard kernel deploy subdirectoryMike Crowe
kernel.bbclass installs non-standard kernels (where KERNEL_PACKAGE_NAME is not "kernel") in a subdirectory of ${DEPLOYDIR}. To achieve this kernel_do_deploy sets the deployDir shell variable to ${DEPLOYDIR} for the standard kernel or ${DEPLOYDIR}/${KERNEL_DEPLOYSUBDIR} for non-standard kernels. kernel-fitimage.bbclass's kernel_do_deploy_append ought to do the same and can do so by using the same shell variable. (From OE-Core rev: d324b22d32eaea9e4337c963c8b1a33b0ba6a2dd) Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-27kernel.fitimage.bbclass: remove ramdisk_ctypeHeiko Schocher
set in the ramdisk node the compression property always to "none", as U-Boot nowadays since commit: b1307f884a91 ("fit: Support compression for non-kernel components (e.g. FDT)") decompress non kernel components. Setting compression to the used comression algorithm now, will end in fail of your kernel boot with the ramdisk. This issue is fixed since commit: bddd98573465 ("fit: Do not automatically decompress ramdisk images") which now prints a warning in U-Boot, instead of decompressing the ramdisk, but we should setup compression property correct. (From OE-Core rev: f963a51544a9a7b1abbaa87c95b3c0279847d697) Signed-off-by: Heiko Schocher <hs@denx.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-19kernel-fitimage: introduce FIT_HASH_ALGAyoub Zaki
sanitize fitImage hash algorithm selection with FIT_HASH_ALG switch default hash algorithm from sha1 to sha256 (From OE-Core rev: 8c9d5d59cb1575fac17c461090937df4cbb3d3b5) Signed-off-by: Ayoub Zaki <ayoub.zaki@embexus.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-12kernel-fitimage: uboot-sign: Check UBOOT_DTB_BINARY before adding depsAlex Kiernan
Since UBOOT_DTB_BINARY empty means we don't need to inject signatures into the U-Boot DTB, we can remove the dependencies between consumers of these two classes and resolve a circular dependency between u-boot and kernel. (From OE-Core rev: c6b49cb75285e71909d1f9e4bf636f186941b519) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-12kernel-fitimage: support RISC-VMichael Scott
Support RISC-V kernel image, using the "Image" target. This change allows RISC-V support for fitImage via the following flow: OpenSBI -> u-boot (as payload) -> Linux kernel (as fitImage with ramdisk and dtb). This was tested using QEMU RISC-V 64-bit. (From OE-Core rev: 35d0842c637b7d7ce0ab01f43b594c19a964872f) Signed-off-by: Michael Scott <mike@foundries.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-28kernel-fitimage: Replace tabs with spaces in pythonAlex Kiernan
Fix: WARNING: python should use 4 spaces indentation, but found tabs in kernel-fitimage.bbclass, line 33 (From OE-Core rev: 00716a795f10e223150b0f9b214d185d654f4cc1) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-26kernel-fitimage.bbclass: Introduce a way to provide external dtbManjukumar Matha
Currently kernel-fitimage gets the dtb from KERNEL_DEVICETREE, however there are instances when the DTB file can be generated using other recipes, provide a way to include the DTB instead of inkernel device tree. Add support for external device tree during the creation of fitimage. If virtual/dtb is set using PREFERRED_PROVIDER_virtual/dtb = "devicetree", which inherits the devicetree.bbclass then use the path provided in EXTERNAL_KERNEL_DEVICETREE else use KERNEL_DEVICETREE during fitimage process (From OE-Core rev: 084f4de4dbaf9821516fc0254d35f4fb04311d27) Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-18kernel-fitimage.bbclass: Fix the dependency issue while generating ↵Manjukumar Matha
fitimage_initramfs When building fitimage_initramfs, the correct depedency is to build after do_bundle_initramfs. We can run into the following dependency issue DEBUG: Python function extend_recipe_sysroot finished DEBUG: Executing shell function do_assemble_fitimage_initramfs aarch64-xilinx-linux-objcopy: 'vmlinux': No such file This happens because initramfs renames vmlinux to vmlinux.bak while generating vmlinux.initramfs, there is a chance that fitimage_initramfs can also start during this process and create the above issue. This patch resolve the dependency issue by running fitimage_initramfs task after do_bundle_initramfs (From OE-Core rev: 8f0bece39a634fce5bd882cbd9e289ea905a0b17) Signed-off-by: Varalaxmi Bingi<varalaxm@xilinx.com> Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08uboot-sign.bbclass: fix signature and deploymentRobert Yang
Fixed: MACHINE = "beaglebone-yocto" KERNEL_CLASSES += "kernel-fitimage" KERNEL_IMAGETYPE_beaglebone-yocto = "fitImage" UBOOT_MACHINE_beaglebone-yocto = "am335x_boneblack_vboot_config" UBOOT_MKIMAGE_DTCOPTS = "-I dts -O dtb -p 2000" UBOOT_SIGN_KEYDIR = "${TOPDIR}/conf" UBOOT_SIGN_KEYNAME = "dev" UBOOT_SIGN_ENABLE = "1" IMAGE_INSTALL_remove = "kernel-image-zimage" $ cd conf $ openssl genrsa -F4 -out dev.key 2048 $ openssl req -batch -new -x509 -key dev.key -out dev.crt $ cd ../ $ bitbake u-boot linux-yocto $ grep signature tmp/deploy/images/beaglebone-yocto/*.dtb Binary file tmp/deploy/images/beaglebone-yocto/u-boot-beaglebone-yocto-2018.07-r0.dtb matches Binary file tmp/deploy/images/beaglebone-yocto/u-boot-beaglebone-yocto.dtb matches Binary file tmp/deploy/images/beaglebone-yocto/u-boot.dtb matches And there would be no signature info when rebuild from sstate: $ bitbake u-boot linux-yocto -cclean $ bitbake u-boot linux-yocto $ grep signature tmp/deploy/images/beaglebone-yocto/*.dtb No result This s because kernel directly edit ${DEPLOY_DIR_IMAGE}/u-boot.dtb, (Note, it is global ${DEPLOY_DIR_IMAGE}, not recipe's DEPLOYDIR), so that the modified info is not in sstate, and would be lost when rebuild from sstate. There are other problems in previouse code: - The u-boot.dtb is provided by u-boot, but edited by kernel during signing, so it should be deployed by kernel rather than u-boot. - The u-boot.do_concat_dtb directly install files to global ${DEPLOY_DIR_IMAGE}, this is incorrect, the ${DEPLOY_DIR_IMAGE} should be installed by do_deploy. - It seems that it assumes do_deploy depends on do_install according the comments, but they have no relationships: # do_concat_dtb is scheduled _before_ do_install as it overwrite the # u-boot.bin in both DEPLOYDIR and DEPLOY_IMAGE_DIR. - The do_concat_dtb should be run after do_compile, but it doesn't have this dependency. Make u-boot install u-boot.dtb to ${datadir}, kernel copies u-boot.dtb from ${STAGING_DATADIR} to ${B} and deploy it can fix the problem. [YOCTO #12112] Reported-by: Christian Andersen <c.andersen@kostal.com> (From OE-Core rev: 493f70cfb177f1d452a13329647a38642bf2b161) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08kernel-fitimage: Replace tabs with spaces in pythonAlex Kiernan
Fix: WARNING: python should use 4 spaces indentation, but found tabs in kernel-fitimage.bbclass, line 24 (From OE-Core rev: 4ec42465e9df8cef20a97be11243726aa7dfb8c1) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23u-boot: Add mkenvimage toolAlexey Brodkin
This utility is used for creation of images containing usable in run-time U-Boot environment. As of today this utility is added per-board like here [1] for Intel Edison board. [1] http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel-edison/tree/meta-intel-edison-bsp/recipes-bsp/u-boot/u-boot-tools_2014.04.bb Given there're quite some U-Boot tools that we may want to add later this recipe name switch from "u-boot-mkimage" to generic "u-boot-tools" still for compatibility we provide "u-boot-mkimage" with help of PROVIDES as well as proposed "u-boot-mkenvimage". (From OE-Core rev: 314885b16e5d26d27d46a4bfb0d581b27a03b8fe) Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Richard Purdie <richard.purdie@linuxfoundation.org> Cc: Otavio Salvador <otavio@ossystems.com.br> Cc: Martin Jansa <martin.jansa@gmail.com> Cc: Ross Burton <ross.burton@intel.com> Cc: Marek Vasut <marex@denx.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-22kernel-fitimage: Fix dangling symlink to image tree sourceAlex Kiernan
When deploying the its file, the target of the symlink is missing the its extension, add it here. (From OE-Core rev: df72761760d453b2dfc7cc2fa1344bb016df9712) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-21kernel*.bbclass: rename *_SYMLINK_NAME variables to *_LINK_NAME and ↵Martin Jansa
*_BASE_NAME to *_NAME * for consistency with IMAGE_NAME and IMAGE_LINK_NAME and to avoid confusion with IMAGE_BASENAME (which is the actual name of the artifact, e.g. PN while KERNEL_IMAGE_BASE_NAME was only the version suffix) (From OE-Core rev: f952c8e08b4798aa0f8bf764cfd70bda0eae9b8b) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-21kernel-artifact-names, kernel-fitimage: add KERNEL_FIT_BASE_NAME, ↵Martin Jansa
KERNEL_FIT_SYMLINK_NAME variables * use the same naming scheme for fitImage files like all other deployed artifacts * remove unnecessary cd to DEPLOYDIR * remove unnecessary cd to B (From OE-Core rev: fd69f8b2d7dd950cee9e820ef91ea90521c95ace) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-05kernel-fitimage: add support for ext2.gz initramfs filesChunrong Guo
(From OE-Core rev: e2e0c91c2c8229d9ed0958de98b5a9b14c6805d1) Signed-off-by: Chunrong Guo <chunrong.guo@nxp.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-04kernel-fitimage: Make DTB key insertion optionalAlex Kiernan
If UBOOT_DTB_BINARY is empty, then don't try inserting the U-Boot signing keys into the DTB. In this configuration the keys are expected to be already present in U-Boot's DTB. (From OE-Core rev: a0d74767f7bd18c853df6b0be162363076d8f965) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-18kernel-fitimage: Add DTBO support for configurationsAlex Kiernan
When generating overlay DTB configuration sections, U-Boot doesn't want the kernel specified again as we already have that in our base DTB. Add support for this to allow bootm to process overlay configuration sections. (From OE-Core rev: c0db9776beb4f519079a554a733353c368739dcf) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-06-18kernel-fitimage: Allow setting of DTB/DTBO relocation addressAlex Kiernan
Introduce UBOOT_DTB_LOADADDRESS and UBOOT_DTBO_LOADADDRESS so that you can set where U-Boot loads full and overlay DTBs. This is required when using bootm's overlay support to construct the final DTB. (From OE-Core rev: 05d2230db1d7379494814407fc0d79d7e755d89e) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-02-15kernel-fitimage.bbclass: Fix 64 bit ENTRYPOINTVineeth Chowdary Karumanchi
64 bit entry point should be passed in 2 literals ( "0x1 0x00008000" ).ENTRYPOINT is assigned with first half only and erroring out as 'command not found' for the second half. Adding quotes while assignment fixes the issue. (From OE-Core rev: e886c9c5e1a8ab28388a2e8bbb936ad5eea78615) Signed-off-by: Vineeth Chowdary Karumanchi <vineethchowz.chowdary@xilinx.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-04kernel-fitimage.bbclass: Fix bad image type replacement for microblazeManjukumar Matha
When using kernel-fitimage class with microblaze, the image type has to be linux.bin not zImage. This patch fixes the bad image type replacement for microblaze (From OE-Core rev: 4e0903e2f71658d595ccb1fa9dddf0f73b373f7e) Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-02kernel-fitimage: Fix bad image type replacement for aarch64Thomas Perrot
When using kernel-fitimage class with aarch64, the image type has to be Image not zImage. This patch fixes the bad image type replacement for aarch64 (From OE-Core rev: d14adead5861007ac7e95c32396491f907ab9f8f) Signed-off-by: Thomas Perrot <thomas.perrot@tupi.fr> Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-25kernel-fitimage: support MIPS (compressed)André Draszik
On MIPS, the compressed kernel image target is vmlinuz.bin (From OE-Core rev: 74d97569aa4e0f82e094a539dec302076103affa) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-25kernel-fitimage: unbreak UBOOT_ENTRYSYMBOL supportAndré Draszik
- vmlinux is located in ${B}, not ${S}. - parsing of nm output got broken completely in commit b406a89935f148779569fa3770776e009dd51f13 ("kernel-fitimage: add initramfs support"), commit ec755d2524fcbd9dfded23a576f25c990d405a6c in yocto While at it, make awk exit on match to save a few CPU cycles. (From OE-Core rev: 9d2ec9c046c4a9c6a842d28133d40639f5a65297) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-25kernel-fitimage: sanitize dtb section name (unbreak MIPS)André Draszik
We can't build fitImages for MIPS any more: | Error: fit-image.its:21.27-28 syntax error | FATAL ERROR: Unable to parse input tree | uboot-mkimage: Can't read arch/mips/boot/fitImage.tmp: Invalid argument Since commit cd2ed7f80b555add07795cc0cbaee866e6c193a3 ("kernel-fitimage: dtb sections named by their filenames and one config section for each dtb"), commit 1ec405ef5df82884c8997878bbe6c66d924b5127 in yocto, dtb sections are named by the DTB filename, but the filename can legally be in a subdirectory below arch/$arch/boot/dts/, and on MIPS all DTBs are actually in a subdirectory. If so, mkimage fails with the above error message. Unbreak this by replacing the offending character (directory separator /) (From OE-Core rev: 335fc50cf54e47db4e3d5c35a9846484faf0270f) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-01kernel.bbclass: introduce INITRAMFS_IMAGE_NAMEMing Liu
It defaults to ${INITRAMFS_IMAGE}-${MACHINE} if INITRAMFS_IMAGE is not empty. This allows the end users to be able to override the initramfs image name with a customized value. (From OE-Core rev: e788fb2b894852f71b1c545abde71b45b9f230dc) Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-27classes: Replace "if test" file tests with POSIX file testsuninative-1.6Robert P. J. Day
In entire meta/classes/ directory, replace shell tests of the form "if test -? ..." with POSIX tests of the form "if [ -? ... (From OE-Core rev: 78928016f4cf38cf6751cb089200bf950d07ae93) Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22kernel-fitimage: dtb sections named by their filenames and one config ↵Florian Wickert
section for each dtb Before this, dtb sections were named by their position index in KERNEL_DEVICETREE. Also there was only one item in the config section, so only the first dtb was seen by the bootloader. This patch adds a config section for each dtb named by the dtb filename. This is what bootloaders usually know about the machine they run on. (From OE-Core rev: cd2ed7f80b555add07795cc0cbaee866e6c193a3) Signed-off-by: Florian Wickert <fw@javox-solutions.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-17classes: Fix "U-boot", use proper spelling of "U-Boot".Robert P. J. Day
U-Boot people are amazingly pedantic in their insistence on proper spelling of "U-Boot", so humour them. (From OE-Core rev: f346a9bdc372ec477bafcda358f9339ff4e4c79d) Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23kernel-fitimage: Use compressed ramdisks in FIT images if availableRick Altherr
kernel-fitimage:fitimage_assemble() was calling copy_initramfs from kernel.bbclass which decompresses the initramfs cpio. Assume that if INITRAMFS_FSTYPES includes a compressed cpio, that is what it desired in the FIT image. (From OE-Core rev: 842ad404b36e00c89f615a3f7db4a2d30062effa) Signed-off-by: Rick Altherr <raltherr@google.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-19kernel-fitimage.bbclass: Check value of UBOOT_SIGN_ENABLENathan Rossi
Check the value of UBOOT_SIGN_ENABLE, as it is defaulted to "0" which for matches as True in python due to being a non-empty string. (From OE-Core rev: 35ebe793f2d933366863d17fb807b3d39f594334) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-19kernel-fitimage.bbclass: Don't assume KERNEL_IMAGETYPE == fitImageNathan Rossi
The name of the output image for a fitImage that contains a ramdisk should match the same as for the fitImage that does not contain a ramdisk. As such it should not be assumed that KERNEL_IMAGETYPE is "fitImage". This change explicitly sets the name of the output ramdisk/initramfs to start with fitImage as does the non-ramdisk output. (From OE-Core rev: 81caed2b7071ffc9ed8077d7d76952f2a2a4713d) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>