RE: [PATCH 2.6.20 7/14] CRIS architecture update - Boot
+ * In practice, this only works for NOR flash (or some convoluted RAM boot) + * and hence is not really useful for Artpec-3, so it's Etrax FS / NOR only. + * */ -#include -#include +#include + +;; Code .text +start: ;; Start clocks for used blocks. - move.d REG_ADDR(config, regi_config, rw_clk_ctrl), $r1 - move.d [$r1], $r0 - or.d REG_STATE(config, rw_clk_ctrl, cpu, yes) | \ - REG_STATE(config, rw_clk_ctrl, bif, yes) | \ - REG_STATE(config, rw_clk_ctrl, fix_io, yes), $r0 - move.d $r0, [$r1] + START_CLOCKS - ;; Copy 68KB NAND flash to Internal RAM (if NAND boot) - move.d 0x38004000, $r10 - move.d 0x8000, $r11 - move.d 0x11000, $r12 - move.d copy_complete, $r13 - and.d 0x000f, $r13 - or.d 0x3800, $r13 - -#include "../../lib/nand_init.S" - - ;; No NAND found move.d CONFIG_ETRAX_PTABLE_SECTOR, $r10 - jump$r10 ; Jump to decompresser - nop - -copy_complete: - move.d 0x3800 + CONFIG_ETRAX_PTABLE_SECTOR, $r10 - jump$r10 ; Jump to decompresser + jump$r10; Jump to decompresser nop diff -urNP --exclude='*.cvsignore' ../linux/arch/cris/arch-v32/boot/rescue/Makefile linux-2.6/arch/cris/arch-v32/boot/rescue/Makefile --- ../linux/arch/cris/arch-v32/boot/rescue/Makefile2007-02-04 19:44:54.0 +0100 +++ linux-2.6/arch/cris/arch-v32/boot/rescue/Makefile 2007-04-12 10:17:58.0 +0200 @@ -1,36 +1,27 @@ # -# Makefile for rescue code +# Makefile for rescue (bootstrap) code # -target = $(target_rescue_dir) -src= $(src_rescue_dir) CC = gcc-cris -mlinux -march=v32 $(LINUXINCLUDE) CFLAGS = -O2 -LD = gcc-cris -mlinux -march=v32 -nostdlib +AFLAGS += -I $(TOPDIR)/include/asm/arch/mach/ -I $(TOPDIR)/include/asm/arch +CFLAGS += -I $(TOPDIR)/include/asm/arch/mach/ -I $(TOPDIR)/include/asm/arch +LD = gcc-cris -mlinux -march=v32 -nostdlib +LDFLAGS = -T $(obj)/rescue.ld +LDPOSTFLAGS = -lgcc OBJCOPY = objcopy-cris OBJCOPYFLAGS = -O binary --remove-section=.bss +obj-y = head.o +OBJECTS = $(obj)/head.o -all: $(target)/rescue.bin +targets := rescue.o rescue.bin -rescue: rescue.bin - # do nothing +quiet_cmd_ldlibgcc = LD $@ +cmd_ldlibgcc = $(LD) $(LDFLAGS) $(filter-out FORCE,$^) $(LDPOSTFLAGS) -o $@ -$(target)/rescue.bin: $(target) $(target)/head.o - $(LD) -T $(src)/rescue.ld -o $(target)/rescue.o $(target)/head.o - $(OBJCOPY) $(OBJCOPYFLAGS) $(target)/rescue.o $(target)/rescue.bin - cp -p $(target)/rescue.bin $(objtree) +$(obj)/rescue.o: $(OBJECTS) FORCE + $(call if_changed,ldlibgcc) -$(target): - mkdir -p $(target) - -$(target)/head.o: $(src)/head.S - $(CC) -D__ASSEMBLY__ -c $< -o $*.o - -clean: - rm -f $(target)/*.o $(target)/*.bin - -fastdep: - -modules: - -modules-install: +$(obj)/rescue.bin: $(obj)/rescue.o FORCE + $(call if_changed,objcopy) + cp -p $(obj)/rescue.bin $(objtree) diff -urNP --exclude='*.cvsignore' ../linux/arch/cris/arch-v32/boot/rescue/rescue.ld linux-2.6/arch/cris/arch-v32/boot/rescue/rescue.ld --- ../linux/arch/cris/arch-v32/boot/rescue/rescue.ld 2007-02-04 19:44:54.0 +0100 +++ linux-2.6/arch/cris/arch-v32/boot/rescue/rescue.ld 2007-04-12 10:17:58.0 +0200 @@ -1,20 +1,43 @@ -MEMORY +/*#OUTPUT_FORMAT(elf32-us-cris) */ +OUTPUT_ARCH (crisv32) +/* Now that NAND support has been stripped, this file could be simplified, + * but it doesn't do any harm on the other hand so why bother. */ + +MEMORY { - flash : ORIGIN = 0x, - LENGTH = 0x0010 + bootblk : ORIGIN = 0x3800, + LENGTH = 0x4000 + intmem : ORIGIN = 0x38004000, + LENGTH = 0x5000 } SECTIONS { .text : { - stext = . ; + _stext = . ; *(.text) - etext = . ; - } > flash + *(.init.text) + *(.rodata) + *(.rodata.*) + _etext = . ; + } > bootblk .data : { *(.data) - edata = . ; - } > flash + _edata = . ; + } > bootblk + .bss : + { + _bss = . ; + *(.bss) + _end = ALIGN( 0x10 ) ; + } > intmem + + /* Get rid of stuff from EXPORT_SYMBOL(foo). */ + /DISCARD/ : + { + *(__ksymtab_strings) + *(__ksymtab) + } } -Original Message- From: Sam Ravnborg [mailto:[EMAIL PROTECTED] Sent: Sunday, April 22, 2007 9:45 PM To: Mikael Starvik Cc: linux-kernel@vger.kernel.org; [EMAIL PROTECTED] Subject: Re: [PATCH 2.6.20 7/14] CRIS architecture update - Boot On Sun, Apr 22, 2007 at 09:25:23PM +0200, Mikael Starvik wrote: > The attached patch relates to CRIS kernel booting (decompre
RE: [PATCH 2.6.20 7/14] CRIS architecture update - Boot
= . ; + } bootblk + .bss : + { + _bss = . ; + *(.bss) + _end = ALIGN( 0x10 ) ; + } intmem + + /* Get rid of stuff from EXPORT_SYMBOL(foo). */ + /DISCARD/ : + { + *(__ksymtab_strings) + *(__ksymtab) + } } -Original Message- From: Sam Ravnborg [mailto:[EMAIL PROTECTED] Sent: Sunday, April 22, 2007 9:45 PM To: Mikael Starvik Cc: linux-kernel@vger.kernel.org; [EMAIL PROTECTED] Subject: Re: [PATCH 2.6.20 7/14] CRIS architecture update - Boot On Sun, Apr 22, 2007 at 09:25:23PM +0200, Mikael Starvik wrote: The attached patch relates to CRIS kernel booting (decompresser etc) --- ../linux/arch/cris/arch-v32/boot/compressed/Makefile2007-02-04 19:44:54.0 +0100 +++ linux-2.6/arch/cris/arch-v32/boot/compressed/Makefile 2007-02-13 12:55:23.0 +0100 @@ -1,41 +1,30 @@ # -# lx25/arch/cris/arch-v32/boot/compressed/Makefile +# arch/cris/arch-v32/boot/compressed/Makefile # -# create a compressed vmlinux image from the original vmlinux files and romfs -# - -target = $(target_compressed_dir) -src= $(src_compressed_dir) -CC = gcc-cris -mlinux -march=v32 -I $(TOPDIR)/include -CFLAGS = -O2 +CC = gcc-cris -mlinux -march=v32 -I $(TOPDIR)/include +AFLAGS += -I $(TOPDIR)/include/asm/mach/ -I $(TOPDIR)/include/asm/arch +CFLAGS += -O2 -I $(TOPDIR)/include/asm/mach/ -I $(TOPDIR)/include/asm/arch LD = gcc-cris -mlinux -march=v32 -nostdlib Use of $(TOPDIR) is deprecated. Please replace with $(srctree). There was lots of other Makefile changes but they looked OK in general. When the patch-set I would like to give to full set a review - please ping me. Sam - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2.6.20 7/14] CRIS architecture update - Boot
On Sun, Apr 22, 2007 at 09:25:23PM +0200, Mikael Starvik wrote: > The attached patch relates to CRIS kernel booting (decompresser etc) --- ../linux/arch/cris/arch-v32/boot/compressed/Makefile2007-02-04 19:44:54.0 +0100 +++ linux-2.6/arch/cris/arch-v32/boot/compressed/Makefile 2007-02-13 12:55:23.0 +0100 @@ -1,41 +1,30 @@ # -# lx25/arch/cris/arch-v32/boot/compressed/Makefile +# arch/cris/arch-v32/boot/compressed/Makefile # -# create a compressed vmlinux image from the original vmlinux files and romfs -# - -target = $(target_compressed_dir) -src= $(src_compressed_dir) -CC = gcc-cris -mlinux -march=v32 -I $(TOPDIR)/include -CFLAGS = -O2 +CC = gcc-cris -mlinux -march=v32 -I $(TOPDIR)/include +AFLAGS += -I $(TOPDIR)/include/asm/mach/ -I $(TOPDIR)/include/asm/arch +CFLAGS += -O2 -I $(TOPDIR)/include/asm/mach/ -I $(TOPDIR)/include/asm/arch LD = gcc-cris -mlinux -march=v32 -nostdlib Use of $(TOPDIR) is deprecated. Please replace with $(srctree). There was lots of other Makefile changes but they looked OK in general. When the patch-set I would like to give to full set a review - please ping me. Sam - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2.6.20 7/14] CRIS architecture update - Boot
On Sun, Apr 22, 2007 at 09:25:23PM +0200, Mikael Starvik wrote: The attached patch relates to CRIS kernel booting (decompresser etc) --- ../linux/arch/cris/arch-v32/boot/compressed/Makefile2007-02-04 19:44:54.0 +0100 +++ linux-2.6/arch/cris/arch-v32/boot/compressed/Makefile 2007-02-13 12:55:23.0 +0100 @@ -1,41 +1,30 @@ # -# lx25/arch/cris/arch-v32/boot/compressed/Makefile +# arch/cris/arch-v32/boot/compressed/Makefile # -# create a compressed vmlinux image from the original vmlinux files and romfs -# - -target = $(target_compressed_dir) -src= $(src_compressed_dir) -CC = gcc-cris -mlinux -march=v32 -I $(TOPDIR)/include -CFLAGS = -O2 +CC = gcc-cris -mlinux -march=v32 -I $(TOPDIR)/include +AFLAGS += -I $(TOPDIR)/include/asm/mach/ -I $(TOPDIR)/include/asm/arch +CFLAGS += -O2 -I $(TOPDIR)/include/asm/mach/ -I $(TOPDIR)/include/asm/arch LD = gcc-cris -mlinux -march=v32 -nostdlib Use of $(TOPDIR) is deprecated. Please replace with $(srctree). There was lots of other Makefile changes but they looked OK in general. When the patch-set I would like to give to full set a review - please ping me. Sam - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/