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
# ---------------------------------------------------------------------------
zImage: bootsect setup vmlinux.bin tools/build
tools/build bootsect setup vmlinux.bin $(ROOT_DEV) > $@
zImage: IMAGE_OFFSET := 0x1000
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
tools/build -b bbootsect bsetup bvmlinux.bin $(ROOT_DEV) > $@
zImage bzImage: bootsect setup vmlinux.bin tools/build
tools/build $(BUILDFLAGS) bootsect setup vmlinux.bin $(ROOT_DEV) > $@
vmlinux.bin: compressed/vmlinux FORCE
$(call if_changed,objcopy)
bvmlinux.bin: compressed/bvmlinux FORCE
$(call if_changed,objcopy)
compressed/vmlinux: FORCE
@$(MAKE) -C compressed vmlinux
compressed/bvmlinux: FORCE
@$(MAKE) -C compressed bvmlinux
@$(MAKE) IMAGE_OFFSET=$(IMAGE_OFFSET) -C compressed vmlinux
zdisk: $(BOOTIMAGE)
dd bs=8192 if=$(BOOTIMAGE) of=/dev/fd0
......@@ -65,25 +62,12 @@ zlilo: $(BOOTIMAGE)
install: $(BOOTIMAGE)
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
$(LD) $(LDFLAGS) -Ttext 0x0 -s --oformat binary -o $@ $<
bbootsect: bbootsect.o
$(LD) $(LDFLAGS) -Ttext 0x0 -s --oformat binary $< -o $@
setup: setup.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:
@echo 'Cleaning up (boot)'
@rm -f tools/build
......
......@@ -8,28 +8,18 @@ HEAD = head.o
OBJECTS = $(HEAD) misc.o
ZLDFLAGS = -e startup_32
#
# ZIMAGE_OFFSET is the load offset of the 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
LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup_32
EXTRA_AFLAGS := -traditional
include $(TOPDIR)/Rules.make
vmlinux: piggy.o $(OBJECTS)
$(LD) $(LDFLAGS) $(ZLINKFLAGS) -o vmlinux $(OBJECTS) piggy.o
bvmlinux: piggy.o $(OBJECTS)
$(LD) $(LDFLAGS) $(BZLINKFLAGS) -o bvmlinux $(OBJECTS) piggy.o
$(LD) $(LDFLAGS) $(LDFLAGS_$@) -o vmlinux $(OBJECTS) piggy.o
vmlinux.bin: $(TOPDIR)/vmlinux FORCE
$(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