[RFC] addnote and pmac

Geoff Levand geoffrey.levand at am.sony.com
Tue Aug 9 04:27:36 EST 2005


I found that my Mac G5 wouldn't boot with a zImage modified by 
addnote.  It worked OK when the image wasn't run through addnote 
though.  I took just a brief look at addnote.c, and it seems this 
step is specific to the OF implementation, or could it be needed 
by older tool chains?

At any rate, by default it is run for all zImage builds, which 
we'll need to change to support at least some machines.  Below is 
what I got working, but someone more familiar with the boot 
makefile and the needs of other machines could certainly do 
better.

-Geoff


Index: dev-2-6-12/arch/ppc64/boot/Makefile
===================================================================
--- dev-2-6-12.orig/arch/ppc64/boot/Makefile	2005-08-08 10:43:43.000000000 -0700
+++ dev-2-6-12/arch/ppc64/boot/Makefile	2005-08-08 10:45:51.000000000 -0700
@@ -75,8 +75,12 @@
 		--add-section=.kernel:$(strip $(patsubst $(obj)/kernel-%.o,%, $(1)))=$(patsubst %.o,%.gz, $(1)) \
 		--set-section-flags=.kernel:$(strip $(patsubst $(obj)/kernel-%.o,%, $(1)))=$(OBJCOPYFLAGS)
 
-quiet_cmd_addnote = ADDNOTE $@ 
-      cmd_addnote = $(CROSS32LD) $(BOOTLFLAGS) -o $@ $(obj-boot) && $(obj)/addnote $@
+ifeq ($(CONFIG_PPC_ISERIES),y)
+	addnote_cmd := $(call if_changed,addnote)
+endif
+
+quiet_cmd_addnote = ADDNOTE $@
+      cmd_addnote = $(obj)/addnote $@
 
 quiet_cmd_piggy = PIGGY   $@
       cmd_piggy = $(obj)/piggyback $(@:.o=) < $< | $(CROSS32AS) -o $@
@@ -96,11 +100,12 @@
 
 $(obj)/zImage: obj-boot += $(call obj-sec, $(required))
 $(obj)/zImage: $(call obj-sec, $(required)) $(obj-boot) $(obj)/addnote FORCE
-	$(call if_changed,addnote)
+	$(CROSS32LD) $(BOOTLFLAGS) -o $@ $(obj-boot)
+	$(addnote_cmd)
 
 $(obj)/zImage.initrd: obj-boot += $(call obj-sec, $(required) $(initrd))
 $(obj)/zImage.initrd: $(call obj-sec, $(required) $(initrd)) $(obj-boot) $(obj)/addnote FORCE
-	$(call if_changed,addnote)
+	$(addnote_cmd)
 
 $(obj)/imagesize.c: vmlinux.strip
 	@echo Generating $@

-EOF




More information about the Linuxppc64-dev mailing list