Commit 8588e951 authored by Paul Mackerras's avatar Paul Mackerras

PPC32: Fixes for the Makefiles under arch/ppc/boot.

With these changes the boot wrapper successfully builds,
although this may not be the absolute best way to do things.
parent dfef2a7e
......@@ -65,6 +65,8 @@ makeboot = $(call descend,arch/ppc/boot,$(1))
BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd pImage vmlinux.sm
.PHONY: $(BOOT_TARGETS) clean archclean archmrproper
AFLAGS_vmlinux.lds.o := -Upowerpc
# All the instructions talk about "make bzImage".
......@@ -78,7 +80,7 @@ $(BOOT_TARGETS): vmlinux
cp -f arch/ppc/configs/$(@:config=defconfig) .config
archclean:
+@$(call makeboot,clean)
$(MAKE) -f scripts/Makefile.clean obj=arch/ppc/boot
archmrproper:
......
......@@ -15,8 +15,12 @@ CFLAGS += -fno-builtin -D__BOOTER__ -I$(TOPDIR)/arch/$(ARCH)/boot/include
AFLAGS += -D__BOOTER__
OBJCOPY_ARGS = -O elf32-powerpc
subdir-y := simple
subdir-$(CONFIG_ALL_PPC) := openfirmware prep
bootdir-y := simple
bootdir-$(CONFIG_ALL_PPC) := openfirmware prep
# for cleaning...
subdir- := images simple openfirmware prep \
lib common of1275
HOSTCFLAGS += -Iarch/$(ARCH)/boot/include
......@@ -35,20 +39,15 @@ all-tools := addnote mknote hack-coff mkprep mkbugboot mktree
host-progs := $(addprefix utils/,$(tools-y))
include $(TOPDIR)/Rules.make
zImage zImage.initrd znetboot znetboot.initrd: $(subdir-y)
simple openfirmware prep: lib common images
openfirmware prep: of1275
zImage zImage.initrd znetboot znetboot.initrd: $(addprefix $(obj)/,$(bootdir-y))
lib common of1275 images: FORCE
+@$(call descend,$(obj)/$@,)
.PHONY: FORCE
openfirmware prep simple: FORCE
+@$(call descend,$(obj)/$@,$(MAKECMDGOALS))
$(obj)/simple $(obj)/openfirmware $(obj)/prep: $(obj)/lib $(obj)/common $(obj)/images
$(obj)/openfirmware $(obj)/prep: $(obj)/of1275
CLEAN_FILES += $(addprefix $(obj)/utils,$(all-tools))
$(obj)/lib $(obj)/common $(obj)/of1275 $(obj)/images: FORCE
+@$(call descend,$@,)
clean: FORCE
+@$(call descend,$(obj)/images,clean)
$(obj)/openfirmware $(obj)/prep $(obj)/simple: FORCE
+@$(call descend,$@,$(MAKECMDGOALS))
......@@ -2,15 +2,13 @@
# This dir holds all of the images for PPC machines.
# Tom Rini January 2001
all: $(obj)/vmlinux.gz
include $(TOPDIR)/Rules.make
EXTRA_TARGETS := vmlinux.gz
GZIP_FLAGS = -v9f
$(obj)/vmlinux.gz: vmlinux
$(OBJCOPY) -S -O binary vmlinux $(obj)/vmlinux
gzip $(GZIP_FLAGS) $(obj)/vmlinux
$(OBJCOPY) -O binary $< $(@:.gz=)
gzip $(GZIP_FLAGS) $(@:.gz=)
clean:
rm -f $(obj)/sImage $(obj)/vmapus $(obj)/vmlinux* $(obj)/miboot*
......
......@@ -26,6 +26,12 @@
boot: zImage
boot := arch/ppc/boot
common := $(boot)/common
utils := $(boot)/utils
bootlib := $(boot)/lib
images := $(boot)/images
# Normally, we use the 'misc.c' file for decompress_kernel and
# whatnot. Sometimes we need to override this however.
MISC := misc.o
......@@ -161,17 +167,9 @@ boot-$(CONFIG_8260) += m8260_tty.o
boot-$(CONFIG_GT64260_CONSOLE) += gt64260_tty.o
endif
boot := arch/ppc/boot
common := $(boot)/common
utils := $(boot)/utils
bootlib := $(boot)/lib
images := $(boot)/images
EXTRA_TARGETS := $(boot-y)
LIBS := $(common)/lib.a $(bootlib)/lib.a
include $(TOPDIR)/Rules.make
OBJS := $(addprefix $(obj)/,$(boot-y))
# Tools
......
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