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

137 lines
4.7 KiB

# Filesystem type for the initrd.
INITRD_FS = ext2
ifeq ($(targetstring),monolithic)
# Keep just 4MiB for monolithic builds
extra_sz=1000
else
# Need a lot more room for udebs for network and CD builds
# TODO: fix & use tmpfs instead
extra_sz=12000
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/klowner-hurd.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_MODDIR=/usr/lib/grub/i386-pc
GRUB_MODULES=cpuid echo gfxterm minicmd multiboot normal png vbe
GRUB_MODULES_PXE=pxe pxecmd
GRUB_MODULES_CDROM=biosdisk chain iso9660
# 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
# Unsupported targets
arch_boot_screens:
arch_tree:
# 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:
-rm -f $(TEMP_CD_INFO_DIR)/*
mkdir -p $(TEMP_CD_INFO_DIR)
mkdir -p $(TEMP_CD_INFO_DIR)/boot/grub
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 \
cp $(SPLASH_PNG) $(TEMP_CD_INFO_DIR)/boot/grub/splash.png; \
fi
grub-mkimage -O i386-pc -o $(TEMP_CD_INFO_DIR)/boot/grub/core.img $(GRUB_MODULES) $(GRUB_MODULES_CDROM)
cat $(GRUB_MODDIR)/cdboot.img $(TEMP_CD_INFO_DIR)/boot/grub/core.img \
> $(TEMP_CD_INFO_DIR)/boot/grub/grub_eltorito
rm $(TEMP_CD_INFO_DIR)/boot/grub/core.img
# 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 /lib/ld.so.1 $(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 \
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 /lib/ld.so.1 $(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 \
cp $(SPLASH_PNG) $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH)/splash.png; \
fi
# Generate grub2pxe
grub-mkimage -O i386-pc --prefix="(pxe)/$(NETBOOT_PATH)" \
-o $(TEMP_NETBOOT_DIR)/core.img \
$(GRUB_MODULES) $(GRUB_MODULES_PXE)
# workaround a gPXE bug
sed -i -e 's/\x02\xb0\xad\x1b/\x03\xb0\xad\x1b/' $(TEMP_NETBOOT_DIR)/core.img
cat $(GRUB_MODDIR)/pxeboot.img $(TEMP_NETBOOT_DIR)/core.img \
> $(TEMP_NETBOOT_DIR)/$(NETBOOT_PATH)/grub2pxe
rm $(TEMP_NETBOOT_DIR)/core.img
# 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)' /lib/ld.so.1 'exec /hurd/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)