summaryrefslogtreecommitdiff
path: root/classes
AgeCommit message (Collapse)Author
2023-07-27toradex-fitimage.bbclass: follow changed function definition in oeMax Krummenacher
openembedded-core commit e3eb79c0a1 ("kernel-fitimage: adding support for Initramfs bundle and u-boot script") is a backport to dunfell. A parameter was added in the middle of the parameter list of the shell function fitimage_emit_section_config(). Follow that and change the calls to it accordingly. Fixes colibri-imx6ull not booting from the fitimage for the lack of a default configuration setting. Related-to: TEI-1053 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2022-04-04toradex-fitimage.bbclass: add hook to set the kernel typeMax Krummenacher
Allow to change the Type for the kernel section to 'kernel_noload' rather than using the default 'kernel'. Set UBOOT_KERNEL_TYPE to 'kernel_noload'. This is e.g. used for apalis-tk1 for TEZI. Related-to: ELB-4417 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2022-04-01toradex-fitimage.bbclass: introduce FIT_SUPPORTED_INITRAMFS_FSTYPESMing Liu
It was found when a end user wants to build a squashfs type initramfs into fitimage, it just fails without printing out any error or warning messages, which is not right. Introduce a FIT_SUPPORTED_INITRAMFS_FSTYPES variable to avoid hard-coding the supported initramfs types, and it could be overridden in config files. Also break the build when none of a supported initramfs type is found. A similar change has been merged into OE, reference: https://lore.kernel.org/all/20220328141551.571676-1-liu.ming50@gmail.com Related-to: TEI-1005 Signed-off-by: Ming Liu <ming.liu@toradex.com>
2021-10-27image_type_tezi: increase kernel NAND to 12MBFrancesco Dolcini
Increase the kernel partition size for rawnand from 8MB to 12MB, this allows to flash an upstream kernel with imx_v6_v7_defconfig. Related-to: ELB-1341 Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2021-10-25machine: Drop legacy imx8x b0 silicon based machinesMax Krummenacher
Since the update to SCFW 1.7.4 the i.MX 8X modules, based on early b0-silicon chips do no longer work. This commit removes the machines that still where there in the transition phase to the newer c0-silicon Product revisions that no longer work with our BSP are: Colibri iMX8QXP 2GB WB IT V1.0B Colibri iMX8QXP 2GB IT V1.0B Colibri iMX8DX 1GB WB V1.0B Colibri iMX8DX 1GB V1.0B Apalis iMX8QXP 2GB WB IT V1.1A Apalis iMX8QXP 2GB ECC IT V1.1A Related-to: ELB-4215 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2021-09-01devicetree: MACHINE_PREFIX: add colibri-imx6ullOleksii Bidnichenko
Related-to: ELB-4065 Signed-off-by: Oleksii Bidnichenko <oleksii.bidnichenko@toradex.com>
2021-05-20image_type_tezi: handle emmc being mmcblk2Max Krummenacher
Note that we currently do not want to use the stable symlinks to the eMMC for modules were older version of the Toradex Easy Installer exist. Using the stable symlinks would require a Toradex Easy Instaler 5.3.0 or newer. For Verdin iMX8MP 5.3.0 is the first version and thus we can directly use the stable symlink name pointing to the eMMC. Related-to: TEI-750 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2021-05-04toradex-sanity.bbclass: introduce bbclass fileMing Liu
I have observed a following OE build issue with the latest dunfell-5.x.y, as follows: ``` ERROR: OE-core's config sanity checker detected a potential misconfiguration. Either fix the cause of this error or at your own risk disable the checker (see sanity.conf). Following is the list of potential problems / advisories: TMPDIR changed to include path filtering from the pseudo database. It is recommended to use a clean TMPDIR with the new pseudo path filtering so TMPDIR would need to be removed to continue. ``` this is due to the ABI VERSION changed in OE, usually we should remove the TMPDIR and rebuild when seeing this error, but it's not enough for Toradex builds, since we have split DEPLOY_DIR out of TMPDIR, so we should also check the ABI VERSION change in DEPLOY_DIR, or else it might not comply the OE layer. We should warn the end users about this risk, let's add a toradex sanity check bbclass for that. We can also add some other basic Toradex specific sanity checks, for instance, for fitimage, the end users must inherit toradex-fitimage rather than kernel-fitimage. Related-to: ELB-3944 Signed-off-by: Ming Liu <ming.liu@toradex.com>
2021-04-19image_type_tezi.bbclass: fix a typoMing Liu
A typo was introduced by commit 9e9859a9: [ image_type_tezi.bbclass: introduce TEZI_AUTO_INSTALL ] TEZI_USE_BOOTFILES should be TEZI_AUTO_INSTALL. Related-to: TEI-773 Signed-off-by: Ming Liu <ming.liu@toradex.com>
2021-04-16image_type_tezi.bbclass: introduce TEZI_AUTO_INSTALLMing Liu
This makes it possible to build a image tarball with 'autoinstall' enabled. Related-to: TEI-773 Signed-off-by: Ming Liu <ming.liu@toradex.com>
2021-03-26toradex-fitimage.bbclass: build configuration for image tree when dtb is not ↵Ming Liu
present Partly back-port commit 2d9f3c3d763e2bca704da4019add973b9a2c572f from OE upstream: [ kernel-fitimage: build configuration for image tree when dtb is not present 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. ] to support fitImage for qemu machines which dont have a dtb node. Related-to: TOR-1700 Signed-off-by: Ming Liu <ming.liu@toradex.com>
2021-03-18image_type_tezi.bbclass: NXP license backupDenys Drozdov
Keep hard-copy version of license file in sstate cache in case of NXP connection error Related-to: ELB-3485 Signed-off-by: Denys Drozdov <denys.drozdov@toradex.com>
2021-03-04image_type_tezi.bbclass: avoid installing dtb/dtbo for fitimageMing Liu
Devicetrees and overlays have been bundled into fitimage, so we dont have to install them to boot partition. Related-to: TOR-1700 Signed-off-by: Ming Liu <ming.liu@toradex.com>
2021-03-04toradex-fitimage.bbclass: introduce bbclass fileMing Liu
To support devicetree overlays, we need let fitimage_assemble handle both ${KERNEL_DEVICETREE} and ${EXTERNAL_KERNEL_DEVICETREE} at meanwhile, but the fitimage_assemble can only deal with one. ( when ${EXTERNAL_KERNEL_DEVICETREE} is set, it will skip ${KERNEL_DEVICETREE} ) Let's override fitimage_assemble to be able to assemble all dtb/dtbo files in ${KERNEL_DEVICETREE} and ${EXTERNAL_KERNEL_DEVICETREE}. Related-to: TOR-1700 Signed-off-by: Ming Liu <ming.liu@toradex.com>
2021-03-04toradex-devicetree.bbclass: introduce bbclass fileMing Liu
The major reason for doing this is because we are currently deploying all dtbo files to ${DEPLOY_DIR_IMAGE}/devicetree, but not machine specific ones, and they will be unnecessarily bundled into fitimage when kernel-fitimage.bbclass is being inherited. To fix that, we introduce a extra task do_collect_overlays to collect machine specific overlays to ${DT_FILES_PATH} before do_compile, where dtb compilation is being compiled in. In this way, only machine specific overlays would be compiled and deployed. Now we can drop device-tree-overlay-filter recipe with this change. Related-to: TOR-1700 Signed-off-by: Ming Liu <ming.liu@toradex.com>
2021-03-02image_type_tezi.bbclass show license for tdxref builds onlyDenys Drozdov
The License window will be shown in case SHOW_EULA_FILE set to "1" Related-to: ELB-3485 Signed-off-by: Denys Drozdov <denys.drozdov@toradex.com>
2021-03-02image_type_tezi.bbclass add license file to tezi imageDenys Drozdov
Ensure there is a popup that shows the EULA license to be accepted once installing a tdxref image Related-to: ELB-3485 Signed-off-by: Denys Drozdov <denys.drozdov@toradex.com>
2021-01-28image_type_tezi: use device-tree-overlay-filterMax Krummenacher
Replace tezi_deploy_dt_overlays() with a depend on device-tree-overlay-filter. This allows to append the device tree overlays to IMAGE_BOOT_FILES and thus they do get installed to TEZI and WIC images. Before they were missing in the WIC images. Related-to: ELB-3197 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2021-01-19image_type_tezi: refine machine specific overlay deploymentMax Krummenacher
The current wildcard setting deploys machine specific overlays with <machine>* and thus e.g. apalis-imx8 gets additionally those specific to apalis-imx8x. Fix that. Related to: ELB-3499 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2021-01-19image_type_tezi: allow to use without a tordex distroMax Krummenacher
If one uses our BSP layers / machines without a Toradex distro the do_image_teziimg step fails due to missing variables. Add weak defines of those. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2020-11-24meta: drop 'overlays' sub-directory from fdt_overlaysMing Liu
This patch mainly aims to let fdt_overlays only contain devicetree overlay names without the 'overlays' sub-directory. Also add a sanity check for items in TEZI_EXTERNAL_KERNEL_DEVICETREE_BOOT, if a item not existing in boot filesystem, throw a error at build time. A complementary patch is needed to boot script, to load devicetree overlays from a configurable prefix. Related-to: TOR-1537 Signed-off-by: Ming Liu <ming.liu@toradex.com>
2020-11-13image_type_tezi.bbclass: drop teziimg-distro image typeMing Liu
We have decided to drop boot partition from EMMC/RAWNAND devices for all Torizoncore images, in which case, we dont have to maintain a extra image type teziimg-distro for Torizoncore, let's drop it. This patch would not introduce any functional change to teziimg images, just aims to drop all Torizoncore related code. Introduce two new variables to make teziimg more extendable: - TEZI_ROOT_NAME: the end user could choose rootfs image name, for instance, "rootfs", "ota". - TEZI_USE_BOOTFILES: the end user could decide if a boot partition should be created for EMMC device. Related-to: TOR-1334 Signed-off-by: Ming Liu <ming.liu@toradex.com>
2020-10-16image_type_tezi.bbclass: add tezi_deploy_dt_overlays prefuncsMing Liu
Move the code deploying dtb overlays to a prefuncs tezi_deploy_dt_overlays of do_image_bootfs, and put all prefuncs of do_image_bootfs, do_image_teziimg, do_image_teziimg_distro to variables so that they could be overridden in other meta layers. For instance, an end user might want to write his/her own image.json file according to his/her partitions layout. Also fix a missing double quotes. Related-to: TOR-1334 Signed-off-by: Ming Liu <ming.liu@toradex.com>
2020-10-14image_type_tezi: fix machine overlay with carrier postfix deploymentMax Krummenacher
We have machine overlay where the machine name is postfixed with the carrier board name, e.g. colibri-imx7-aster_atmel-mxt_overlay.dts. No longer require an '_' after the machine name to deploy also overlays with a postfix after the machine name. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2020-10-14image_type_tezi: colibri-imx7-emmc fix overlay deploymentMax Krummenacher
For the colibri-imx7-emmc machine we need the overlays prefixed with colibri-imx7. Due to the changed machine name the machine specific overlays did not get deployed into a image. Fix that. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2020-10-14image_type_tezi: i.mx 8x fix overlay deployment for b0 siliconMax Krummenacher
We have separate machines for the now deprecated i.MX 8X B0 silicon based modules. Due to the changed machine name the machine specific overlays did not get deployed into a image. Fix that. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2020-10-06class: image_type_tezi: use tezi config format 4 for mx8Philippe Schenker
On i.MX8 processors there was a bug in Tezi that leaked an old u-boot environment into newly installed image. This got fixed and can be enforced by using Tezi config format number 4. Make use of that. Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
2020-09-01Revert "image_type_tezi: drop device-tree-overlays"Max Krummenacher
The device-tree overlays have been reworked. Reenable the build and deployment. This reverts commit 1914b33f70f13b5460152daaf49de7511e4990ee. Related-to: ELB-2943 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2020-08-17image_type_tezi: drop device-tree-overlaysMax Krummenacher
They currently do not build against the downstream kernel, drop them if building for a downstream kernel for now. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2020-08-09image_type_tezi.bbclass: drop UBOOT_BINARYMing Liu
It's useless and would be overridden by the same definition in imx-base.inc of meta-freescale layer. Related-to: ELB-2553 Signed-off-by: Ming Liu <ming.liu@toradex.com>
2020-08-09image_type_tezi.bbclass: change u-boot env file nameMing Liu
The default u-boot env file name has changed to u-boot-initial-env in OE layer, adapt to it. Related-to: ELB-2553 Signed-off-by: Ming Liu <ming.liu@toradex.com>
2020-07-06image_type_tezi: rename overlays folderIgor Opaniuk
Rename destination "devicetree" with dtb overlays (on bootfs) to "overlays". Relates-to: ELB-2807 Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com> (cherry picked from commit 288b7e41f508e0dcde66b536953d014dd4497971)
2020-06-30image_type_tezi.bbclass: increase min boot partition size to 3x payloadMarcel Ziswiler
If using upstream variants kernel itself is close to 8 MB and one can barely keep a backup copy in the resulting 16 MB! Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> (cherry picked from commit aae74f006cd02717df3b047b59940196de53c105)
2020-06-30image_type_tezi.bbclass: remove quotes from u-boot variableOleksandr Suvorov
Iterating through the variable don't interpret quotes at and they act as a part of variable. It leads to iterate with the wrong filenames [1]. Removing quotes fixes overlay names. [1] ----------------- PC $ cat overlays.txt fdt_overlays="1 2 3" Apalis iMX6 # env import -t ${loadaddr} overlays.txt Apalis iMX6 # print fdt_overlays fdt_overlays="1 2 3" Apalis iMX6 # for overlay_file in ${fdt_overlays}; do echo "file=${overlay_file}"; done file="1 file=2 file=3" ----------------- Related-to: ELB-2797 Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com> (cherry picked from commit b8b2e862432c0a30f41bd19efb66ec80267e7f5d)
2020-06-09image_type_tezi.bbclass: fix getting list if dtbosOleksandr Suvorov
Commit 0b33be8f "image_type_tezi.bbclass: allow inexistence of machine specific overlays" introduces the regression bug, that prevents to gather machine-specific dtbos. This commit fixes the bug. Fixed: 0b33be8f ("image_type_tezi.bbclass: allow inexistence of machine specific overlays") Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com> (cherry picked from commit 5846cdddd88363cfa8bab0bf14d5999f20503709)
2020-06-09image_type_tezi.bbclass: allow inexistence of machine specific overlaysMarcel Ziswiler
Gracefully continue should there not (yet) be any machine specific device tree overlays. This avoids the following build failure: ERROR: Logfile of failure stored in: /home/user/builds/oe-core_4.0/build /tmp/work/apalis_imx8-tdx-linux/console-tdx-image/1.0-r0/temp /log.do_image_bootfs.4117712 Log data follows: | DEBUG: Executing python function tezi_deploy_bootfs_files | DEBUG: Python function tezi_deploy_bootfs_files finished | DEBUG: Executing python function set_image_size | DEBUG: 168906.400000 = 129928 * 1.300000 | DEBUG: 168906.400000 = max(168906.400000, 65536)[168906.400000] + 0 | DEBUG: 168907.000000 = int(168906.400000) | DEBUG: 168907 = aligned(168907) | DEBUG: returning 168907 | DEBUG: Python function set_image_size finished | DEBUG: Executing shell function do_image_bootfs | ls: cannot access 'apalis-imx8_*.dtbo': No such file or directory | WARNING: /home/user/builds/oe-core_4.0/build/tmp/work /apalis_imx8-tdx-linux/console-tdx-image/1.0-r0/temp /run.do_image_bootfs.4117712:1 exit 2 from 'machine_dtbos=`cd $deploy_dt_dir && ls apalis-imx8_*.dtbo`' | ERROR: Execution of '/home/user/builds/oe-core_4.0/build/tmp/work /apalis_imx8-tdx-linux/console-tdx-image/1.0-r0/temp /run.do_image_bootfs.4117712' failed with exit code 2: | ls: cannot access 'apalis-imx8_*.dtbo': No such file or directory | WARNING: /home/user/builds/oe-core_4.0/build/tmp/work /apalis_imx8-tdx-linux/console-tdx-image/1.0-r0/temp /run.do_image_bootfs.4117712:1 exit 2 from 'machine_dtbos=`cd $deploy_dt_dir && ls apalis-imx8_*.dtbo`' | ERROR: Task (/home/user/builds/oe-core_4.0/build/../layers /meta-toradex-demos/recipes-images/images/console-tdx-image.bb :do_image_bootfs) failed with exit code '1' NOTE: Tasks Summary: Attempted 5813 tasks of which 5544 didn't need to be rerun and 1 failed. NOTE: Writing buildhistory NOTE: Writing buildhistory took: 15 seconds Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> (cherry picked from commit 0b33be8fed56b44c8f0b648da20d0b6706d8e7d5)
2020-06-09image_type_tezi.bbclass: add dtoverlays supportIgor Opaniuk
Introduce TEZI_EXTERNAL_KERNEL_DEVICETREE and TEZI_EXTERNAL_KERNEL_DEVICETREE_BOOT variables. First one provides the list of overlays copied to boot partition (by default all overlays are copied), the second one sets the list of overlays that should be loaded during boot time (listed in ${bootfs}/overlays.txt). TEZI_EXTERNAL_KERNEL_DEVICETREE_BOOT defaults to be empty. Relates-to: ELB-2723 Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com> (cherry picked from commit c648af29199e2f8dedcaf6b7c3c61a2dcf6a579b)
2020-06-01image_type_tezi.bbclass: drop some redundant variablesMing Liu
UBOOT_BINARY_TEZI_EMMC has been defined in machine conf, drop it. Signed-off-by: Ming Liu <ming.liu@toradex.com> (cherry picked from commit 1f5d1d2cb0bf8711c93de21bccc6e87bea96253a)
2020-04-01toradex-kernel/u-boot-localversion: use fixed length git hashStefan Agner
Make sure the git hash is always 12 characters long. This avoids issues where we can get different length git hashes between to independent builds. This can be problematic when sstate is shared. Related-to: TOR-810 Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2020-03-19image: make sure u-boot enviroment is erasedLuka Pivk
Make sure u-boot enviroment is erased when installing new Toradex Easy Installer image Related-to: TEI-130 Signed-off-by: Luka Pivk <luka.pivk@toradex.com> (cherry picked from commit 25711572bcb5a40057b53323b8b34a28f74d9b0f)
2020-03-13toradex-kernel-config: add bbclassMing Liu
It contains a helper function kernel_configure_variable that could be called in do_configure_append task to assign a value to a config variable in ${B}/.config. Change toradex-kernel-localversion.bbclass to use this function. Signed-off-by: Ming Liu <ming.liu@toradex.com>
2020-03-06toradex-kernel-localversion.bbclass: fix set scmversion with autorevMax Krummenacher
Handle the case where SRCREV_machine is set to AUTOREV. As SRCREV_machine isn't set to INVALID as its default drop checking for INVALID. fixes: f22318f toradex-kernel-localversion.bbclass: use SRCREV to set scmversion Related-to: TOR-694 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2020-03-05toradex-kernel-localversion.bbclass: fix set scmversion with autorevMax Krummenacher
Handle the case where SRCREV is set to AUTOREV. fixes: f22318f toradex-kernel-localversion.bbclass: use SRCREV to set scmversion Related-to: TOR-694 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2020-03-04toradex-kernel-localversion.bbclass: use SRCREV to set scmversionMing Liu
In commit 32df2d41: [ toradex-kernel-localversion.bbclass: use origin branch set scmversion ] we changed to use origin branch to set scmversion, but that's not good enough, we should stick to SRCREV which is the latest original commit in the source. Related-to: TOR-694 Signed-off-by: Ming Liu <ming.liu@toradex.com>
2020-03-03image_type_tezi.bbclass: introduce TEZI_CONFIG_FORMATMing Liu
This makes 'config_format' item configurable in different layers. Signed-off-by: Ming Liu <ming.liu@toradex.com>
2020-02-13toradex-kernel-localversion.bbclass: use origin branch set scmversionMing Liu
For kernel-yocto, the commit hash of HEAD is different for every run of do_patch if there is any patch in SRC_URI, this is breaking the recipes that relying on KERNEL_VERSION which contains scmversion, so we should let scmversion stick to the original head instead of the HEAD after do_patch, this will make scmversion stable and hence will make KERNEL_VERSION stable for the recipes that relying on it. Signed-off-by: Ming Liu <ming.liu@toradex.com>
2020-02-13image_type_tezi: add distro flavour to image summaryMax Krummenacher
So that one sees in the Toradex Easy Installer which image is which. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 3d072f3077b67adf293810da51ba951dc4b6c593) And the squashed fix: (cherry picked from commit 78d71eea7dd80066067f93445a957f8396b63c6e) (cherry picked from commit e6e0f885bc858f16a6c49522d91e7b6dc67d2a16)
2020-01-16image_type_tezi.bbclass: introduce TEZI_DATEMing Liu
Introduce TEZI_DATE variable, it defaults to ${TDX_MATRIX_BUILD_TIME} but could be overridden in local.conf. It will be used to set release_date in image json files, hence it must be excluded by IMAGE_TYPEDEP_teziimg and IMAGE_CMD_teziimg-distro to avoid running into basehash mismatch problems. Signed-off-by: Ming Liu <ming.liu@toradex.com>
2020-01-16image_type_tezi.bbclass: fix image.json race conditionMing Liu
Currently we are generating image.json files directly in ${DEPLOY_DIR_IMAGE} which is not correct, since image.json file is a image specific file so race condition could happen when multiple image builds write to a same image.json. Fix it by generating image json files in ${IMGDEPLOYDIR} directory with IMAGE_BASENAME suffix and copying them to a temporary directory ${WORKDIR}/image-json with the final json names. In this way, the json files could be handled by sstate and they turn to be image specific. Signed-off-by: Ming Liu <ming.liu@toradex.com>
2020-01-09toradex-kernel-localversion: disable automatic localversionStefan Agner
Actually, LOCALVERSION_AUTO needs to be enabled to make the kernel build system picking up .scmversion. So make sure LOCALVERSION_AUTO is enabled when we generate a .scmversion file and disabled otherwise. Fixes: 1bb212d9311a ("toradex-kernel-localversion: disable automatic localversion") Signed-off-by: Stefan Agner <stefan.agner@toradex.com>