Commit d4930da8 authored by Sam Ravnborg's avatar Sam Ravnborg Committed by Kai Germaschewski

kbuild/x86_64: archhelp, $(build) usage and cleaning

Moved archhelp to arch/x86_64/Makefile
Introduced usage of $(build) and $(clean)
Use kbuild clean infrastructure
parent 95fa3d76
......@@ -57,32 +57,30 @@ drivers-$(CONFIG_PCI) += arch/x86_64/pci/
# FIXME: is drivers- right ?
drivers-$(CONFIG_OPROFILE) += arch/x86_64/oprofile/
makeboot =$(Q)$(MAKE) -f scripts/Makefile.build obj=arch/x86_64/boot $(1)
boot := arch/x86_64/boot
.PHONY: zImage bzImage compressed zlilo bzlilo zdisk bzdisk install \
clean archclean archmrproper
archclean
BOOTIMAGE=arch/x86_64/boot/bzImage
zImage zlilo zdisk: BOOTIMAGE=arch/x86_64/boot/zImage
zImage bzImage: vmlinux
$(call makeboot,$(BOOTIMAGE))
$(Q)$(MAKE) $(build)=$(boot) $(BOOTIMAGE)
compressed: zImage
zlilo bzlilo: vmlinux
$(call makeboot,BOOTIMAGE=$(BOOTIMAGE) zlilo)
$(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) zlilo
zdisk bzdisk: vmlinux
$(call makeboot,BOOTIMAGE=$(BOOTIMAGE) zdisk)
$(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) zdisk
install: vmlinux
$(call makeboot,BOOTIMAGE=$(BOOTIMAGE) install)
$(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) install
archclean:
$(call makeboot,clean)
archmrproper:
$(Q)$(MAKE) $(clean)=$(boot)
prepare: include/asm-$(ARCH)/offset.h
......@@ -97,4 +95,12 @@ include/asm-$(ARCH)/offset.h: include/asm-$(ARCH)/offset.h.tmp
@$(update-if-changed)
CLEAN_FILES += include/asm-$(ARCH)/offset.h.tmp \
include/asm-$(ARCH)/offset.h
\ No newline at end of file
include/asm-$(ARCH)/offset.h
define archhelp
echo '* bzImage - Compressed kernel image (arch/$(ARCH)/boot/bzImage)'
echo ' install - Install kernel using'
echo ' (your) ~/bin/installkernel or'
echo ' (distribution) /sbin/installkernel or'
echo ' install to $$(INSTALL_PATH) and run lilo'
endef
......@@ -31,7 +31,7 @@ EXTRA_TARGETS := vmlinux.bin bootsect bootsect.o \
CFLAGS += -m32
host-progs := tools/build
subdir- := compressed #Let make clean descend in compressed/
# ---------------------------------------------------------------------------
$(obj)/zImage: IMAGE_OFFSET := 0x1000
......@@ -59,8 +59,7 @@ $(obj)/setup $(obj)/bootsect: %: %.o FORCE
$(call if_changed,ld)
$(obj)/compressed/vmlinux: FORCE
$(Q)$(MAKE) -f scripts/Makefile.build obj=$(obj)/compressed \
IMAGE_OFFSET=$(IMAGE_OFFSET) $@
$(Q)$(MAKE) $(build)=$(obj)/compressed IMAGE_OFFSET=$(IMAGE_OFFSET) $@
zdisk: $(BOOTIMAGE)
dd bs=8192 if=$(BOOTIMAGE) of=/dev/fd0
......@@ -74,16 +73,3 @@ zlilo: $(BOOTIMAGE)
install: $(BOOTIMAGE)
sh $(src)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)"
clean:
@echo 'Cleaning up (boot)'
@rm -f $(host-progs) $(EXTRA_TARGETS)
+@$(call descend,$(obj)/compressed) clean
archhelp:
@echo '* bzImage - Compressed kernel image (arch/$(ARCH)/boot/bzImage)'
@echo ' install - Install kernel using'
@echo ' (your) ~/bin/installkernel or'
@echo ' (distribution) /sbin/installkernel or'
@echo ' install to $$(INSTALL_PATH) and run lilo'
......@@ -30,7 +30,3 @@ LDFLAGS_piggy.o := -r --format binary --oformat elf32-i386 -T
$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.gz FORCE
$(call if_changed,ld)
clean:
@echo 'Cleaning up (boot/compressed)'
@rm -f $(EXTRA_TARGETS)
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