--- zzzz-none-000/linux-2.6.39.4/arch/arm/boot/compressed/Makefile 2011-08-03 19:43:28.000000000 +0000 +++ puma6-atom-6490-729/linux-2.6.39.4/arch/arm/boot/compressed/Makefile 2021-11-10 13:38:14.000000000 +0000 @@ -17,9 +17,17 @@ AFLAGS_head.o += -DTEXT_OFFSET=$(TEXT_OFFSET) HEAD = head.o + +ifeq ($(CONFIG_KERNEL_COMPRESS_7ZIP),y) +OBJS += Decoder.o +else OBJS += misc.o decompress.o +endif + FONTC = $(srctree)/drivers/video/console/font_acorn_8x8.c +FONT = $(addprefix ../../../../drivers/video/console/, font_acorn_8x8.o) + # # Architecture dependencies # @@ -31,6 +39,14 @@ OBJS += head-shark.o ofw-shark.o endif +ifeq ($(CONFIG_ARCH_L7200),y) +OBJS += head-l7200.o +endif + +ifeq ($(CONFIG_ARCH_CLPS7500),y) +HEAD = head-clps7500.o +endif + ifeq ($(CONFIG_ARCH_P720T),y) # Borrow this code from SA1100 OBJS += head-sa1100.o @@ -51,6 +67,13 @@ ifeq ($(CONFIG_PXA_SHARPSL_DETECT_MACH_ID),y) OBJS += head-sharpsl.o endif +ifeq ($(CONFIG_ARCH_AT91RM9200),y) +OBJS += head-at91rm9200.o +endif + +ifeq ($(CONFIG_MACH_OMAP_PERSEUS2),y) +OBJS += head-omap.o +endif ifeq ($(CONFIG_CPU_ENDIAN_BE32),y) ifeq ($(CONFIG_CPU_CP15),y) @@ -74,7 +97,7 @@ ZBSSADDR := $(CONFIG_ZBOOT_ROM_BSS) else ZTEXTADDR := 0 -ZBSSADDR := ALIGN(8) +ZBSSADDR := ALIGN(4) endif SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/ @@ -83,9 +106,16 @@ suffix_$(CONFIG_KERNEL_LZO) = lzo suffix_$(CONFIG_KERNEL_LZMA) = lzma -targets := vmlinux vmlinux.lds \ - piggy.$(suffix_y) piggy.$(suffix_y).o \ - font.o font.c head.o misc.o $(OBJS) +ifdef ($(CONFIG_KERNEL_COMPRESS_7ZIP),y) +targets := vmlinux vmlinux.lds piggy.gz piggy.o $(FONT) \ + head.o Decoder.o $(OBJS) +else +targets := vmlinux vmlinux.lds piggy.gz piggy.o $(FONT) \ + head.o misc.o $(OBJS) +endif +EXTRA_CFLAGS := -fpic +EXTRA_AFLAGS := + # Make sure files are removed during clean extra-y += piggy.gzip piggy.lzo piggy.lzma lib1funcs.S @@ -100,6 +130,17 @@ # Provide size of uncompressed kernel to the decompressor via a linker symbol. LDFLAGS_vmlinux = --defsym _image_size=$(shell stat -c "%s" $(obj)/../Image) +ifneq ($(PARAMS_PHYS),) +LDFLAGS_vmlinux += --defsym params_phys=$(PARAMS_PHYS) +endif +# Don't allow any static data in misc.o, which +# would otherwise mess up our GOT table +#CFLAGS_Decoder.o := -Dstatic= +# Don't allow any static data in misc.o, which +# would otherwise mess up our GOT table +#CFLAGS_misc.o := -Dstatic= + + # Supply ZRELADDR to the decompressor via a linker symbol. ifneq ($(CONFIG_AUTO_ZRELADDR),y) LDFLAGS_vmlinux += --defsym zreladdr=$(ZRELADDR) @@ -117,7 +158,7 @@ LDFLAGS_vmlinux += -T # For __aeabi_uidivmod -lib1funcs = $(obj)/lib1funcs.o +#lib1funcs = $(obj)/lib1funcs.o $(obj)/lib1funcs.S: $(srctree)/arch/$(SRCARCH)/lib/lib1funcs.S FORCE $(call cmd,shipped) @@ -127,15 +168,24 @@ $(call if_changed,ld) @: +ifneq ($(CONFIG_KERNEL_COMPRESS_7ZIP),y) $(obj)/piggy.$(suffix_y): $(obj)/../Image FORCE $(call if_changed,$(suffix_y)) +else +#$(obj)/piggy.gz: FORCE +$(obj)/piggy.$(suffix_y): FORCE + + lzmp -c $(obj)/../Image > $(obj)/piggy.$(suffix_y) +endif + $(obj)/piggy.$(suffix_y).o: $(obj)/piggy.$(suffix_y) FORCE CFLAGS_font.o := -Dstatic= +$(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in arch/arm/boot/Makefile $(KCONFIG_CONFIG) + @sed "$(SEDFLAGS)" < $< > $@ + $(obj)/font.c: $(FONTC) $(call cmd,shipped) -$(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in arch/arm/boot/Makefile $(KCONFIG_CONFIG) - @sed "$(SEDFLAGS)" < $< > $@