Fixed
Created: Oct 25, 2022
Updated: Mar 30, 2023
Resolved Date: Feb 9, 2023
Found In Version: 10.21.20.13
Fix Version: 10.21.20.16
Severity: Standard
Applicable for: Wind River Linux LTS 21
Component/s: Userspace
Steps to reproduce the problem is based on "Wind River Linux Tutorial Using OSTree for Updates at Run_Time" manual.
0. Unzip attached meta-autonetworks.zip to get meta-autonetworks layer.
1. Follow below procedure to create platform project which is capable of OSTree.
[https://docs.windriver.com/bundle/Wind_River_Linux_Tutorial_Using_OSTree_for_Updates_at_Run_Time_LTS_21/page/vps1630424644430.html]
2. Copy the meta-autoworks layer under layers directory of the platform project.
Add a line for the layer to build/conf/bblayer.conf like below. See attached bblayer.conf.
Add OSTREE_REMOTE_URL and IMAGE_INSTALL_append to build/conf/local.conf like below. Change IP address in OSTREE_REMOTE_URL to fit your development host on which update server is running.
pf-repro-service-systemd is a recipe in meta-autonetworks layer. It installs some test files
which are used for validation whether OSTree update partition successfully.
3. Boot the QEMU target by following below procedure.
[https://docs.windriver.com/bundle/Wind_River_Linux_Tutorial_Using_OSTree_for_Updates_at_Run_Time_LTS_21/page/fqk1630424645276.html]
After the QEMU boot, check content of /etc/test_version and /usr/etc/test_version files.
# cat /etc/test_version
# cat /usr/etc/test_version
The contents should be "Ver.10"
4. On development host, modify layer/meta-autonetworks/recipes-pf-repro-service-systemd/files/etc/test_version with "Ver.20" then build core-image-minimal.
$ bitbake core-image-minimal
5. Run ostree_upgrade.sh to update B side partition on the QEMU target.
# ostree config set upgrade.branch core-image-minimal
# ostree_upgrade.sh
# reboot
6. After the update and reboot, check content of /etc/test_version and /usr/etc/test_version files.
The contents change to "Ver.20" now. B side update is done as expected.
# cat /etc/test_version => Ver.20
# cat /usr/etc/test_version => Ver.20
7. This step is update of A side partiton. On development host, modify layer/meta-autonetworks/recipes-pf-repro-service-systemd/files/etc/test_version
with "Ver.30" then repeat step 4.~6 for A side partition(wrlinux-image-small).
<On development host>
$ bitbake wrlinux-image-small
<On target running core-image-minimal>
$ ostree config set upgrade.branch wrlinux-image-small
$ ostree_upgrade.sh
$ reboot
But, /etc/test_version on A side still be "Ver.20". It's not expected result.
# cat /etc/test_version => Ver.20
# cat /usr/etc/test_version => Ver.30
8. After that, updating A side partition keeps failing.
Steps to reproduce the problem is based on "Wind River Linux Tutorial Using OSTree for Updates at Run_Time" manual.
0. Unzip attached meta-autonetworks.zip to get meta-autonetworks layer.
1. Follow below procedure to create platform project which is capable of OSTree.
https://docs.windriver.com/bundle/Wind_River_Linux_Tutorial_Using_OSTree_for_Updates_at_Run_Time_LTS_21/page/vps1630424644430.html
2. Copy the meta-autoworks layer under layers directory of the platform project.
Add a line for the layer to build/conf/bblayer.conf like below. See attached bblayer.conf.
Ex)
/home/noguma/wrlinux/lts21/x86-64/layers/meta-autonetworks \
Add OSTREE_REMOTE_URL and IMAGE_INSTALL_append to build/conf/local.conf like below. Change IP address in OSTREE_REMOTE_URL to fit your development host on which update server is running.
pf-repro-service-systemd is a recipe in meta-autonetworks layer. It installs some test files
which are used for validation whether OSTree update partition successfully.
Ex)
OSTREE_REMOTE_URL = "http://128.224.230.142:8090/ostree_repo"
IMAGE_INSTALL_append += "pf-repro-service-systemd"
Then, build an image for A side.
bitbake wrlinux-image-small
3. Boot the QEMU target by following below procedure.
https://docs.windriver.com/bundle/Wind_River_Linux_Tutorial_Using_OSTree_for_Updates_at_Run_Time_LTS_21/page/fqk1630424645276.html
After the QEMU boot, check content of /etc/test_version and /usr/etc/test_version files.
# cat /etc/test_version
# cat /usr/etc/test_version
The contents should be "Ver.10"
4. On development host, modify layer/meta-autonetworks/recipes-pf-repro-service-systemd/files/etc/test_version with "Ver.20" then build core-image-minimal.
$ bitbake core-image-minimal
5. Run ostree_upgrade.sh to update B side partition on the QEMU target.
# ostree config set upgrade.branch core-image-minimal
# ostree_upgrade.sh
# reboot
6. After the update and reboot, check content of /etc/test_version and /usr/etc/test_version files.
The contents change to "Ver.20" now. B side update is done as expected.
# cat /etc/test_version => Ver.20
# cat /usr/etc/test_version => Ver.20
7. This step is update of A side partiton. On development host, modify layer/meta-autonetworks/recipes-pf-repro-service-systemd/files/etc/test_version
with "Ver.30" then repeat step 4.~6 for A side partition(wrlinux-image-small).
<On development host>
$ bitbake wrlinux-image-small
<On target running core-image-minimal>
$ ostree config set upgrade.branch wrlinux-image-small
$ ostree_upgrade.sh
$ reboot
But, /etc/test_version on A side still be "Ver.20". It's not expected result.
# cat /etc/test_version => Ver.20
# cat /usr/etc/test_version => Ver.30
8. After that, updating A side partition keeps failing.