Commit a94674e2 authored by Kai Germaschewski's avatar Kai Germaschewski

kbuild: clean up arch/i386/boot, part 3

Unify zImage and bzImage generation.
parent 421e2a9b
...@@ -34,23 +34,20 @@ include $(TOPDIR)/Rules.make ...@@ -34,23 +34,20 @@ include $(TOPDIR)/Rules.make
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
zImage: bootsect setup vmlinux.bin tools/build zImage: IMAGE_OFFSET := 0x1000
tools/build bootsect setup vmlinux.bin $(ROOT_DEV) > $@ zImage: EXTRA_AFLAGS := -traditional $(SVGA_MODE) $(RAMDISK)
bzImage: IMAGE_OFFSET := 0x100000
bzImage: EXTRA_AFLAGS := -traditional $(SVGA_MODE) $(RAMDISK) -D__BIG_KERNEL__
bzImage: BUILDFLAGS := -b
bzImage: bbootsect bsetup bvmlinux.bin tools/build zImage bzImage: bootsect setup vmlinux.bin tools/build
tools/build -b bbootsect bsetup bvmlinux.bin $(ROOT_DEV) > $@ tools/build $(BUILDFLAGS) bootsect setup vmlinux.bin $(ROOT_DEV) > $@
vmlinux.bin: compressed/vmlinux FORCE vmlinux.bin: compressed/vmlinux FORCE
$(call if_changed,objcopy) $(call if_changed,objcopy)
bvmlinux.bin: compressed/bvmlinux FORCE
$(call if_changed,objcopy)
compressed/vmlinux: FORCE compressed/vmlinux: FORCE
@$(MAKE) -C compressed vmlinux @$(MAKE) IMAGE_OFFSET=$(IMAGE_OFFSET) -C compressed vmlinux
compressed/bvmlinux: FORCE
@$(MAKE) -C compressed bvmlinux
zdisk: $(BOOTIMAGE) zdisk: $(BOOTIMAGE)
dd bs=8192 if=$(BOOTIMAGE) of=/dev/fd0 dd bs=8192 if=$(BOOTIMAGE) of=/dev/fd0
...@@ -65,25 +62,12 @@ zlilo: $(BOOTIMAGE) ...@@ -65,25 +62,12 @@ zlilo: $(BOOTIMAGE)
install: $(BOOTIMAGE) install: $(BOOTIMAGE)
sh -x ./install.sh $(KERNELRELEASE) $(BOOTIMAGE) $(TOPDIR)/System.map "$(INSTALL_PATH)" sh -x ./install.sh $(KERNELRELEASE) $(BOOTIMAGE) $(TOPDIR)/System.map "$(INSTALL_PATH)"
EXTRA_AFLAGS := -traditional $(SVGA_MODE) $(RAMDISK)
AFLAGS_bbootsect.o := -D__BIG_KERNEL__
AFLAGS_bsetup.o := -D__BIG_KERNEL__
bootsect: bootsect.o bootsect: bootsect.o
$(LD) $(LDFLAGS) -Ttext 0x0 -s --oformat binary -o $@ $< $(LD) $(LDFLAGS) -Ttext 0x0 -s --oformat binary -o $@ $<
bbootsect: bbootsect.o
$(LD) $(LDFLAGS) -Ttext 0x0 -s --oformat binary $< -o $@
setup: setup.o setup: setup.o
$(LD) $(LDFLAGS) -Ttext 0x0 -s --oformat binary -e begtext -o $@ $< $(LD) $(LDFLAGS) -Ttext 0x0 -s --oformat binary -e begtext -o $@ $<
bsetup: bsetup.o
$(LD) $(LDFLAGS) -Ttext 0x0 -s --oformat binary -e begtext -o $@ $<
b%.S: %.S
cp $< $@
clean: clean:
@echo 'Cleaning up (boot)' @echo 'Cleaning up (boot)'
@rm -f tools/build @rm -f tools/build
......
...@@ -8,28 +8,18 @@ HEAD = head.o ...@@ -8,28 +8,18 @@ HEAD = head.o
OBJECTS = $(HEAD) misc.o OBJECTS = $(HEAD) misc.o
ZLDFLAGS = -e startup_32
# #
# ZIMAGE_OFFSET is the load offset of the compression loader # ZIMAGE_OFFSET is the load offset of the compression loader
# BZIMAGE_OFFSET is the load offset of the high loaded compression loader # BZIMAGE_OFFSET is the load offset of the high loaded compression loader
# #
ZIMAGE_OFFSET = 0x1000
BZIMAGE_OFFSET = 0x100000
ZLINKFLAGS = -Ttext $(ZIMAGE_OFFSET) $(ZLDFLAGS)
BZLINKFLAGS = -Ttext $(BZIMAGE_OFFSET) $(ZLDFLAGS)
EXTRA_TARGETS := vmlinux.bin vmlinux.bin.gz head.o misc.o EXTRA_TARGETS := vmlinux.bin vmlinux.bin.gz head.o misc.o
LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup_32
EXTRA_AFLAGS := -traditional EXTRA_AFLAGS := -traditional
include $(TOPDIR)/Rules.make include $(TOPDIR)/Rules.make
vmlinux: piggy.o $(OBJECTS) vmlinux: piggy.o $(OBJECTS)
$(LD) $(LDFLAGS) $(ZLINKFLAGS) -o vmlinux $(OBJECTS) piggy.o $(LD) $(LDFLAGS) $(LDFLAGS_$@) -o vmlinux $(OBJECTS) piggy.o
bvmlinux: piggy.o $(OBJECTS)
$(LD) $(LDFLAGS) $(BZLINKFLAGS) -o bvmlinux $(OBJECTS) piggy.o
vmlinux.bin: $(TOPDIR)/vmlinux FORCE vmlinux.bin: $(TOPDIR)/vmlinux FORCE
$(call if_changed,objcopy) $(call if_changed,objcopy)
......
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