Commit 3d10c59d authored by Michael Shigorin's avatar Michael Shigorin

test-based ramdisk size for live squashfs images

Implementation based on m-p-d::profiles/scripts.d/03-syslinux (but heavily modified for m-p of course)
parent 3a5b47e7
......@@ -15,3 +15,13 @@
+ если добавить какой-либо kernel-image в STAGE1_PACKAGES*,
результат может быть неожиданным
+ вероятная ошибка: незагрузка полученного squashfs
- features.in/install2/install2/stage2cfg.mk
- features.in/live/live/stage2cfg.mk
- features.in/rescue/rescue/stage2cfg.mk
- features.in/syslinux/cfg.in/15live.cfg
- features.in/syslinux/cfg.in/20install2.cfg
- features.in/syslinux/cfg.in/80rescue.cfg
- features.in/syslinux/scripts.d/20-propagator-ramdisk
+ ожидают, что названия squashfs-образов второй стадии инсталятора,
livecd и спасательной системы соответственно altinst, live и rescue
......@@ -32,6 +32,19 @@ all:
fi; \
fi; \
done; \
for scripts in scripts.d image-scripts.d; do \
if test -d "$(BUILDDIR)/$$scripts" -a \
-d "$$dir/$$scripts"; then \
if rsync -qab "$$dir/$$scripts/" \
"$(BUILDDIR)/$$scripts/"; then \
type -t git >&/dev/null && \
pushd "$(BUILDDIR)/$$scripts/" && \
git add . && \
git commit -qam "$$dir feature (toplevel $$scripts)" ||:; \
popd; \
fi; \
fi; \
done; \
if test -x "$$dir/generate.sh"; then \
pushd "$$dir" && \
sh generate.sh; \
......
label live
menu label ^LiveCD (no hard disk needed)
kernel alt0/vmlinuz
append initrd=alt0/full.cz live ramdisk_size=72000 fastboot stagename=live showopts automatic=method:cdrom
### FIXME: see m-p-d::profiles/scripts.d/03-syslinux
append initrd=alt0/full.cz live ramdisk_size=@live_size@ fastboot stagename=live showopts automatic=method:cdrom
label linux
menu label ^Install ALT Linux
kernel alt0/vmlinuz
append initrd=alt0/full.cz changedisk vga=0x314 quiet=1 showopts automatic=method:cdrom
append initrd=alt0/full.cz ramdisk_size=@altinst_size@ changedisk vga=0x314 quiet=1 showopts automatic=method:cdrom
label noapic
menu label ^Failsafe install
kernel alt0/vmlinuz
append initrd=alt0/full.cz changedisk showopts nolapic noapic
append initrd=alt0/full.cz ramdisk_size=@altinst_size@ changedisk showopts nolapic noapic
label rescue
menu label ^Rescue LiveCD
kernel alt0/vmlinuz
append initrd=alt0/full.cz live ramdisk_size=72000 fastboot stagename=rescue showopts automatic=method:cdrom
### FIXME: see m-p-d::profiles/scripts.d/03-syslinux
append initrd=alt0/full.cz live ramdisk_size=@rescue_size@ fastboot stagename=rescue showopts automatic=method:cdrom
#!/bin/sh -x
# postprocess isolinux configuration
# when the image sizes are finally known
cd "$WORKDIR"
# apply size census while looking for potential squashfs images
find -maxdepth 1 -type f -size +1M \
| sed 's,^\./,,' \
| while read image; do
size="$[ $(stat -c%s "$image") / 1024 + 1 ]"
sed -i "s,@${image}_size@,$size," syslinux/*.cfg
done
......@@ -34,3 +34,6 @@ grep -hv '^#' .in/[0-9][0-9]*.cfg > "$BOOTLOADER.cfg"
# snippets are not going into the actual image
if test "$DEBUG" != 2; then rm -r .in/; fi
# NB: there will be final macro expansion based on actual image sizes
# (done by ../../scripts.d/10-propagator-ramdisk)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment