ppc64le: use syslinux feature only to generate config

This commit is contained in:
Gleb Fotengauer-Malinovskiy 2019-07-09 14:13:50 +03:00 committed by Michael Shigorin
parent 61b48bcc4b
commit 5cfc7ede81
3 changed files with 25 additions and 5 deletions

View File

@ -1,25 +1,35 @@
# default is plain text prompt # default is plain text prompt
# NB: might be usbflash-ready hybrid iso # NB: might be usbflash-ready hybrid iso
ifeq (,$(filter-out i586 x86_64,$(ARCH)))
# on ppc64le syslinux feature is used only to generate config
# (it's converted into grub.cfg later)
ifeq (,$(filter-out i586 x86_64 ppc64le,$(ARCH)))
use/syslinux: sub/stage1 $(ISOHYBRID:%=use/isohybrid) use/syslinux: sub/stage1 $(ISOHYBRID:%=use/isohybrid)
@$(call add_feature) @$(call add_feature)
ifeq (,$(filter-out i586 x86_64,$(ARCH)))
@$(call add,STAGE1_PACKAGES,syslinux) @$(call add,STAGE1_PACKAGES,syslinux)
@$(call try,META_SYSTEM_ID,SYSLINUX)
@$(call try,BOOTVGA,normal) @$(call try,BOOTVGA,normal)
endif
@$(call try,META_SYSTEM_ID,SYSLINUX)
@$(call set,RELNAME,ALT ($(IMAGE_NAME))) @$(call set,RELNAME,ALT ($(IMAGE_NAME)))
@$(call set,IMAGE_PACKTYPE,boot) @$(call set,IMAGE_PACKTYPE,boot)
else else
use/syslinux: ; @: use/syslinux: ; @:
endif endif
ifeq (,$(filter-out i586 x86_64,$(ARCH)))
# UI is overwritten # UI is overwritten
use/syslinux/ui/%: use/syslinux use/syslinux/ui/%: use/syslinux
@$(call set,SYSLINUX_UI,$*) @$(call set,SYSLINUX_UI,$*)
ifeq (,$(filter-out i586 x86_64,$(ARCH)))
@if [ "$*" == gfxboot ]; then \ @if [ "$*" == gfxboot ]; then \
$(call add,STAGE1_PACKAGES,gfxboot); \ $(call add,STAGE1_PACKAGES,gfxboot); \
$(call add,STAGE1_BRANDING,bootloader); \ $(call add,STAGE1_BRANDING,bootloader); \
fi fi
else
use/syslinux/ui/%: use/syslinux; @:
endif endif
# modules and config snippets just add up # modules and config snippets just add up
@ -29,5 +39,9 @@ use/syslinux/%.com use/syslinux/%.c32: use/syslinux
use/syslinux/%.cfg: use/syslinux use/syslinux/%.cfg: use/syslinux
@$(call add,SYSLINUX_CFG,$*) @$(call add,SYSLINUX_CFG,$*)
ifeq (,$(filter-out ppc64le,$(ARCH)))
use/syslinux/localboot.cfg use/syslinux/removable.cfg use/syslinux/lateboot.cfg use/syslinux/sdab.cfg: use/syslinux; @:
endif
use/syslinux/timeout/%: use/syslinux use/syslinux/timeout/%: use/syslinux
@$(call set,SYSLINUX_TIMEOUT,$*) @$(call set,SYSLINUX_TIMEOUT,$*)

View File

@ -5,10 +5,16 @@
cd "$WORKDIR" cd "$WORKDIR"
cfgs="$(find syslinux boot/grub -name '*.cfg')"
[ -n "$cfgs" ] || {
echo "${0##*/}: did not find any config under /syslinux or /boot/grub" >&2
exit 1
}
# apply size census while looking for potential squashfs images # apply size census while looking for potential squashfs images
find -maxdepth 1 -type f -size +1M \ find -maxdepth 1 -type f -size +1M \
| sed 's,^\./,,' \ | sed 's,^\./,,' \
| while read image; do | while read image; do
size="$[ $(stat -c%s "$image") / 1024 + 1 ]" size="$[ $(stat -c%s "$image") / 1024 + 1 ]"
sed -i "s,@${image}_size@,$size," syslinux/*.cfg sed -i "s,@${image}_size@,$size," $cfgs
done done

View File

@ -10,7 +10,7 @@ cd "$WORKDIR/syslinux"
# validate just in case (see also stage1 Makefile) # validate just in case (see also stage1 Makefile)
case "$GLOBAL_BOOTLOADER" in case "$GLOBAL_BOOTLOADER" in
isolinux|syslinux) ;; isolinux|syslinux|ieee1275boot) ;;
*) echo "error: weird GLOBAL_BOOTLOADER: \`$GLOBAL_BOOTLOADER'" >&2; *) echo "error: weird GLOBAL_BOOTLOADER: \`$GLOBAL_BOOTLOADER'" >&2;
exit 1;; exit 1;;
esac esac