| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In commit d13ec585ae677affd88b9d92c6ea135cc249b2fa:
[ image_types_ostree: use OSTree repo location for lockfiles ]
A lockfile ${OSTREE_REPO}/ostree.lock was added to prevent concurrent
access to the repository by multiple bitbake instances, but it should
not only apply to ostreecommit task, but ostreepush task also need it.
This fixes a following race condition error:
| | ERROR: Execution of '.../temp/run.do_image_ostreecommit.34262' failed with exit code 1:
| error: Writing content object: Creating temp file: No such file or directory
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid removing 64bit and metadata_csum by default and prefer the
standard ext4 features instead.
64bit enables the file system to be larger than 2^32 blocks and
metadata_csum enables metadata checksumming, both of which are
enabled by default on recent mke2fs releases.
It is unclear why 64bit was disabled by looking at the git history, but
my assumption would be that either kernel or userspace was old enough
for this feature to not be supported/available. Since this option is
currently used by most distros by default, it should now be safe to
enable it (requires kernel >= 2.6.28).
metadata_csum was disabled in 4d34fa53db to make the u-boot tooling work
with the ext4 file system (when saving environment), but the correct fix
should instead be a fix at the userspace tooling instead, since not
every target requires u-boot.
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* it doesn't automatically pass "-t ext4", because here we're calling
mke2fs as mkfs.ota-ext4 instead of mkfs.ext4
so the resulting was now ext2 instead of ext4
$ file image-raspberrypi4.rootfs.ota-ext4
image-raspberrypi4.rootfs.ota-ext4: Linux rev 1.0 ext2 filesystem data, UUID=15862fcd-6204-486b-a4c6-fdf7b1710797, volume name "otaroot" (large files)
after this fix:
$ file image-raspberrypi4.rootfs.ota-ext4
image-raspberrypi4.rootfs.ota-ext4: Linux rev 1.0 ext4 filesystem data, UUID=3709e65c-1d2b-4280-85d1-638f5f9c3cc0, volume name "otaroot" (extents) (64bit) (large files) (huge files)
that's why metadata_csum and other features enabled by default
in ext4 were now missing after
https://github.com/advancedtelematic/meta-updater/pull/787
we can drop 64bit feature as well, it's also enabled in default
recipe-sysroot-native/etc/mke2fs.conf
[defaults]
base_features = sparse_super,large_file,filetype,resize_inode,dir_index,ext_attr
default_mntopts = acl,user_xattr
enable_periodic_fsck = 0
blocksize = 4096
inode_size = 256
inode_ratio = 16384
[fs_types]
ext3 = {
features = has_journal
}
ext4 = {
features = has_journal,extent,huge_file,flex_bg,metadata_csum,64bit,dir_nlink,extra_isize
inode_size = 256
}
...
Signed-off-by: Martin Jansa <martin.jansa@lge.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* it doesn't automatically pass "-t ext4", because here we're calling
mke2fs as mkfs.ota-ext4 instead of mkfs.ext4
so the resulting was now ext2 instead of ext4
$ file image-raspberrypi4.rootfs.ota-ext4
image-raspberrypi4.rootfs.ota-ext4: Linux rev 1.0 ext2 filesystem data, UUID=15862fcd-6204-486b-a4c6-fdf7b1710797, volume name "otaroot" (large files)
after this fix:
$ file image-raspberrypi4.rootfs.ota-ext4
image-raspberrypi4.rootfs.ota-ext4: Linux rev 1.0 ext4 filesystem data, UUID=3709e65c-1d2b-4280-85d1-638f5f9c3cc0, volume name "otaroot" (extents) (64bit) (large files) (huge files)
that's why metadata_csum and other features enabled by default
in ext4 were now missing after
https://github.com/advancedtelematic/meta-updater/pull/787
we can drop 64bit feature as well, it's also enabled in default
recipe-sysroot-native/etc/mke2fs.conf
[defaults]
base_features = sparse_super,large_file,filetype,resize_inode,dir_index,ext_attr
default_mntopts = acl,user_xattr
enable_periodic_fsck = 0
blocksize = 4096
inode_size = 256
inode_ratio = 16384
[fs_types]
ext3 = {
features = has_journal
}
ext4 = {
features = has_journal,extent,huge_file,flex_bg,metadata_csum,64bit,dir_nlink,extra_isize
inode_size = 256
}
...
Signed-off-by: Martin Jansa <martin.jansa@lge.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 4d34fa53db086955adf6bc58941ebf98a16778f8.
This issue exists only because mke2fs is creating ext2 by default
instead of ext4 which enables this by default as shown in
recipe-sysroot-native/etc/mke2fs.conf
[defaults]
base_features = sparse_super,large_file,filetype,resize_inode,dir_index,ext_attr
default_mntopts = acl,user_xattr
enable_periodic_fsck = 0
blocksize = 4096
inode_size = 256
inode_ratio = 16384
[fs_types]
ext3 = {
features = has_journal
}
ext4 = {
features = has_journal,extent,huge_file,flex_bg,metadata_csum,64bit,dir_nlink,extra_isize
inode_size = 256
}
...
Signed-off-by: Martin Jansa <martin.jansa@lge.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
|
|
|
|
|
|
|
|
|
| |
This fixes a following error:
| Saving Environment to EXT4... Unsupported feature metadata_csum found, not writing
when u-boot tries to write env to EXT4 filesystem.
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
We dont have to maintain our own function calculate_size and use
dd/mkfs.ext4 to generate ota-ext4 image, they have been done in OE
by get_rootfs_size/oe_mkext234fs functions, we could just use them.
The major benefit could be we can sync the future fixes/changes in
these functions from OE, also avoid maintaining some duplicated code in
image_types_ota.bbclass.
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Previous initramfs fit specific workaround was removed as part of commit
6eecf1593d, causing ostree to provide an init argument as part of the
kernel command line arguments when it is not really needed.
Bring back the workaround by simply generating an empty file in case
kernel image type is fit and initramfs is also used by the target.
Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
|
|
|
|
| |
Signed-off-by: Dominik Wild <dominik.wild@glutz.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ostree supports multiple devicetrees provided that there is no
/lib/modules/$kversion/devicetree installed on rootfs, in which case,
a uboot variable 'fdtdir' would be written to /boot/loader/uEnv.txt
instead of fdt_file.
Introduce OSTREE_MULTI_DEVICETREE_SUPPORT to control that, when it's
set to '0', there is no functional changes with current implementation,
while it's set to '1', then /lib/modules/$kversion/devicetree would not
be installed and the end users need set their own fdtfile/fdt_file in
boot script to locate the devicetree in 'fdtdir'.
Signed-off-by: Ming Liu <ming.liu@toradex.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* failing "which repo" causes the run.buildinfo_manifest task to fail
before it even reaches the test for empty repotool variable:
dash -x some-image/1.0-r2/temp/run.buildinfo_manifest.80233
+ export systemd_system_unitdir=/usr/lib/systemd/system
+ export systemd_unitdir=/usr/lib/systemd
+ export systemd_user_unitdir=/usr/lib/systemd/user
+ buildinfo_manifest
+ which repo
+ repotool=
+ bb_sh_exit_handler
+ ret=1
+ [ 1 != 0 ]
+ echo WARNING: exit code 1 from a shell command.
WARNING: exit code 1 from a shell command.
+ exit 1
causing nasty long python exception from do_image task
with this fix, it just shows an warning again:
dash -x some-image/1.0-r2/temp/run.buildinfo_manifest.80233
+ export systemd_user_unitdir=/usr/lib/systemd/user
+ buildinfo_manifest
+ which repo
+ true
+ repotool=
+ [ -n ]
+ bbwarn Android repo tool not found; manifest not copied.
+ [ -p some-image/1.0-r2/temp/fifo.80233 ]
+ echo WARNING: Android repo tool not found; manifest not copied.
WARNING: Android repo tool not found; manifest not copied.
+ ret=0
+ trap 0
+ exit 0
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now we have changed to inherit python3native to provide python3 binary
for repo, then we need explicitly call python3 to execute repo, or else
it will firstly try to locate python which will fail if python is not
in HOSTTOOLS.
This fixes a following warning:
| Android repo tool failed to run; manifest not copied
Signed-off-by: Ming Liu <ming.liu@toradex.com>
|
|
|
|
| |
Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
|
|
|
|
|
|
|
|
| |
This was changed in a907c3261ef583f898803706cd596d372c6644cb of
meta-raspberrypi. This also requires
0b5292d13692ba074dc85227233e3a819d944204 in meta-updater-raspberrypi.
Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
|
|
|
|
|
|
|
|
|
| |
When setting intertask dependencies, we should use PN instead of
IMAGE_BASENAME to refer to a image recipe, since PN is generated from
recipe file name, while IMAGE_BASENAME is a variable that could be
changed, it's not guaranteed to always equal to PN.
Signed-off-by: Ming Liu <ming.liu@toradex.com>
|
|
|
|
|
|
|
|
|
| |
We did the work a while ago to make aktualizr-info work for Secondaries,
but until now we weren't putting the tool into the secondary-image we
use for testing. Now it's there. Actually, it's in every image that
inherits from sota.bbclass, which is probably a good thing.
Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We package kernel image, devicetrees, initramfs and install them to
/usr/lib/modules/${KERNEL_VERSION}, which is the preferred location
according to ostree's new implementation, this could simplify the
deployment.
Reference:
https://github.com/ostreedev/ostree/commit/3ab0d5e6644885440bac6abd17b6d2637df5435f
To let initramfs-ostree-image be able to be depended by
ostree-kernel-initramfs, it must inherit nopackages to avoid a annoying
QA warning like the follows:
| WARNING: initramfs-ostree-image-0.0.1-r0 do_package: Manifest ...initramfs-ostree-image.packagedata
| not found in colibri_imx6 armv7ahf-neon-imx armv7at2hf-neon-imx armv7at2hf-neon armv7ahf-neon armv7at2hf-vfp
| armv7ahf-vfp armv6thf-vfp armv6hf-vfp armv5tehf-vfp armv5ehf-vfp armv5thf-vfp armv5hf-vfp allarch
| x86_64_x86_64-nativesdk (variant '')?
Also we need define OSTREE_KERNEL, OSTREE_DEPLOY_DEVICETREE and
OSTREE_DEVICETREE in sota.bbclass so they could be accessed in other
recipes as well as in image recipes.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Signed-off-by: Ming Liu <ming.liu@toradex.com>
|
|
|
|
|
|
|
|
|
|
| |
The name 'virtual' is a recipe specific concept but not a package
specific one, it's confusing that a package provides 'virtual/' names.
Let's drop 'virtual/' from network-configuration, to keep consistent
with yocto naming styles.
Signed-off-by: Ming Liu <ming.liu@toradex.com>
|
|
|
|
|
|
|
|
|
|
|
| |
When setting `OSTREE_DEPLOY_DEVICETREE` to 1, it will by default deploy
all the device tree blobs present in `KERNEL_DEVICETREE`. Adding
`OSTREE_DEVICETREE` would allow specifying a specific device tree blob
(or several dtbs), thus resulting in only the specified ones in the
image. This is particularely useful because ostree selects the first
device tree it finds in /boot, and discards the remaining ones.
Signed-off-by: antznin <agodard@witekio.com>
|
|
|
|
| |
Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
|
|
|
|
|
|
|
|
|
|
| |
The OSTree commit command allows to add metadata to the commit. This
might be customized in a distro layer for distribution specific needs.
Allow to pass extra arguments using EXTRA_OSTREE_COMMIT variable
(using a variable named similar to EXTRA_OEMAKE used to pass extra make
arguments).
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use named reference when deploying the device tree. This makes sure that
this reference will end up in the deployments .origin file, which will
be visible by the user in ostree admin status. This reference will also
be used when running ostree admin upgrade. This is not really required
when using aktualizr, but can be useful during test/debugging when using
pure OSTree updates. Make sure to make ${OSTREE_REPO} accessible via
http and add a remote on the device called ${OSTREE_OSNAME} pointing to
the http exposed archive OSTree. With that ostree admin upgrade should
work.
Note: We could use the name reference in ostree pull-local already, but
this is potentially racy if multiple builds are committing to the same
branch. Use the OSTree commit hash to get the actual commit and recreate
a local reference to this commit. This makes absolutely sure that we use
the same OSTree commit this bitbake execution committed during the
do_image_ostreecommit task.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Relying on a OSTree branch reference has been problematic in the past
and addressed by adding more attributes to it in commit 202a8c70ba8c
("image_types_ostree: Add a unique ref to fix simultaneous bitbaking.").
However, depening on what kind of OpenEmbedded builds are running in
parallel, even more attributes would need to be taken into account.
Instead of relying on a reference, store the exact ostree commit hash
in a manifest file and reuse it in the do_image_ota deploy task. This
guarantees that the correct reference gets picked even when two builds
with the exact same machine/image name run in parallel.
Note: This gets rid of the second branch name again. If the branch name
with image name is preferred, the variable OSTREE_BRANCHNAME can be
used:
OSTREE_BRANCHNAME = "${SOTA_HARDWARE_ID}-${IMAGE_BASENAME}"
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
|
|
|
|
|
|
|
|
|
|
| |
The current sanity check are too strict for some boolean variables,
introduce sota_check_boolean_variable to allow a boolean value to be
set like yes/y/true/t/1 or no/n/false/f/0.
Also change to use oe.types.boolean to check their values.
Signed-off-by: Ming Liu <ming.liu@toradex.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of using the double indirection mode /home -> /var/rootdirs/home
-> /sysroot/home move the home directory physically into /var/rootdirs.
This allows to use the --modern flag when initializing the file system.
The "old" style is still supported, and does make sense in case the home
directories need to be shared between multiple deployments. Since
multiple deployments is not a use case in meta-updater use the /var
approach. See also: https://github.com/ostreedev/ostree/issues/2085.
The modern flag also gets rid of dev, proc, root, run, sys and tmp. All
of them have been empty and unused.
Note: This change cannot be pushed through updates as this is an initial
deployment setting. Only devices provisioned with images built with this
change applied will use the new layout. Updates will continue to work
on both systems as the symlink from the deployment stays the same (first
indirection is still /home -> /var/rootdirs/home).
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The home directory currently are commited to the OSTree, presumably
to then use it for the deployment. However, we do have access to the
original rootfs in the OSTree deployment tasks (do_image_ota) hence
transferring the files "via OSTree" is not necessary. We do already
carry over some files from the original OE rootfs to /var/sota.
Follow this approach for /var/local and /home as well.
The home will still be stored in the sysroot as documented in
https://ostree.readthedocs.io/en/latest/manual/adapting-existing/.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of copying the files to be commited to the ostree just use a
hardlink tree. This improves performance and wasts less diskspace.
When using this method the root directory has already the correct
permission bits set. Also get rid of the unnecessary sync. This halfs
the execution time of the do_image_ostree tasks in my measurments.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current code clears tmp and then creates a symlink inside it to
/sysroot/tmp:
tmp
└── tmp -> sysroot/tmp
This is likely a mistake and the root tmp should have pointed to
sysroot/tmp. However, since /tmp is mounted as a tmpfs anyways, we can
get rid of all this logic.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
|
|
|
|
|
|
|
|
| |
The environment variable OSTREE_BOOT_PARTITION is only used when using
GRUB. Move the export into the if statement. Also add a comment why
manually adding /boot/loader{.0} directory is necessary.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
|
|
|
|
|
|
| |
The file name of sota has been changed in AGL, so change it to apply.
Signed-off-by: Minori Yasumura <minori@witz-inc.co.jp>
|
|
|
|
|
|
| |
I'm a bit surprised we never noticed this was missing!
Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
|
|
|
|
|
|
|
| |
Most of the README content has been moved to the docs portal, so provide
the direct link.
Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
|
|\
| |
| | |
Fix some problems in image recipes
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
HOSTTOOLS and HOSTTOOLS_NONFATAL are global variables that being
handled in base_eventhandler, so they must be defined in config files
or in INHERIT classes or classes being inherited by base.bbclass, or
else we might run into the following problems:
```
$ bitbake pkgname
$ bitbake imgname
```
the HOSTTOOLS and HOSTTOOLS_NONFATAL in the above image recipe, for
instance, 'repo python' in image_repo_manifest.bbclass, they would not
be copied to HOSTTOOLS_DIR.
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
OSTree uses the "version" metadata field in various places, e.g. in
ostree admin status. Use DISTRO_VERSION as default version number
source. This gives a more human readable version number to a
particular OSTree:
$ ostree admin status
* torizon f1825d8a8f89c48cc0915ea059bd23463a97655757a53ae0ab0fe7a97e1ebeb2.0
Version: 3.0+snapshot-20200128
origin refspec: f1825d8a8f89c48cc0915ea059bd23463a97655757a53ae0ab0fe7a97e1ebeb
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
|
|
|
|
| |
Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
|
|
|
|
|
|
|
|
|
|
| |
repo is requiring python to be able to work correctly, add python to
HOSTTOOLS_NONFATAL as well.
image_repo_manifest is actually a image bbclass, move it to
IMAGE_CLASSES instead of inheriting it in sota.bbclass.
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
|
|\
| |
| |
| |
| | |
advancedtelematic/feat/ota-3202/Add-sanity-checks-for-SOTA-variables-in-meta-updater
Add sanity checks for user-defined SOTA variables
|
| |
| |
| |
| | |
Signed-off-by: Zee314159 <252806294@qq.com>
|
| |
| |
| |
| | |
Signed-off-by: Zee314159 <252806294@qq.com>
|
| |
| |
| |
| | |
Signed-off-by: Zee314159 <252806294@qq.com>
|
|/
|
|
|
|
|
| |
Change to inherit features_check, since distro_features_check has been
deprecated in OE.
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
|
|
|
|
|
|
|
| |
The broadcom firmware now needs device trees to be present in/boot to
set it up.
Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
|
|
|
|
| |
Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
|
|
|
|
| |
Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
|
|
|
|
|
|
|
| |
No functional changes, rename OTA_IMAGE_ROOTFS to TAR_IMAGE_ROOTFS
since the later is a more common name.
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The command "ostree refs --create" creates a new ref that points to a pre-existing commit hash.
This does not add this new ref to the ref-bindings metadata in OSTree.
The missing metadata leads to OSTree verifcation failures when working with the new ref.
Fix this by adding the "--bind-ref" option to "ostree commit" which adds the needed
ref-binding metadata.
Signed-off-by: Jeremias Cordoba <js.cordoba8321@gmail.com>
|
|
|
|
|
|
|
| |
0x8000 does not work on raspberrypi4-64 whereas 0x80000 is the value
recommended for all platforms on u-boot
Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
|
|
|
|
| |
Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
|