u-boot: Merge ostree's and systems uEnv.txt
This is a proper fix for: https://bugzilla.gnome.org/show_bug.cgi?id=755787 With this patch, an admin (system builder) can now: 1) Edit /usr/lib/ostree-boot/uEnv.txt 2) Deploy the new tree. OSTree will append system's uEnv.txt to the OSTree's managed uEnv.txt (loader/uEnv.txt). It is common for u-boot systems to read in an extra env from external /uEnv.txt. The same file OSTree uses to pass in its env. With this patch /uEnv.txt now contains OSTree's env + custom env added by system builders. Closes: #466 Approved by: cgwalters
This commit is contained in:
1 parent
47b0b4120a
commit
b6ec7526b5
5 files changed
+61
-3
No files matched your search
@@ -18,8 +18,6 @@
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
echo "1..16"
|
||||
|
||||
function validate_bootloader() {
|
||||
cd ${test_tmpdir};
|
||||
bootloader=""
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
echo "1..16"
|
||||
|
||||
. $(dirname $0)/libtest.sh
|
||||
|
||||
# Exports OSTREE_SYSROOT so --sysroot not needed.
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
echo "1..16"
|
||||
|
||||
. $(dirname $0)/libtest.sh
|
||||
|
||||
# Exports OSTREE_SYSROOT so --sysroot not needed.
|
||||
|
||||
@@ -20,9 +20,27 @@
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
echo "1..17"
|
||||
|
||||
. $(dirname $0)/libtest.sh
|
||||
|
||||
# Exports OSTREE_SYSROOT so --sysroot not needed.
|
||||
setup_os_repository "archive-z2" "uboot"
|
||||
|
||||
. $(dirname $0)/admin-test.sh
|
||||
|
||||
cd ${test_tmpdir}
|
||||
ln -s ../../boot/ osdata/usr/lib/ostree-boot
|
||||
cat << 'EOF' > osdata/boot/uEnv.txt
|
||||
loaduimage=load mmc ${bootpart} ${loadaddr} ${kernel_image}
|
||||
loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}${fdtfile}
|
||||
loadramdisk=load mmc ${bootpart} ${rdaddr} ${ramdisk_image}
|
||||
mmcargs=setenv bootargs $bootargs console=${console} ${optargs} root=${mmcroot} rootfstype=${mmcrootfstype}
|
||||
mmcboot=run loadramdisk; echo Booting from mmc ....; run mmcargs; bootz ${loadaddr} ${rdaddr} ${fdtaddr}
|
||||
EOF
|
||||
${CMD_PREFIX} ostree --repo=testos-repo commit --tree=dir=osdata/ -b testos/buildmaster/x86_64-runtime
|
||||
${CMD_PREFIX} ostree admin upgrade --os=testos
|
||||
assert_file_has_content sysroot/boot/uEnv.txt "loadfdt="
|
||||
assert_file_has_content sysroot/boot/uEnv.txt "kernel_image="
|
||||
|
||||
echo "ok merging uEnv.txt files"
|
||||
Reference in new issue
Block a user