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>
This commit is contained in:
Javier Martinez Canillas 2013-09-01 13:07:17 +02:00 committed by Colin Walters
parent f19ba12360
commit ae61abb029

View File

@ -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 ()