[ostree] tests: allow setup_os_repository to create U-Boot stub config
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] tests: allow setup_os_repository to create U-Boot stub config
- Date: Sun, 15 Sep 2013 16:47:23 +0000 (UTC)
commit ae61abb0297bfddb4fb194d6e1d3ee636a763b56
Author: Javier Martinez Canillas <javier martinez collabora co uk>
Date: Sun Sep 1 13:07:17 2013 +0200
tests: allow setup_os_repository to create U-Boot stub config
Currently OSTree supports two bootloader backends: syslinux
and U-Boot; allow to create a stub configuration for both.
https://bugzilla.gnome.org/show_bug.cgi?id=708069
Signed-off-by: Javier Martinez Canillas <javier martinez collabora co uk>
tests/libtest.sh | 20 +++++++++++++++++---
1 files changed, 17 insertions(+), 3 deletions(-)
---
diff --git a/tests/libtest.sh b/tests/libtest.sh
index b05e72b..fc6eef1 100644
--- a/tests/libtest.sh
+++ b/tests/libtest.sh
@@ -165,6 +165,15 @@ setup_os_boot_syslinux() {
ln -s ../loader/syslinux.cfg sysroot/boot/syslinux/syslinux.cfg
}
+setup_os_boot_uboot() {
+ # Stub U-Boot configuration
+ mkdir -p sysroot/boot/loader.0
+ ln -s loader.0 sysroot/boot/loader
+ touch sysroot/boot/loader/uEnv.txt
+ # And a compatibility symlink
+ ln -s loader/uEnv.txt sysroot/boot/uEnv.txt
+}
+
setup_os_repository () {
mode=$1
bootmode=$2
@@ -218,9 +227,14 @@ EOF
ostree admin --sysroot=sysroot init-fs sysroot
ostree admin --sysroot=sysroot os-init testos
- if [ $bootmode = "syslinux" ]; then
- setup_os_boot_syslinux
- fi
+ case $bootmode in
+ "syslinux")
+ setup_os_boot_syslinux
+ ;;
+ "uboot")
+ setup_os_boot_uboot
+ ;;
+ esac
}
os_repository_new_commit ()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]