You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
debian-installer/build/config/hurd.cfg

138 lines
4.5 KiB

# Filesystem type for the initrd.
INITRD_FS = ext2
ifeq ($(targetstring),monolithic)
# Keep just 16MiB for monolithic builds
extra_sz=4000
else
# Need a lot more room for udebs for network and CD builds
# TODO: fix & use tmpfs instead
extra_sz=18000
endif
# We have to redefine genext2fs to use 4k blocks and leave some space
define genext2fs
nb=$$(find $(TREE) | wc -l); \
sz=$$(du -s $(TREE) | cut -f 1); \
genext2fs -d $(TREE) -B 4096 -o hurd -m 0 \
-b $$(expr $$sz / 4 + $$nb / 2 + $(extra_sz)) \
-N $$(expr $$nb + 1024)
endef
# The image to use for a syslinux splash screen.
SPLASH_PNG=boot/hurd/pics/boot-splash.png
SPLASH_SVG=$(patsubst %.png,%.svg,$(SPLASH_PNG))
# The font to load in GRUB
GRUB_FONT=/usr/share/grub/ascii.pf2
# GRUB configuration files
GRUB_CFG_CDROM=boot/hurd/grub-hurd-cdrom.cfg
GRUB_CFG_PXE=boot/hurd/grub-hurd-pxe.cfg
# GRUB modules
GRUB_PLATFORM=i386-pc
GRUB_MODDIR=/usr/lib/grub/$(GRUB_PLATFORM)
GRUB_MODULES_PXE=pxe tftp multiboot cpuid echo play gfxterm gfxterm_background gzio minicmd normal png vbe
# Location for Xen example configuration.
XENCFG = $(SOME_DEST)/$(EXTRANAME)debian.cfg
# Library reduction needs some extra stuff which for now
# is not usually available.
MKLIBS = mklibs-copy
# fakeroot-hurd does not support -s and -i
ifneq ($(shell id -u),0)
ROOTCMD = fakeroot-tcp
endif
# Unsupported targets
arch_tree:
arch_boot:
arch_boot_screens:
# genisoimage CD info directory, including grub and configuration files
# Note that the configuration is extensively manipulated by debian-cd to
# support all the available CD/DVD variants.
.PHONY: arch_cd_info_dir
arch_cd_info_dir:
x86-image $(TEMP_CD_INFO_DIR) $(GRUB_PLATFORM)
sed -e "s/@ARCH@/$(ARCH)/g" $(GRUB_CFG_CDROM) \
> $(TEMP_CD_INFO_DIR)/boot/grub/grub.cfg
if [ -n "$(GRUB_FONT)" ] ; then \
cp $(GRUB_FONT) $(TEMP_CD_INFO_DIR)/boot/grub/font.pf2; \
fi
if [ -n "$(SPLASH_PNG)" ]; then \
if [ -n "$(SPLASH_SVG)" -a -f "$(SPLASH_SVG)" ]; then \
rsvg-convert $(SPLASH_SVG) > $(SPLASH_PNG); \
fi; \
cp $(SPLASH_PNG) $(TEMP_CD_INFO_DIR)/boot/grub/splash.png; \
fi
# Miniature CD image using GRUB, with only an initrd, no udebs or debs.
.PHONY: arch_miniiso
arch_miniiso: $(TEMP_INITRD) $(TEMP_KERNEL) $(TREE)
-rm -f $(TEMP_CD_TREE)/*
mkdir -p $(TEMP_CD_TREE)/boot/kernel
mkdir -p $(TEMP_CD_TREE)/boot/grub
cp $(TEMP_KERNEL) $(TEMP_CD_TREE)/boot/kernel/
cp $(TEMP_INITRD) $(TEMP_CD_TREE)/boot/initrd.gz
sed -e "s/@ARCH@/$(ARCH)/g" $(GRUB_CFG_CDROM) \
> $(TEMP_CD_TREE)/boot/grub/grub.cfg
if [ -n "$(GRUB_FONT)" ] ; then \
cp $(GRUB_FONT) $(TEMP_CD_TREE)/boot/grub/font.pf2; \
fi
if [ -n "$(SPLASH_PNG)" ]; then \
if [ -n "$(SPLASH_SVG)" -a -f "$(SPLASH_SVG)" ]; then \
rsvg-convert $(SPLASH_SVG) > $(SPLASH_PNG); \
fi; \
cp $(SPLASH_PNG) $(TEMP_CD_TREE)/boot/grub/splash.png; \
fi
grub-mkrescue --output=$(TEMP_MINIISO) $(TEMP_CD_TREE)
# Netboot files
.PHONY: arch_netboot_dir
arch_netboot_dir:
-rm -f $(TEMP_NETBOOT_DIR)
mkdir -p $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH)
cp $(TEMP_INITRD) $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH)
cp $(TEMP_KERNEL) $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH)
sed -e "s/@ARCH@/$(ARCH)/g" $(GRUB_CFG_PXE) \
> $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH)/grub.cfg
if [ -n "$(GRUB_FONT)" ] ; then \
cp $(GRUB_FONT) $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH)/font.pf2; \
fi
if [ -n "$(SPLASH_PNG)" ]; then \
if [ -n "$(SPLASH_SVG)" -a -f "$(SPLASH_SVG)" ]; then \
rsvg-convert $(SPLASH_SVG) > $(SPLASH_PNG); \
fi; \
cp $(SPLASH_PNG) $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH)/splash.png; \
fi
# Generate grub2pxe
grub-mkimage -O $(GRUB_PLATFORM)-pxe --prefix="(pxe)/$(NETBOOT_PATH)" \
-o $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH)/grub2pxe \
$(GRUB_MODULES_PXE)
# This symlink is not strictly required, but it allows more usual
# dhcp server setups to work without modification.
rm -f $(TEMP_NETBOOT_DIR)/grub2pxe
ln -sf $(NETBOOT_PATH)/grub2pxe $(TEMP_NETBOOT_DIR)/grub2pxe
.PHONY: xen_config
xen_config: $(TEMP_INITRD)
util/xen/build_modules $(SOME_DEST)/$(EXTRANAME)/modules $(TEMP_INITRD) 'initrd $$(ramdisk-create)' $(TEMP)/ext2fs.static 'ext2fs -A --multiboot-command-line=$${kernel-command-line} --host-priv-port=$${host-port} --device-master-port=$${device-port} --exec-server-task=$${exec-task} -T typed $${root} $$(task-create) $$(task-resume)' $(TEMP)/exec.static 'exec $$(exec-task=task-create)'
sed -e "s/@ARCH@/$(ARCH)/g" \
-e "s/@XEN_INSTALL_METHOD@/$(XEN_INSTALL_METHOD)/g" \
-e "s/@DEBIAN_RELEASE@/$(DEBIAN_RELEASE)/g" \
<boot/hurd/xen/debian.cfg >$(XENCFG)
chmod 644 $(XENCFG)
update-manifest $(XENCFG) $(MANIFEST-XENCFG)