From 7c2d21c5ddc060ff3568f4e53fd9638ee469ec9a Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 26 Apr 2022 11:52:45 -0700 Subject: [PATCH 01/10] Layer Updates: sources/meta-arm sources/meta-clang sources/meta-freescale sources/meta-freescale-3rdparty sources/meta-intel sources/meta-openembedded sources/meta-qcom sources/openembedded-core * sources/meta-arm 99ecf72...c713908 (10): > arm-bsp/u-boot: Enable fdt overlays for fvp-baser-aemv8r64 > arm-bsp/u-boot: Fix fvp-baser-aemv8r64 fdt memory configuration issue > arm-bsp/boot-wrapper-aarch64: Add fvp-baser support for EL2 SMP payloads > arm-bsp/boot-wrapper-aarch64,u-boot: Clarify fvp-baser Upstream-Status > ci,arm-bsp/conf: Add testimage for fvp-baser-aemv8r64 > arm/fvp-base-r-aem: Automatically download FVP tarball > CI: add testing for edk2 > arm/edk2-firmware: add PROVIDES virtual/bootloader > arm-bsp/juno: use virtual/bootloader for u-boot/edk2 > arm-toolchain/gcc-aarch64-none-elf: remove redundant LIC_FILES_CHKSUM * sources/meta-clang 74c7f65...12a5f8b (7): > libcxx: Fix nativesdk building > compiler-rt: Fix nativesdk building > libeigen,opencv,ceres-solver: Disable altivec on ppc32 > librsvg: Use gcc compiler on ppc32 > clang.bbclass: Use BASELIB instead of base_libdir in YOCTO_ALTERNATE_LIBDIR > clang: Enable altivec again for ppc32 > musl: Build with clang on ppc64 * sources/meta-freescale e904064f...1f457754 (3): > Merge pull request #1058 from limeng-linux/master > Merge pull request #1056 from YoeDistro/yoe/mut > Merge pull request #1057 from junzhuimx/master * sources/meta-freescale-3rdparty f244dd4...de0eb14 (2): > Merge pull request #210 from YoeDistro/yoe/mut > Merge pull request #209 from YoeDistro/yoe/mut * sources/meta-intel b9da851f...2c6ae10e (4): > linux-intel-rt/5.15: update to v5.15.31 > linux-intel/5.15: update to v5.15.31 > ispc: disable build for Windows, android and other targets > intel-oneapi-compiler: use ocl-icd instead of opencl-icd-loader * sources/meta-openembedded 12058113c4...3c1c07e9a5 (57): > absil-cpp: Update SRC_URI to to the latest google internal sync > fluentbit: Disable systemd support when systemd distro feature is disabled > lirc: install systemd units only when using systemd distro feature > makedumpfile: Upgrade to 1.7.1 > ostree: upgrade 2021.6 -> 2022.2 > libtest-harness-perl: upgrade 3.42 -> 3.44 > libextutils-cppguess-perl: upgrade 0.23 -> 0.26 > libencode-perl: upgrade 3.16 -> 3.17 > libdbd-sqlite-perl: upgrade 1.68 -> 1.70 > openwsman: upgrade 2.6.11 -> 2.7.1 > lsscsi: upgrade 0.31 -> 0.32 > links: upgrade to 2.26 > lapack: upgrade 3.10.0 -> 3.10.1 > hexedit: upgrade 1.5 -> 1.6 > ctags: upgrade 5.9.20220410.0 -> 5.9.20220417.0 > nbdkit: upgrade 1.30.2 -> 1.31.1 > nanomsg: upgrade 1.1.5 -> 1.2 > htpdate: upgrade 1.3.3 -> 1.3.4 > frr: add PACKAGECONFIG for fpm > nautilus: upgrade 42.0 -> 42.1.1 > libadwaita: upgrade 1.1.0 -> 1.1.1 > gtksourceview5: upgrade 5.4.0 -> 5.4.1 > gspell: upgrade 1.9.1 -> 1.10.0 > evolution-data-server: upgrade 3.44.0 -> 3.44.1 > evince: upgrade 42.1 -> 42.2 > fwupd: Enable build with musl > pam-ssh-agent-auth: Use specific versions of BSD licenses > boinc-client: Do not overwrite same file when using usrmerge > mozjs: Use vendored icu on ppc/clang > klibc: Recognise --dyld-prefix clang option > netdata: Fix build errors with clang > libldb: Fix installed-vs-shipped and rebuild error > ufw: Fix build with usrmerge distro feature > linux-atm: Add knob to root prefix > dietsplash: specify install rootdir > scsirastools: Fix build with usrmerge > babeld: Upgrade to 1.11 > gradm: Upgrade to 3.1-202111052217 > tomoyo-tools: Drop md5sum > tomoyo-tools: Define SBINDIR > fluentbit: Fix build with usrmerge distro feature > arno-iptables-firewall: Do not use bitbake variable inside S > tcsh: Do not install symlinks into /bin with usrmerge > crash: Fix build for mips target > crash: Upgrade to 8.0.0 > gpsd: Correct the creation of the gps-utils-python package > sdbus-c++-libsystemd: bugfix dev package is not installed > drbd-utils: fix for usrmerge > python3-imageio: upgrade 2.16.1 -> 2.17.0 > python3-django: upgrade 2.2.27 -> 2.2.28 > python3-cmd2: upgrade 2.4.0 -> 2.4.1 > python3-aws-iot-device-sdk-python: upgrade 1.5.1 -> 1.5.2 > python3-aenum: upgrade 3.1.8 -> 3.1.11 > python3-marshmallow: Upgrade 3.14.1 -> 3.15.0 > python3-bitstruct: Upgrade 8.13.0 -> 8.14.0 > python3-blivetgui: use symbolic list-add and edit- icons > python3-cppy: upgrade 1.2.0 -> 1.2.1 * sources/meta-qcom 5923946...1a92cc0 (5): > Merge pull request #445 from ndechesne/pr-qcom-armv7a > Merge pull request #439 from lumag/apq8064 > Merge pull request #442 from lumag/more-tools > .github: initial GitHub Actions workflow for premerge build test > Merge pull request #444 from YoeDistro/yoe/mut * sources/openembedded-core 39743abada4...9ea1a838b94 (10): > wic: do not use PARTLABEL for msdos partition tables > wpa-supplicant: Package shared library into wpa-supplicant-lib > wpa-supplicant: Install wpa_passphrase when not disabled > python3-hypothesis: upgrade 6.41.0 -> 6.44.0 > apt: upgrade 2.4.4 -> 2.4.5 > gcompat: Fix build when usrmerge distro feature is enabled > musl: Fix build when usrmerge distro feature is enabled > gcc: Upgrade to 11.3 release > xorg-app: Tweak handling of compression changes in SRC_URI > install/devshell: Introduce git intercept script due to fakeroot issues Signed-off-by: Khem Raj --- sources/meta-arm | 2 +- sources/meta-clang | 2 +- sources/meta-freescale | 2 +- sources/meta-freescale-3rdparty | 2 +- sources/meta-intel | 2 +- sources/meta-openembedded | 2 +- sources/meta-qcom | 2 +- sources/openembedded-core | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sources/meta-arm b/sources/meta-arm index 99ecf7287..c713908b7 160000 --- a/sources/meta-arm +++ b/sources/meta-arm @@ -1 +1 @@ -Subproject commit 99ecf728754efd5dd32f3e669c07209125d41930 +Subproject commit c713908b7feb31067601e335222725e5ddcb6668 diff --git a/sources/meta-clang b/sources/meta-clang index 74c7f6524..12a5f8be1 160000 --- a/sources/meta-clang +++ b/sources/meta-clang @@ -1 +1 @@ -Subproject commit 74c7f6524cddd258f916e8e4acfb9e49d1870b65 +Subproject commit 12a5f8be1201fa1fcb62aa004542279d5c9acae0 diff --git a/sources/meta-freescale b/sources/meta-freescale index e904064f0..1f4577542 160000 --- a/sources/meta-freescale +++ b/sources/meta-freescale @@ -1 +1 @@ -Subproject commit e904064f046612ebd1834d5b2dcdd757c680503b +Subproject commit 1f4577542cd2246b4a1f1bf0e331f82ff2d7da8b diff --git a/sources/meta-freescale-3rdparty b/sources/meta-freescale-3rdparty index f244dd4b2..de0eb1408 160000 --- a/sources/meta-freescale-3rdparty +++ b/sources/meta-freescale-3rdparty @@ -1 +1 @@ -Subproject commit f244dd4b26f5958e586f2cee3e6854489c2a049f +Subproject commit de0eb1408150d77f9cce97c559f9a5a3c71e5d6c diff --git a/sources/meta-intel b/sources/meta-intel index b9da851fa..2c6ae10ee 160000 --- a/sources/meta-intel +++ b/sources/meta-intel @@ -1 +1 @@ -Subproject commit b9da851fa5b713e8eb5d6b1b0b03c9e9fbfff5d0 +Subproject commit 2c6ae10eeb713e10a6446e0674d5c704902918da diff --git a/sources/meta-openembedded b/sources/meta-openembedded index 12058113c..3c1c07e9a 160000 --- a/sources/meta-openembedded +++ b/sources/meta-openembedded @@ -1 +1 @@ -Subproject commit 12058113c4d6336a0b1d3af665b98cce8e345975 +Subproject commit 3c1c07e9a5477df68bfa1f739b38f10a5e78b07e diff --git a/sources/meta-qcom b/sources/meta-qcom index 5923946a9..1a92cc0f5 160000 --- a/sources/meta-qcom +++ b/sources/meta-qcom @@ -1 +1 @@ -Subproject commit 5923946a9da6eec585d586427f377894c361c55d +Subproject commit 1a92cc0f51dd1875378a29f6de4ce37928d20c2a diff --git a/sources/openembedded-core b/sources/openembedded-core index 39743abad..9ea1a838b 160000 --- a/sources/openembedded-core +++ b/sources/openembedded-core @@ -1 +1 @@ -Subproject commit 39743abada4a2459c74831aa78930de5461adee2 +Subproject commit 9ea1a838b946020e026edc032039552b723fcaa4 From ccaddd36a0c556137f0907d81a1a4284267ffe48 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 26 Apr 2022 12:37:54 -0700 Subject: [PATCH 02/10] docker: Switch defaults to using debian11/bullseye in docker Signed-off-by: Khem Raj --- conf/site.conf.sample | 2 +- envsetup.sh | 6 +++--- local.sh.example | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/conf/site.conf.sample b/conf/site.conf.sample index 9301575a4..b257f9531 100644 --- a/conf/site.conf.sample +++ b/conf/site.conf.sample @@ -27,7 +27,7 @@ YOE_PROFILE = "yoe-musl-sysvinit-eglfs" YOE_PROFILE = "yoe-musl-sysvinit-wayland" YOE_PROFILE = "yoe-musl-sysvinit-x11" # configure docker container to run bitbake in -export DOCKER_REPO=yoedistro/yoe-build:buster +export DOCKER_REPO=yoedistro/yoe-build:bullseye # Keep the load in control and do not issue more parallel jobs # when load hits 1.5 * number of cpus diff --git a/envsetup.sh b/envsetup.sh index a60050dc1..4640cc48d 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -439,13 +439,13 @@ yoe_clean_sstate() { } # Docker integration -# set DOCKER_REPO to something like yoedistro/yoe-build:buster +# set DOCKER_REPO to something like yoedistro/yoe-build:bullseye # DOCKER_REPO can be set in scripts that wrap envsetup.sh # set DOCKER_REPO to 'none' to disable docker if [ -z "$DOCKER_REPO" ]; then - echo "Setting DOCKER_REPO to yoedistro/yoe-build:buster" - export DOCKER_REPO=yoedistro/yoe-build:buster + echo "Setting DOCKER_REPO to yoedistro/yoe-build:bullseye" + export DOCKER_REPO=yoedistro/yoe-build:bullseye fi # if we are building using docker, we don't really care what /bin/sh is since the Yoe docker images defaults diff --git a/local.sh.example b/local.sh.example index 16676db01..0bb8094c7 100644 --- a/local.sh.example +++ b/local.sh.example @@ -17,7 +17,7 @@ # export HOST_IP=10.10.10.10 # configure docker container to run bitbake in -#export DOCKER_REPO=yoedistro/yoe-build:buster +#export DOCKER_REPO=yoedistro/yoe-build:bullseye # Flag to control docker launch with pseudo-tty # when output is piped or redirected to files then @@ -28,4 +28,4 @@ # By default docker is used if DOCKER_REPO is set to a value different than # none. If you prefer to use podman instead of docker, un-comment this line -#export DOCKER="podman" \ No newline at end of file +#export DOCKER="podman" From 814722016a40665e94ff05035e17117551c2969d Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 26 Apr 2022 15:23:28 -0700 Subject: [PATCH 03/10] site.conf: Re-enable build history Its only needed to be disabled when running oe-selftests Signed-off-by: Khem Raj --- conf/site.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/site.conf b/conf/site.conf index 4e839dd7d..60487c1a4 100644 --- a/conf/site.conf +++ b/conf/site.conf @@ -111,6 +111,6 @@ IMG_VERSION = "0.0.1" #EXTRA_IMAGE_FEATURES:remove = "debug-tweaks" # For running oe-selftest uncomment below lines -USER_CLASSES:remove = "buildhistory" -PRSERV_HOST = "" +#USER_CLASSES:remove = "buildhistory" +#PRSERV_HOST = "" From ca29fe107894b1772b47372083f0647071cb07b0 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 21 Apr 2022 19:25:37 -0700 Subject: [PATCH 04/10] yoe: Enable usrmerge distro-wide MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Put an end to splitting installs and use /usr merge. following will become symlinks /bin → /usr/bin /sbin → /usr/sbin /lib → /usr/lib /lib64 → /usr/lib64 see [1] and [2] for more information [1] https://www.freedesktop.org/wiki/Software/systemd/TheCaseForTheUsrMerge/ [2] http://lists.busybox.net/pipermail/busybox/2010-December/074114.html Signed-off-by: Khem Raj --- sources/meta-yoe/conf/distro/yoe.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/meta-yoe/conf/distro/yoe.inc b/sources/meta-yoe/conf/distro/yoe.inc index 9b9627f12..9a5305cfb 100644 --- a/sources/meta-yoe/conf/distro/yoe.inc +++ b/sources/meta-yoe/conf/distro/yoe.inc @@ -95,7 +95,7 @@ INHERIT += "${@bb.utils.contains('BUILD_ARCH', 'ppc64le', '', 'uninative', d)}" # Add /etc/build to every image INHERIT += "image-buildinfo" -DISTRO_FEATURES:append = " largefile opengl multiarch wayland pam vulkan" +DISTRO_FEATURES:append = " largefile opengl multiarch wayland pam vulkan usrmerge" #PREFERRED_PROVIDER_pkgconfig = "pkgconf" #PREFERRED_PROVIDER_pkgconfig-native = "pkgconf-native" From 65729812d775a124e25b15740c7fd293d41baa37 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 26 Apr 2022 15:48:36 -0700 Subject: [PATCH 05/10] util-linux_%.bbappend: Add u-a for findfs Until OE-core change is merged keep it here Signed-off-by: Khem Raj --- sources/meta-yoe/recipes-core/util-linux/util-linux_%.bbappend | 1 + 1 file changed, 1 insertion(+) create mode 100644 sources/meta-yoe/recipes-core/util-linux/util-linux_%.bbappend diff --git a/sources/meta-yoe/recipes-core/util-linux/util-linux_%.bbappend b/sources/meta-yoe/recipes-core/util-linux/util-linux_%.bbappend new file mode 100644 index 000000000..24a3d74c2 --- /dev/null +++ b/sources/meta-yoe/recipes-core/util-linux/util-linux_%.bbappend @@ -0,0 +1 @@ +ALTERNATIVE_LINK_NAME[findfs] = "${sbindir}/findfs" From 9951f74cb890b94836df808713e185f4f91aebd2 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 27 Apr 2022 00:09:12 -0700 Subject: [PATCH 06/10] linux-ti-staging: Enable overlayfs We need it to overlay rootfs dir from /data Signed-off-by: Khem Raj --- .../meta-ti/recipes-kernel/linux/linux-ti-staging/overlayfs.cfg | 1 + .../meta-ti/recipes-kernel/linux/linux-ti-staging_%.bbappend | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 sources/meta-yoe/dynamic-layers/meta-ti/recipes-kernel/linux/linux-ti-staging/overlayfs.cfg diff --git a/sources/meta-yoe/dynamic-layers/meta-ti/recipes-kernel/linux/linux-ti-staging/overlayfs.cfg b/sources/meta-yoe/dynamic-layers/meta-ti/recipes-kernel/linux/linux-ti-staging/overlayfs.cfg new file mode 100644 index 000000000..912223899 --- /dev/null +++ b/sources/meta-yoe/dynamic-layers/meta-ti/recipes-kernel/linux/linux-ti-staging/overlayfs.cfg @@ -0,0 +1 @@ +CONFIG_OVERLAY_FS=y diff --git a/sources/meta-yoe/dynamic-layers/meta-ti/recipes-kernel/linux/linux-ti-staging_%.bbappend b/sources/meta-yoe/dynamic-layers/meta-ti/recipes-kernel/linux/linux-ti-staging_%.bbappend index d7a09b2e6..19ecb6acf 100644 --- a/sources/meta-yoe/dynamic-layers/meta-ti/recipes-kernel/linux/linux-ti-staging_%.bbappend +++ b/sources/meta-yoe/dynamic-layers/meta-ti/recipes-kernel/linux/linux-ti-staging_%.bbappend @@ -3,9 +3,11 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" SRC_URI += "file://wireguard.cfg \ file://updater.cfg \ file://extra.cfg \ + file://overlayfs.cfg \ " KERNEL_CONFIG_FRAGMENTS += "${WORKDIR}/wireguard.cfg \ ${WORKDIR}/updater.cfg \ ${WORKDIR}/extra.cfg \ + ${WORKDIR}/overlayfs.cfg \ " From d4ce5e2107bafbab95c94e5aafd3dae38d9b3066 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 27 Apr 2022 09:30:40 -0700 Subject: [PATCH 07/10] Layer Updates: sources/bitbake sources/meta-freescale sources/meta-intel sources/meta-openembedded sources/meta-qcom sources/openembedded-core * sources/bitbake d720dfa4...c1c8fc67 (2): > fetch2/ssh.py: decode path back for ssh > fetch2/osc: Add missing parameter * sources/meta-freescale 1f457754...96a0904c (1): > Merge pull request #1060 from tprrt/tprrt/imx-mkimage-hab * sources/meta-intel 2c6ae10e...a2f5f65c (2): > linux-intel-rt/5.10: update to v5.10.100 > linux-intel/5.10: update to v5.10.100 * sources/meta-openembedded 3c1c07e9a5...aea550e75d (9): > lockdev: Drop cumulative debian patch > pipewire: Upgrade to version 0.3.50 > cdrkit: add new option -eltorito-platform for genimageiso > pangomm: Allow building with wayland > atkmm: Allow build with wayland > lirc: Delete systemd unit files on non systemd distros > gparted: Allow wayland or x11 distro features > gtkmm3: Allow wayland or x11 in distro features > gtksourceview5: Allow wayland or x11 * sources/meta-qcom 1a92cc0...f269c16 (3): > Merge pull request #438 from lumag/nexus-fw > Merge pull request #447 from lumag/fw-img-kdep > .github: use pull_request_target to allow PR testing * sources/openembedded-core 9ea1a838b94...8bed8e6993e (18): > bitbake.conf: mark all directories as safe for git to read > base: Drop git intercept > layer.conf: Post release codename changes > go.bbclass: disable the use of the default configuration file > create-spdx: delete virtual/kernel dependency to fix FreeRTOS build > cases/buildepoxy.py: fix typo > musl-locales: Add package > devshell.bbclass: Allow devshell & pydevshell to use the network > terminal.py: Restore error output from Terminal > gstreamer1.0: Minor documentation addition > gstreamer1.0-plugins-good: Fix libsoup dependency > python3: ignore CVE-2015-20107 > subversion: upgrade to 1.14.2 > e2fsprogs: fix CVE-2022-1304 > busybox: Use base_bindir instead of hardcoding /bin path > qemu.bbclass: Extend ppc/ppc64 extra options > glibc: Update to latest 2.35 tip > libc-glibc: Use libxcrypt to provide virtual/crypt Signed-off-by: Khem Raj --- sources/bitbake | 2 +- sources/meta-freescale | 2 +- sources/meta-intel | 2 +- sources/meta-openembedded | 2 +- sources/meta-qcom | 2 +- sources/openembedded-core | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sources/bitbake b/sources/bitbake index d720dfa40..c1c8fc678 160000 --- a/sources/bitbake +++ b/sources/bitbake @@ -1 +1 @@ -Subproject commit d720dfa40620e64a557edef527148d58fcb1d858 +Subproject commit c1c8fc678eb4783cea3974328a5fa8d1b79f1266 diff --git a/sources/meta-freescale b/sources/meta-freescale index 1f4577542..96a0904cd 160000 --- a/sources/meta-freescale +++ b/sources/meta-freescale @@ -1 +1 @@ -Subproject commit 1f4577542cd2246b4a1f1bf0e331f82ff2d7da8b +Subproject commit 96a0904cd0562378411c373f8a976c749772202b diff --git a/sources/meta-intel b/sources/meta-intel index 2c6ae10ee..a2f5f65ca 160000 --- a/sources/meta-intel +++ b/sources/meta-intel @@ -1 +1 @@ -Subproject commit 2c6ae10eeb713e10a6446e0674d5c704902918da +Subproject commit a2f5f65ca37c4c831c958a466ab1d6d27da3bdf3 diff --git a/sources/meta-openembedded b/sources/meta-openembedded index 3c1c07e9a..aea550e75 160000 --- a/sources/meta-openembedded +++ b/sources/meta-openembedded @@ -1 +1 @@ -Subproject commit 3c1c07e9a5477df68bfa1f739b38f10a5e78b07e +Subproject commit aea550e75dbff04d6ff1beb6c699ec4b680e6e8a diff --git a/sources/meta-qcom b/sources/meta-qcom index 1a92cc0f5..f269c1626 160000 --- a/sources/meta-qcom +++ b/sources/meta-qcom @@ -1 +1 @@ -Subproject commit 1a92cc0f51dd1875378a29f6de4ce37928d20c2a +Subproject commit f269c162657b1d9a3a7a0cb4144611719ddd51cd diff --git a/sources/openembedded-core b/sources/openembedded-core index 9ea1a838b..8bed8e699 160000 --- a/sources/openembedded-core +++ b/sources/openembedded-core @@ -1 +1 @@ -Subproject commit 9ea1a838b946020e026edc032039552b723fcaa4 +Subproject commit 8bed8e6993e7297bdcd68940aa0d47ef47120117 From d757262d30185cc0207e4901924d8f05b888d8ba Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 27 Apr 2022 10:15:41 -0700 Subject: [PATCH 08/10] site.conf: Enable persistent logs across reboots This will stop pointing /var/log to /var/volatile/log where /var/volatile is tmpfs. It will enure that logs across reboots are persisted Signed-off-by: Khem Raj --- conf/site.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/conf/site.conf b/conf/site.conf index 60487c1a4..9402f8f4b 100644 --- a/conf/site.conf +++ b/conf/site.conf @@ -24,6 +24,9 @@ TEST_TARGET = "simpleremote" # Dont package kernel into image RDEPENDS:${KERNEL_PACKAGE_NAME}-base = "" +# Enable persistent logs across reboots +VOLATILE_LOG_DIR = "no" + EXTRA_IMAGE_FEATURES = "debug-tweaks" # Define a feedserver template to be part of rootfs From daf5caeca054ad5799143a0dcee3bf2eb9c61fe3 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 27 Apr 2022 10:20:40 -0700 Subject: [PATCH 09/10] updater.installer: Overlay rootfs directories into /data Since /data is readwrite and bigger in size, this provides two possibilities - Mount rootfs as r/o - Have more disk available to rootfs, handy during development ( install ipks ) Signed-off-by: Khem Raj --- .../recipes-support/updater/files/updater.installer | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sources/meta-yoe/recipes-support/updater/files/updater.installer b/sources/meta-yoe/recipes-support/updater/files/updater.installer index ef36a0288..ca1d0ccba 100644 --- a/sources/meta-yoe/recipes-support/updater/files/updater.installer +++ b/sources/meta-yoe/recipes-support/updater/files/updater.installer @@ -274,7 +274,11 @@ mount_data() { return 1 fi fi - mkdir -p $mount/log + mkdir -p $mount/log $mount/usr $mount/work $mount/home $mount/var + mount -t overlay overlay -o lowerdir=/usr,upperdir=/data/usr,workdir=/data/work /usr + mount -t overlay overlay -o lowerdir=/home,upperdir=/data/home,workdir=/data/work /home + mount -t overlay overlay -o lowerdir=/var,upperdir=/data/var,workdir=/data/var /var + mount -t overlay overlay -o lowerdir=/etc,upperdir=/data/etc,workdir=/data/var /etc } umount_data() { From bb18a547f5d95ba788cd111bb1660dd3a9712147 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 27 Apr 2022 22:06:32 -0700 Subject: [PATCH 10/10] updater: Use overlayfs to mount r/w partition as root overlay We mount /data on top of /, since data is large partion its good for development, secondly, we can turn r/o for rootfs if we want to, which means the rootfs will stay immutable and the r/w and persistent data will be logged into /data/upper directory. We can also put persistent files e.g. config files etc. into /data/upper/persistent location and this will ensure that these files will be used by the system e.g. wifi SSID/Passwd etc. Added advantage is that when rootfs is upgraded by OTA these configs remain persistent. Journal is now persisted across reboots. Journal will also be stored onto /data partition Signed-off-by: Khem Raj --- .../updater/files/updater.installer | 75 +++++++++++-------- 1 file changed, 42 insertions(+), 33 deletions(-) diff --git a/sources/meta-yoe/recipes-support/updater/files/updater.installer b/sources/meta-yoe/recipes-support/updater/files/updater.installer index ca1d0ccba..62b52fd64 100644 --- a/sources/meta-yoe/recipes-support/updater/files/updater.installer +++ b/sources/meta-yoe/recipes-support/updater/files/updater.installer @@ -54,6 +54,13 @@ msg_splash() { fi } +rescue_shell() { + msg "$@" + msg "Something went wrong. Dropping you to a shell." + busybox --install -s + exec /bin/sh +} + start_splash() { if [ -e /usr/bin/psplash ]; then splash_enabled=1 @@ -76,13 +83,11 @@ restart() { initialize() { msg "============================================================" msg "Updater version $VERSION" - mkdir -p /dev - mkdir -p /sys - mkdir -p /proc + mkdir -p /dev /sys /proc mount -t devtmpfs none /dev - mount -t sysfs sysfs /sys - mount -t proc proc /proc + mount -t sysfs none /sys + mount -t proc none /proc start_splash @@ -274,11 +279,15 @@ mount_data() { return 1 fi fi - mkdir -p $mount/log $mount/usr $mount/work $mount/home $mount/var - mount -t overlay overlay -o lowerdir=/usr,upperdir=/data/usr,workdir=/data/work /usr - mount -t overlay overlay -o lowerdir=/home,upperdir=/data/home,workdir=/data/work /home - mount -t overlay overlay -o lowerdir=/var,upperdir=/data/var,workdir=/data/var /var - mount -t overlay overlay -o lowerdir=/etc,upperdir=/data/etc,workdir=/data/var /etc +} + +mount_overlay() { + mkdir -p /mnt/data/upper /mnt/data/work /mnt/data/persistent + mount -t overlay -o ro,lowerdir=/mnt/data/persistent:/mnt/rootfs,upperdir=/mnt/data/upper,workdir=/mnt/data/work overlay /mnt/rootfs +} + +umount_overlay() { + umount $dir } umount_data() { @@ -289,39 +298,35 @@ umount_data() { } mount_rootfs_sd() { - mkdir -p $ROOTFS_MOUNT_POINT - if ! mount $SD_ROOTFS_DEV $ROOTFS_MOUNT_POINT; then + mkdir -p /mnt/rootfs /mnt/data /mnt/boot + if ! mount $SD_ROOTFS_DEV /mnt/rootfs; then fsck -y $SD_ROOTFS_DEV - if ! mount $SD_ROOTFS_DEV $ROOTFS_MOUNT_POINT; then + if ! mount $SD_ROOTFS_DEV /mnt/rootfs; then msg_splash "Error mount SD rootfs, please fix ..." speak "updater, S D file system error" sleep 9999d fi fi - mkdir -p $SD_BOOT_MOUNT_IN_ROOTFS $SD_DATA_MOUNT_IN_ROOTFS - mount_boot $SD_BOOT_MOUNT $SD_BOOT_DEV - mount_data $SD_DATA_MOUNT $SD_DATA_DEV - mount --move $SD_BOOT_MOUNT $SD_BOOT_MOUNT_IN_ROOTFS - mount --move $SD_DATA_MOUNT $SD_DATA_MOUNT_IN_ROOTFS + mount_boot /mnt/boot $SD_BOOT_DEV + mount_data /mnt/data $SD_DATA_DEV + mount_overlay } mount_rootfs_emmc() { - mkdir -p $ROOTFS_MOUNT_POINT - if ! mount $EMMC_ROOTFS_DEV $ROOTFS_MOUNT_POINT; then + mkdir -p /mnt/rootfs /mnt/data /mnt/boot + if ! mount $EMMC_ROOTFS_DEV /mnt/rootfs; then fsck -y $EMMC_ROOTFS_DEV - if ! mount $EMMC_ROOTFS_DEV $ROOTFS_MOUNT_POINT; then + if ! mount $EMMC_ROOTFS_DEV /mnt/rootfs; then msg_splash "Error mount EMMC rootfs, please fix ..." speak "updater, E M M C file system error" sleep 9999d fi fi - mkdir -p $EMMC_BOOT_MOUNT_IN_ROOTFS $EMMC_DATA_MOUNT_IN_ROOTFS - mount_boot $EMMC_BOOT_MOUNT $EMMC_BOOT_DEV - mount_data $EMMC_DATA_MOUNT $EMMC_DATA_DEV - mount --move $EMMC_BOOT_MOUNT $EMMC_BOOT_MOUNT_IN_ROOTFS - mount --move $EMMC_DATA_MOUNT $EMMC_DATA_MOUNT_IN_ROOTFS + mount_boot /mnt/boot $EMMC_BOOT_DEV + mount_data /mnt/data $EMMC_DATA_DEV + mount_overlay } mount_rootfs_nand() { @@ -478,16 +483,16 @@ update_from_sd() { } update_from_data() { - update_file=$(find_update_file $DATA_MOUNT_POINT) + update_file=$(find_update_file $DATA_MOUNT_POINT/upper/data) if [ "$update_file" != "" ]; then speak "update found on data partition" msg_splash "Updating from Data partition: $update_file" - if ! process_update $DATA_MOUNT_POINT/$update_file; then + if ! process_update $DATA_MOUNT_POINT/upper/data/$update_file; then msg_splash "Failed to process update from data partition" speak "updater, failed to process update from data partition" return 1 else - rm -rf $DATA_MOUNT_POINT/$update_file + rm -rf $DATA_MOUNT_POINT/upper/data/$update_file msg_splash "Update from Data partition complete" return 0 fi @@ -529,14 +534,18 @@ boot() { fi msg_splash "Moving system mounts into rootfs..." - mount --move /dev $ROOTFS_MOUNT_POINT/dev - mount --move /proc $ROOTFS_MOUNT_POINT/proc - mount --move /sys $ROOTFS_MOUNT_POINT/sys + #mount --move /dev /mnt/rootfs/dev + #mount --move /proc /mnt/rootfs/proc + #mount --move /sys /mnt/rootfs/sys + umount /proc + umount /sys + umount /dev msg_splash "switching to main filesystem" msg_splash 50 - exec switch_root -c /dev/console $ROOTFS_MOUNT_POINT /sbin/init 5 + #exec switch_root -c /dev/console /mnt/rootfs /sbin/init + exec switch_root /mnt/rootfs /sbin/init } initialize