Skip to content

Commit

Permalink
Makefile,grub: compress kernel image with XZ
Browse files Browse the repository at this point in the history
  • Loading branch information
wipawel committed Feb 19, 2022
1 parent e3faa5d commit 30e6da1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ cscope.*
Makeconf.local
.DS_Store
*.swp
*.xz
drivers/acpi/acpica/source/
third-party/libpfm/COPYING
third-party/libpfm/Makefile
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ endif
XORRISO := xorriso
QEMU_BIN := qemu-system-x86_64
GDB := gdb
XZ := xz

COMMON_INCLUDES := -I$(KTF_ROOT)/include -I$(KTF_ROOT)/include/arch/x86
ifeq ($(CONFIG_LIBPFM),y)
Expand Down Expand Up @@ -216,6 +217,7 @@ clean:
$(VERBOSE) find $(KTF_ROOT) -name \*.bin -delete
$(VERBOSE) find $(KTF_ROOT) -name \*.iso -delete
$(VERBOSE) find $(KTF_ROOT) -name \*.img -delete
$(VERBOSE) find $(KTF_ROOT) -name \*.xz -delete
$(VERBOSE) find $(KTF_ROOT) -name cscope.\* -delete
$(VERBOSE) find $(PFMLIB_DIR) -mindepth 1 ! -name $(PFMLIB_NAME)-$(PFMLIB_VER).tar.gz -delete
$(VERBOSE) $(RM) -rf $(ACPICA_DEST_DIR)/source
Expand Down Expand Up @@ -254,6 +256,7 @@ $(ISO_FILE): $(TARGET)
@echo "GEN ISO" $(ISO_FILE)
$(VERBOSE) $(GRUB_FILE) --is-x86-multiboot $(TARGET) || { echo "Multiboot not supported"; exit 1; }
$(VERBOSE) cp $(TARGET) $(GRUB_DIR)/
$(VERBOSE) $(XZ) -q -f $(GRUB_DIR)/$(TARGET)
$(VERBOSE) $(GRUB_MKIMAGE) --format i386-pc-eltorito -c $(GRUB_CONFIG) -p /boot/grub -o grub/boot.img $(GRUB_MODULES)
$(VERBOSE) $(XORRISO) -as mkisofs -U -b boot.img -no-emul-boot -boot-load-size 4 -boot-info-table -o $(ISO_FILE) grub 2>> /dev/null
endif
Expand Down
3 changes: 2 additions & 1 deletion grub/boot/grub/grub.cfg
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
set timeout=0
set default=0

serial --speed=115200 --word=8 --parity=no --stop=1
terminal_input --append serial
terminal_output --append serial

menuentry "kernel64" {
multiboot /boot/kernel64.bin poweroff=1 com1=0x3f8,115200,8,n,1
multiboot /boot/kernel64.bin.xz poweroff=1 com1=0x3f8,115200,8,n,1
boot
}

0 comments on commit 30e6da1

Please sign in to comment.