Age | Commit message (Collapse) | Author |
|
Rename destination "devicetree" with dtb overlays (on bootfs) to "overlays".
Relates-to: ELB-2807
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
UBOOT_BINARY_TEZI_EMMC has been defined in machine conf, drop it.
Signed-off-by: Ming Liu <ming.liu@toradex.com>
|
|
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>
|
|
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)
|
|
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>
(cherry picked from commit aaf2b59a0bd69c1cfea6d2fc0df30ab49e16e031)
|
|
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>
(cherry picked from commit 319f84b395d5b129c7dca90554746589d2bb9f52)
|
|
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>
(cherry picked from commit 3e645e66daea9951a02b9de0f52864a79389e23a)
|
|
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>
(cherry picked from commit a49daf2f134e019d528566cf1903d4a3ce211297)
|
|
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>
|
|
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)
|
|
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.
(cherry picked from commit 3decd1ad4bb0410a03abfda76a884351bba51fdd)
Signed-off-by: Ming Liu <ming.liu@toradex.com>
|
|
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.
(cherry picked from commit 9b363a288798feff82fa57f158c92076548cb795)
Signed-off-by: Ming Liu <ming.liu@toradex.com>
|
|
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>
(cherry picked from commit e730835d6230f83d86d03daa38ceaf381d1d15fd)
|
|
Introduce a new variable TEZI_IMAGE_NAME to allow a custom image name
for the Tezi tarball. This allows to stick with the default OpenEmbedded
image names for rootfs tarballs etc. while still following custom naming
rules for the final Tezi images.
Default to IMAGE_NAME to retain backward compatibility.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
|
|
Make sure LOCALVERSION_AUTO is disabled to avoid interference with
our LOCALVERSION. This fixes building of the i.MX 8 kernel recipe.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
|
|
Make sure TDX_VERSION is defined in case Toradex distro is not used.
This avoids confusing localverisons with just a dash.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
|
|
The mainline recipe has the .config file ready later then our kernel
recipes. Use kernel_do_configure_append() which seems to work for both
cases.
Signed-off-by: Stefan Agner <stefan.agner@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>
Signed-off-by: Ming Liu <ming.liu@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>
Signed-off-by: Ming Liu <ming.liu@toradex.com>
|
|
Using PV is not a good idea with the new versioning, especially since
there is a timestamp in the version number. Use the DISTRO_VERSION
variable by default.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
|
|
Add Toradex specific local version implementation for the Linux
kernel. This implementation is a simplified version from what is in
meta-freescale. It can be used with linux-yocto based Linux recipes
as well as regular OE kernel recipes and linux-fslc based recipes.
This allows us to reuse the class in all Linux recipes used by Toradex.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
|
|
Add Toradex specific local version implementation. This is very similar
to what meta-freescale carries, but allows us to reuse the class in
all U-Boot recipes used by Toradex.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
|
|
Currently we use PV of the image recipe as version number for the
Toradex Easy Installer image json. When trying to implement the new
versioning scheme which introduces timestamps in PV uncovered issues
which are quite complex to overcome, see also this mailing list post:
http://lists.openembedded.org/pipermail/openembedded-core/2019-November/289765.html
To be able to implement the new versioning scheme we need to change
the source of the version number used in the Tezi image json. To be
more dynamic this introduces the variable TEZI_VERSION.
So far the class used the "Software Package Version" without the
(mandatory) date identifier. However, we used the full version with
date indentifier in the file name. This changes to use the full
"Software Package Version" in both cases by default.
Also use IMAGE_CMD_xy[vardepexclude] instead of the task name directly.
This makes sure that image.bbclass does remove the variable from the
image store and avoids premature expansion which leads in basehash
value changed issues.
Signed-off-by: Stefan Agner <stefan.agner@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>
|
|
We might not go this way to support aktualizr provisioning, revert it
for now, it's to be decided how we are going to do the provisioning.
Signed-off-by: Ming Liu <ming.liu@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.
This patch mainly aims to reintroduce a old commit d2dc3698:
[ 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>
|
|
Add two items into image json file: ota_provisioning and
ota_credentials.
ota_provisioning would be set 'True' if SOTA_PACKED_CREDENTIALS is
being set, and ota_credentials would be set to the basename of
SOTA_PACKED_CREDENTIALS.
These two variables would be checked in Tezi installer to determine
whether OTA provisioning is needed.
This patch would not cause any functional change in Tezi installer
while SOTA_PACKED_CREDENTIALS is not set.
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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 <liu.ming50@gmail.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>
|
|
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>
|
|
Signed-off-by: Ming Liu <liu.ming50@gmail.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>
|