Commit cb0622bc authored by Russell King's avatar Russell King

[ARM] Move ZTEXTADDR/ZBSSADDR initialisation to compressed/Makefile

Since this is where these two variables are used, it makes sense to
have them in that makefile.  Also, consolidate "targets"
initialisation, fixes a missing FORCE dependency for the uImage rule,
and remove more FTVPCI code.
parent 2e8ff6b5
...@@ -64,25 +64,12 @@ params_phys-$(CONFIG_ARCH_VERSATILE_PB) := 0x00000100 ...@@ -64,25 +64,12 @@ params_phys-$(CONFIG_ARCH_VERSATILE_PB) := 0x00000100
initrd_phys-$(CONFIG_ARCH_VERSATILE_PB) := 0x00800000 initrd_phys-$(CONFIG_ARCH_VERSATILE_PB) := 0x00800000
ZRELADDR := $(zreladdr-y) ZRELADDR := $(zreladdr-y)
ZTEXTADDR := $(ztextaddr-y)
PARAMS_PHYS := $(params_phys-y) PARAMS_PHYS := $(params_phys-y)
INITRD_PHYS := $(initrd_phys-y) INITRD_PHYS := $(initrd_phys-y)
#
# We now have a PIC decompressor implementation. Decompressors running
# from RAM should not define ZTEXTADDR. Decompressors running directly
# from ROM or Flash must define ZTEXTADDR (preferably via the config)
# FIXME: Previous assignment to ztextaddr-y is lost here. See SHARK
ifeq ($(CONFIG_ZBOOT_ROM),y)
ZTEXTADDR := $(CONFIG_ZBOOT_ROM_TEXT)
ZBSSADDR := $(CONFIG_ZBOOT_ROM_BSS)
else
ZTEXTADDR := 0
ZBSSADDR := ALIGN(4)
endif
export ZTEXTADDR ZBSSADDR ZRELADDR INITRD_PHYS PARAMS_PHYS export ZRELADDR INITRD_PHYS PARAMS_PHYS
targets := Image zImage bootpImage targets := Image zImage bootpImage uImage
$(obj)/Image: vmlinux FORCE $(obj)/Image: vmlinux FORCE
$(call if_changed,objcopy) $(call if_changed,objcopy)
...@@ -97,8 +84,7 @@ quiet_cmd_uimage = UIMAGE $@ ...@@ -97,8 +84,7 @@ quiet_cmd_uimage = UIMAGE $@
-C none -a $(ZRELADDR) -e $(ZRELADDR) \ -C none -a $(ZRELADDR) -e $(ZRELADDR) \
-n 'Linux-$(KERNELRELEASE)' -d $< $@ -n 'Linux-$(KERNELRELEASE)' -d $< $@
targets += uImage $(obj)/uImage: $(obj)/zImage FORCE
$(obj)/uImage: $(obj)/zImage
$(call if_changed,uimage) $(call if_changed,uimage)
@echo ' Image $@ is ready' @echo ' Image $@ is ready'
......
...@@ -3,9 +3,6 @@ ...@@ -3,9 +3,6 @@
# #
# create a compressed vmlinuz image from the original vmlinux # create a compressed vmlinuz image from the original vmlinux
# #
# Note! ZTEXTADDR, ZBSSADDR and ZRELADDR are now exported
# from arch/arm/boot/Makefile
#
HEAD = head.o HEAD = head.o
OBJS = misc.o OBJS = misc.o
...@@ -27,10 +24,6 @@ ifeq ($(CONFIG_ARCH_CAMELOT),y) ...@@ -27,10 +24,6 @@ ifeq ($(CONFIG_ARCH_CAMELOT),y)
OBJS += head-epxa10db.o OBJS += head-epxa10db.o
endif endif
ifeq ($(CONFIG_ARCH_FTVPCI),y)
OBJS += head-ftvpci.o
endif
ifeq ($(CONFIG_ARCH_L7200),y) ifeq ($(CONFIG_ARCH_L7200),y)
OBJS += head-l7200.o OBJS += head-l7200.o
endif endif
...@@ -59,6 +52,19 @@ ifeq ($(CONFIG_DEBUG_ICEDCC),y) ...@@ -59,6 +52,19 @@ ifeq ($(CONFIG_DEBUG_ICEDCC),y)
OBJS += ice-dcc.o OBJS += ice-dcc.o
endif endif
#
# We now have a PIC decompressor implementation. Decompressors running
# from RAM should not define ZTEXTADDR. Decompressors running directly
# from ROM or Flash must define ZTEXTADDR (preferably via the config)
# FIXME: Previous assignment to ztextaddr-y is lost here. See SHARK
ifeq ($(CONFIG_ZBOOT_ROM),y)
ZTEXTADDR := $(CONFIG_ZBOOT_ROM_TEXT)
ZBSSADDR := $(CONFIG_ZBOOT_ROM_BSS)
else
ZTEXTADDR := 0
ZBSSADDR := ALIGN(4)
endif
SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/LOAD_ADDR/$(ZRELADDR)/;s/BSS_START/$(ZBSSADDR)/ SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/LOAD_ADDR/$(ZRELADDR)/;s/BSS_START/$(ZBSSADDR)/
targets := vmlinux vmlinux.lds piggy piggy.gz piggy.o \ targets := vmlinux vmlinux.lds piggy piggy.gz piggy.o \
......
/*
* linux/arch/arm/boot/compressed/head-ftvpci.S
*
* Copyright (C) 2000 FutureTV Labs Ltd.
*
* Special startup code for FTV PCI board.
*/
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
.section ".start", "ax"
ftv_start:
mcr p15, 0, r0, c7, c5, 0 @ flush I cache
mrc p15, 0, r0, c1, c0
orr r0, r0, #1 << 12
mcr p15, 0, r0, c1, c0 @ enable I cache
mov r0, #0
mcreq p15, 0, r0, c15, c1, 2 @ enable clock switching
/* check to see if the kernel must be relocated */
ldr ip, =ftv_start
adr sl, ftv_start
teq ip, sl
beq 2f @ no need to copy
/* in the wrong place -> presumably, executing out of ROM */
sub ip, ip, sl @ displacement
ldr lr, =_start @ destination
sub sp, lr, ip @ source
ldr fp, =_edata @ end of copied area
1: ldmia sp!, {r0, r1, r2, r3, r4, r5, r6, r10}
stmia lr!, {r0, r1, r2, r3, r4, r5, r6, r10}
cmp lr, fp
ble 1b
2:
mov r8, #0
mov r7, #3
b 1f
.ltorg
1:
/* fall back into head.S */
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