r1087 - trunk/src/target/u-boot/patches

werner at sita.openmoko.org werner at sita.openmoko.org
Fri Feb 23 21:25:31 CET 2007


Author: werner
Date: 2007-02-23 21:25:22 +0100 (Fri, 23 Feb 2007)
New Revision: 1087

Added:
   trunk/src/target/u-boot/patches/lowlevel_foo.patch
Modified:
   trunk/src/target/u-boot/patches/series
Log:
Merged low_level.bin from http://people.openmoko.org/laforge/tmp/bbt-20070206/
into regular u-boot build.



Added: trunk/src/target/u-boot/patches/lowlevel_foo.patch
===================================================================
--- trunk/src/target/u-boot/patches/lowlevel_foo.patch	2007-02-23 19:49:03 UTC (rev 1086)
+++ trunk/src/target/u-boot/patches/lowlevel_foo.patch	2007-02-23 20:25:22 UTC (rev 1087)
@@ -0,0 +1,195 @@
+board/neo1973/lowlevel_foo.S: http://people.openmoko.org/laforge/tmp/bbt-20070206/lowlevel_foo.S
+board/neo1973/lowlevel_foo.lds: http://people.openmoko.org/laforge/tmp/bbt-20070206/lowlevel_foo.lds
+board/neo1973/Makefile: added building of lowlevel_foo.bin (based on
+  http://people.openmoko.org/laforge/tmp/bbt-20070206/lowlevel_foo.build.sh)
+
+Index: u-boot/board/neo1973/lowlevel_foo.S
+===================================================================
+--- /dev/null
++++ u-boot/board/neo1973/lowlevel_foo.S
+@@ -0,0 +1,82 @@
++
++_start:
++	b 	reset
++undefvec:
++	b	undefvec
++swivec:
++	b	swivec
++pabtvec:
++	b	pabtvec
++dabtvec:
++	b	dabtvec
++rsvdvec:
++	b	rsvdvec
++irqvec:
++	b	irqvec
++fiqvec:
++	b	fiqvec
++
++reset:
++	/*
++	 * set the cpu to SVC32 mode
++	 */
++	mrs	r0,cpsr
++	bic	r0,r0,#0x1f
++	orr	r0,r0,#0xd3
++	msr	cpsr,r0
++
++/* turn off the watchdog */
++#define pWTCON		0x53000000
++#define INTMSK		0x4A000008	/* Interupt-Controller base addresses */
++#define INTSUBMSK	0x4A00001C
++#define CLKDIVN	0x4C000014	/* clock divisor register */
++
++	ldr     r0, =pWTCON
++	mov     r1, #0x0
++	str     r1, [r0]
++
++	mov	r1, #0xffffffff
++	ldr	r0, =INTMSK
++	str	r1, [r0]
++	ldr	r1, =0x3ff
++	ldr	r0, =INTSUBMSK
++	str	r1, [r0]
++
++	/* FCLK:HCLK:PCLK = 1:2:4 */
++	/* default FCLK is 120 MHz ! */
++	ldr	r0, =CLKDIVN
++	mov	r1, #3
++	str	r1, [r0]
++
++	bl	cpu_init_crit
++	ldr	r0,=TEXT_BASE
++	mov	pc, r0
++
++cpu_init_crit:
++	/*
++	 * flush v4 I/D caches
++	 */
++	mov	r0, #0
++	mcr	p15, 0, r0, c7, c7, 0	/* flush v3/v4 cache */
++	mcr	p15, 0, r0, c8, c7, 0	/* flush v4 TLB */
++
++	/*
++	 * disable MMU stuff and caches
++	 */
++	mrc	p15, 0, r0, c1, c0, 0
++	bic	r0, r0, #0x00002300	@ clear bits 13, 9:8 (--V- --RS)
++	bic	r0, r0, #0x00000087	@ clear bits 7, 2:0 (B--- -CAM)
++	orr	r0, r0, #0x00000002	@ set bit 2 (A) Align
++	orr	r0, r0, #0x00001000	@ set bit 12 (I) I-Cache
++	mcr	p15, 0, r0, c1, c0, 0
++
++	/*
++	 * before relocating, we have to setup RAM timing
++	 * because memory timing is board-dependend, you will
++	 * find a lowlevel_init.S in your board directory.
++	 */
++	mov	ip, lr
++	bl	lowlevel_init
++	mov	lr, ip
++	mov	pc, lr
++
+Index: u-boot/board/neo1973/lowlevel_foo.lds
+===================================================================
+--- /dev/null
++++ u-boot/board/neo1973/lowlevel_foo.lds
+@@ -0,0 +1,56 @@
++/*
++ * (C) Copyright 2002
++ * Gary Jennejohn, DENX Software Engineering, <gj at denx.de>
++ *
++ * See file CREDITS for list of people who contributed to this
++ * project.
++ *
++ * 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.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ */
++
++OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
++OUTPUT_ARCH(arm)
++ENTRY(_start)
++SECTIONS
++{
++	. = 0x00000000;
++
++	. = ALIGN(4);
++	.text      :
++	{
++	  lowlevel_foo.o (.text)
++	  *(.text)
++	}
++
++	. = ALIGN(4);
++	.rodata : { *(.rodata) }
++
++	. = ALIGN(4);
++	.data : { *(.data) }
++
++	. = ALIGN(4);
++	.got : { *(.got) }
++
++	. = .;
++	__u_boot_cmd_start = .;
++	.u_boot_cmd : { *(.u_boot_cmd) }
++	__u_boot_cmd_end = .;
++
++	. = ALIGN(4);
++	__bss_start = .;
++	.bss : { *(.bss) }
++	_end = .;
++}
+Index: u-boot/board/neo1973/Makefile
+===================================================================
+--- u-boot.orig/board/neo1973/Makefile
++++ u-boot/board/neo1973/Makefile
+@@ -23,6 +23,10 @@
+ 
+ include $(TOPDIR)/config.mk
+ 
++.PHONY:	all
++
++all:	$(LIB) lowevel_foo.bin
++
+ LIB	= lib$(BOARD).a
+ 
+ OBJS	:= neo1973.o pcf50606.o cmd_neo1973.o jbt6k74.o
+@@ -31,11 +35,24 @@ SOBJS	:= lowlevel_init.o
+ $(LIB):	$(OBJS) $(SOBJS)
+ 	$(AR) crv $@ $(OBJS) $(SOBJS)
+ 
++lowlevel_foo.o:	lowlevel_foo.S
++	$(CC) -c -DTEXT_BASE=0x33F80000 -march=armv4 \
++	  -o lowlevel_foo.o lowlevel_foo.S
++
++lowlevel_foo:	lowlevel_foo.o lowlevel_init.o
++	$(LD) -T ./lowlevel_foo.lds -Ttext 0x33f80000 -Bstatic \
++	  lowlevel_init.o lowlevel_foo.o -o lowlevel_foo
++
++lowevel_foo.bin:	lowlevel_foo
++	arm-linux-objcopy --gap-fill=0xff -O binary \
++	  lowlevel_foo lowlevel_foo.bin
++
++
+ clean:
+-	rm -f $(SOBJS) $(OBJS)
++	rm -f $(SOBJS) $(OBJS) lowlevel_foo lowlevel_foo.o
+ 
+ distclean:	clean
+-	rm -f $(LIB) core *.bak .depend
++	rm -f $(LIB) core *.bak .depend lowlevel_foo.bin
+ 
+ #########################################################################
+ 

Modified: trunk/src/target/u-boot/patches/series
===================================================================
--- trunk/src/target/u-boot/patches/series	2007-02-23 19:49:03 UTC (rev 1086)
+++ trunk/src/target/u-boot/patches/series	2007-02-23 20:25:22 UTC (rev 1087)
@@ -52,3 +52,4 @@
 
 # for automated installation
 preboot-override.patch
+lowlevel_foo.patch





More information about the commitlog mailing list