Age | Commit message (Collapse) | Author |
|
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>
|
|
This patch mainlay aims to refactor bootfs image function, use tar and
xz conversion functions to replace our own create_tezi_bootfs, the
benifit would be we could choose other compression type like Zstandard
easily by setting TEZI_BOOT_SUFFIX and TEZI_ROOT_SUFFIX for bootfs and
rootfs.
Signed-off-by: Ming Liu <ming.liu@toradex.com>
|
|
The blank should be before the value rather than after it, or else we
risk on messing up the values by 'a b' > 'ab'.
Signed-off-by: Ming Liu <ming.liu@toradex.com>
|
|
Use OFFSET_SPL_PAYLOAD to decide if a SPL has to be deployed or not.
This allows a simple integration of machines which have an SPL (as e.g.
verdin-imx8mm has) but do aggregate the SPL and U-Boot proper into one
binary.
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
|
|
The list of deployed U-Boot artefacts is set in python for the 'distro'
tezi-image, but in the non 'distro' case directly in the tar command.
Unify that to put the list together in python.
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
|
|
If DISTRO_FLAVOUR is not set, then the string '${DISTRO_FLAVOUR}' is
appended.
Fix this by providing a weak default.
Fixes commit 3d072f3077b6.
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
|
|
So that one sees in the Toradex Easy Installer which image is which.
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
|
|
The image recipes do not really support rm_work, I have observed a lot
of build issues when I modified some do_image tasks while do_rootfs not
touched, to give a example:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:buildinfo(d)
0003:
File: 'meta/classes/image-buildinfo.bbclass', lineno: 67, function: buildinfo
0063:# Write build information to target filesystem
0064:python buildinfo () {
0065: if not d.getVar('IMAGE_BUILDINFO_FILE'):
0066: return
*** 0067: with open(d.expand('${IMAGE_ROOTFS}${IMAGE_BUILDINFO_FILE}'), 'w') as build:
0068: build.writelines((
0069: '''-----------------------
0070:Build Configuration: |
0071:-----------------------
so we set RM_WORK_EXCLUDE to avoid running into those problems.
Signed-off-by: Ming Liu <ming.liu@toradex.com>
|
|
This patch mainly aims to reintroduce a old commit 1b5ef0c9:
[ image_type_tezi.bbclass: drop some useless code ]
which was reverted later on since it did not fix the problem, I
refactor that patch to really fix it.
I have observed this "basehash changed" issue quite often recently, it
could be reproduced easily by the following steps:
1 bitbake imagename
2 change your system time by one day ahead.
3 bitbake imagename
After debugging it with bitbake-diffsigs, I found it's still caused by
'DATE' variable changing, as follows:
| basehash changed from ecb5b34a4997e7f037f146932728f3eca9af34d70729e4c83cdd920dc21d7677 to
| 92ad5341f99ff3a56987f4ccdc34030d5aa3e3ea1365737b5a81a12e6eb83798
| Variable DATE value changed from '20190905' to '20190906'
our tricky fix of introducing 'TDX_VERDATE' does not really work,
actually it makes things worse, 'DATE' has been deleted when parsing
IMAGE_CMD_* tasks, which was introduced by commit 4af13a48 in OE:
[ image.bbclass: delete DATE variable too ]
which means DATE would not be expanded during recipe parsing, but
TDX_VERDATE would, so we should replace TDX_VERDATE with DATE in
IMAGE_CMD_teziimg and IMAGE_CMD_teziimg-distro tasks.
To fix this annoying issue, the key point is we should avoid
expanding 'DATE' during recipe parsing stage, or else the
vardepsexclude would not take effect since the 'DATE' has already
been expanded, so we should change a DATE reference in rootfs_tezi_json
function:
d.getVar('DATE') -> d.getVar('DATE', False)
And there is seems still some order issue when bitbake handle
vardepsexclude of IMAGE_CMD_* tasks, I have to explicitly set it
for do_image_teziimg and do_image_teziimg_distro.
With the above changes, the error does not show up again.
Signed-off-by: Ming Liu <ming.liu@toradex.com>
|
|
The TEZI_KERNEL_IMAGETYPE definition has been removed, however it is still
used in the code. Change that to use KERNEL_IMAGETYPE.
The results in image.json containing '"zImage"' instead of 'null' as the
kernel filename.
Fixes c1891e02dc9c.
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
|
|
The changes include:
- Introduce tezi_deploy_files helper function, it could be used to
install files listed in IMAGE_BOOT_FILES, the install logic is same
with how WIC handle IMAGE_BOOT_FILES.
- Use WKS_FILE_DEPENDS to handle the dependencies of do_image_teziimg
and do_image_teziimg_distro, when USING_WIC is not set, then we need
add WKS_FILE_DEPENDS to DEPENDS, or else it would be done in wic
image bbclass.
- Drop TEZI_KERNEL_IMAGETYPE and TEZI_KERNEL_DEVICETREE, now all the
boot files would be controlled by IMAGE_BOOT_FILES.
- Use ${IMAGE_LINK_NAME} instead of ${IMAGE_NAME}, to avoid including
DATETIME for torizon builds.
Patch has been verified on the following machines, the artifacts
generated with and wihtout the patch are identical:
- apalis-imx6
- apalis-imx8
- apalis-tk1
- apalis-tk1-mainline
- colibri-imx6
- colibri-imx6ull
- colibri-imx7
- colibri-imx8x
Signed-off-by: Ming Liu <ming.liu@toradex.com>
|
|
There are quite a few common code being shared by rootfs_tezi_rawnand
and rootfs_tezi_distro_rawnand, we should merge them to a same function
to avoid being redundant.
Signed-off-by: Ming Liu <ming.liu@toradex.com>
|
|
With thud I still see "basehash value changed" errors, even though the
commit e74158b6c is available in the OE thud branch.
This reverts commit 9f84ffa4b42b4d518191116614aef269ab227f0e.
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
|
|
Check whether argument two is given before passing it to basename.
This avoids build failure when building without deploying device
trees in the bootfs (e.g. TorizonCore).
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
|
|
The i.MX8 kernel is currently 20MB and doesn't fit in the hard coded 16MB
boot partition size.
Set the boot partition size dynamically to twice the payload size
rounded up to the next power of 2, but at least to 16MB.
The Apalis iMX8 needs additional firmware for HDMI in the boot partition.
Provide a new MACHINE_BOOT_FILES variable which adds to the list of to be
installed files.
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
|
|
Replace hard-coded tar.xz by TEZI_ROOT_SUFFIX since the rootfs image
suffix is being controlled by that variable.
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
(cherry picked from commit 88f649a1b13762024413ba57e87b58b3a6bb6812)
|
|
We currently have some tricky code intended to get rid of the
"basehash value changed" errors, but they are actually not needed.
Since the references to "DATE" only exist in image tasks or their
prefuncs, so they would be expanded at task executing time but not
recipe parsing time, a 'vardepsexclude' flag would be enough in this
case.
I guess the reason we introduced this piece of code was that we
found we still could see the annoying "basehash value changed" errors
with 'vardepsexclude' flag set at that moment, but that's probably was
not caused by our code, it's actually another issue now had been fixed
in OE by e74158b6cc1d683ab14ef5d47ec531f986fc2259:
[ rm_work: sort the value of do_build dependencies ]
We can safely drop these useless code per my test.
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
(cherry picked from commit 1b5ef0c9c3d5765622d45725d9fd64154cf27fed)
|
|
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
(cherry picked from commit e9cc1d5996eee20018979f4e54e2239393bd3142)
|
|
Aarch64 typically stores device trees in subdirectories, e.g.
freescale/fsl-imx8qm-apalis.dtb. However, the kernel-devicetree.bbclass
deploys those files without subdirectory. Make sure the Tezi image class
behaves like the kernel-devicetree.bbclass.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
|
|
These machines use an old Nvidia provided downstream kernel 3.1.10. They no
longer much the way more recent sysroot components, e.g. libc, xserver et. al.
The maintance burden to keep the userspace components in their old version
becomes simply to high. Keep using the rocko based 2.8 BSP for these machines.
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
|
|
Drop bootfs_get_size since it has a obvious flaw, it's being called in
both do_image_teziimg and do_image_teziimg_distro but the boot files of
these two tasks are different.
Drop rootfs_get_size, it's trying to get the size of IMAGE_ROOTFS
directory, but in some cases, that is not correct, for instance, when
TEZI_ROOT_SUFFIX is 'ota.tar.gz', the rootfs directory should be
OTA_SYSROOT rather than IMAGE_ROOTFS.
Introduce get_uncompressed_size function, it reads the image size from
a image-size file in ${T} directory, and that image size is written into
this file by the image functions when they making the tarballs.
Also split the duplicated bootfs tarball creating code to a common
function create_bootfs, and it must run as a prefuncs before
rootfs_tezi_run_json and rootfs_tezi_run_distro_json, this ensures the
image size has been written to the file when the later functions run.
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
[use _append for tar commands]
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
|
|
Search made with the following regex: getVar ?\((.*), True\), this is
to be consistent with OE.
This is follows the fix upstream in oe-core commit 7c552996:
[ meta: remove True option to getVar calls ]
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
|
|
In some cases kernel and device tree may be a part of rootfs and in this
case we do not want to install anything related to kernel or device
tree.
Use TEZI_KERNEL_IMAGETYPE = "" to exclude kernel
Use TEZI_KERNEL_DEVICETREE = "" to exclude device tree
Signed-off-by: Luka Pivk <luka.pivk@toradex.com>
|
|
It's redundant to inherit image_types bbclass, it's already done in
image.bbclass.
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
|
|
Before the latest changes eMMC was considered the default flash
type and therefor not specified for all machines. Make sure that
image_type_tezi.bbclass is backward compatible by setting
TORADEX_FLASH_TYPE to "emmc" by default.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
|
|
Implement a separate teziimg class which support distro boot. This
image format uses a layout which allows distro boot on block devices
as well as raw NAND devices. It also support multi flash type images
by creating two image.json files for each flash type. It requires
machine specific meta data e.g.:
TORADEX_PRODUCT_IDS = "0032 0033 0039 0041"
TORADEX_PRODUCT_IDS[0032] = "imx7s-colibri-eval-v3.dtb,rawnand"
TORADEX_PRODUCT_IDS[0033] = "imx7d-colibri-eval-v3.dtb,rawnand"
TORADEX_PRODUCT_IDS[0039] = "imx7d-colibri-emmc-eval-v3.dtb,emmc"
TORADEX_PRODUCT_IDS[0041] = "imx7d-colibri-eval-v3.dtb,rawnand"
TORADEX_FLASH_TYPE = "rawnand emmc"
UBOOT_BINARY_TEZI_EMMC = "u-boot.imx-sd"
UBOOT_BINARY_TEZI_RAWNAND = "u-boot.imx-nd"
UBOOT_ENV_TEZI_EMMC = "uEnv-sd.txt"
UBOOT_ENV_TEZI_RAWNAND = "uEnv-nd.txt"
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
|
|
Prefer the $() syntax, it is POSIX and allows nesting.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
|
|
Allow to use a different U-Boot binary/environment file per
flash type. This prepares for a multi flash type image.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
|
|
Add variables to customize which rootfs image type we use in
the Toradex Easy Installer image. Also allow custom root
filesystem label.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
|
|
This prepares support for images with multiple flash types.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
|
|
The whole tarball is built as part of the the teziimg CMD.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
|
|
Break tar commands for better readability. No functional change.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
|
|
Create a separate function to calculate bootfs size. This allows
to reuse bootfs size calculation for distro boot.
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
|
Now that OpenEmbedded core does not prefix dtb files names with
the type of the kernel image, we can get rid of our intermediate
KERNEL_DEVICETREE_FILES variable. Also the tar transformation
which removed kernel type prefix is no longer necessary.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
|
|
The following openembedded core commit dropped prefixing the dtb file
names with the type of the kernel image.
1860d9d3c62e2e94cd68a809385873ffd8270b6d
kernel-devicetree.bbclass: Fix and simplify instalation of DTB files
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
|
|
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
|
|
Use IMAGE_NAME_SUFFIX variable rather than hardcoded value .rootfs
as suffix.
Signed-off-by: Drew Moseley <drew.moseley@northern.tech>
[use Python in rootfs_tezi_(emmc|rawnand) to get image suffix]
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
|
|
https://bugzilla.yoctoproject.org/show_bug.cgi?id=11372
With the fix available in rocko we can now replace the workaround
with the usual bitbake syntax.
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
|
|
This works around bitbake throwing the following error:
| ERROR: When reparsing ...angstrom-lxqt-image.bb.do_image,
| the basehash value changed from b2871a71bd4873d31d3fe7de755c753f to 5cf887f9a6518e8cf668fd3f435d1fc1.
| The metadata is not deterministic and this needs to be fixed.
It looks like the vardepsexclude flag is ignored in general python functions.
Compare also with openembedded-core commit ecbc1db7ed1f9848dee69507de8eb289b8ddeba0
and follow-up extensions which uses a different workaround for the do_image code.
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
|
|
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Stefan Agner <stefan.agner@toradex.com>
|
|
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Stefan Agner <stefan.agner@toradex.com>
|
|
Apalis T30 does not require a device tree. Do not try to deploy
device trees if none are specified.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
|
|
Use the "u_boot_env" property to write uEnv.txt to flash
by default. With that the Toradex Easy Installer will make
sure that the default environment of the shipped U-Boot is
written on flash.
Especially since with 2.8b2 we transition to using zImage,
this change will make sure that a correct U-Boot environment
is written on flash to boot the zImage.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
|
|
Deploy the default U-Boot environment alongside U-Boot itself.
This is helpful along with the new u_boot_env property for Toradex
Easy Installer image files.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
|
|
with its aquivalent do_image_teziimg[depends].
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
|
|
To clearly distinguish between images for Toradex Easy Installer
and legacy images we add the suffix -Tezi to the Toradex Easy
Installer images.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
|
|
Use RFC 3339 date (2017-11-15) in the release_date field.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
|
|
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Stefan Agner <stefan.agner@toradex.com>
|
|
Use configurable rather than hard-coded boot ROM and SPL payload
offsets.
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Stefan Agner <stefan.agner@toradex.com>
|
|
UBOOT_BINARY is only available in U-Boot recipes and the Toradex
image recipes. If the Toradex image recipes are not used, then
UBOOT_BINARY is undefined and image.json contains "null" instead of
the binary name.
Define UBOOT_BINARY with a reasonable default.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
|