| |
@@ -322,19 +322,22 @@
|
| |
fi
|
| |
}
|
| |
|
| |
- add_bls_parameter()
|
| |
- {
|
| |
+ add_bls_parameter() {
|
| |
for bls in /tmp/boot/loader/entries/*.conf; do
|
| |
+ echo "appending kargs '$1' to BLS config fragment /boot/loader/entries/$(basename ${bls})"
|
| |
sed -i "s|options|& $1|" ${bls}
|
| |
done
|
| |
}
|
| |
|
| |
- add_kernel_parameter () {
|
| |
+ add_kernel_parameter() {
|
| |
if [ -f /tmp/boot/extlinux/extlinux.conf ]; then
|
| |
+ echo "appending kargs to '$1' /boot/extlinux/extlinux.conf"
|
| |
sed -i "s|append|& $1 |" /tmp/boot/extlinux/extlinux.conf
|
| |
elif [ -f /tmp/fw/EFI/fedora/grub.cfg ]; then
|
| |
+ echo "appending kargs '$1' to /etc/default/grub"
|
| |
sed -i "s|GRUB_CMDLINE_LINUX=\"|& $1 |" ${PREFIX}/etc/default/grub
|
| |
- if grep -q '^kernelopts=' /tmp/fw/EFI/fedora/grubenv; then
|
| |
+ if [ -f /tmp/fw/EFI/fedora/grubenv ] && grep -q '^kernelopts=' /tmp/fw/EFI/fedora/grubenv; then
|
| |
+ echo "appending kargs '$1' to /boot/EFI/fedora/grubenv"
|
| |
sed -i "s|kernelopts=|& $1 |" /tmp/fw/EFI/fedora/grubenv
|
| |
else
|
| |
add_bls_parameter "$1"
|
| |
@@ -508,6 +511,11 @@
|
| |
. "${BOARDDIR}/${TARGET}"
|
| |
elif [ -d "${PREFIX}/usr/share/uboot/${TARGET}" ]; then
|
| |
. "${BOARDDIR}/${TARGET}"
|
| |
+ elif [ -d "/usr/share/uboot/${TARGET}" ]; then
|
| |
+ echo "Warning: Using out-of-tree devicetree image for ${TARGET}. Adding to OSTree"
|
| |
+ mkdir ${PREFIX}/usr/share/uboot/${TARGET}
|
| |
+ cp /usr/share/uboot/${TARGET}/{idbloader.img,u-boot.itb} ${PREFIX}/usr/share/uboot/${TARGET}
|
| |
+ . "${BOARDDIR}/${TARGET}"
|
| |
else
|
| |
echo "= No U-Boot files found for $TARGET."
|
| |
fi
|
| |
This appears to be a U-Boot image, and not device tree? Not sure what OSTree has got to do with it in this context.