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