mirror of
https://github.com/ostreedev/ostree.git
synced 2024-12-23 21:35:26 +03:00
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:
parent
f19ba12360
commit
ae61abb029
@ -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 ()
|
||||
|
Loading…
Reference in New Issue
Block a user