[Armadeus-commitlog] SF.net SVN: armadeus: [793] branches/apf2/buildroot/target/device/armadeus
Brought to you by:
sszy
|
From: <ar...@us...> - 2008-04-05 09:13:02
|
Revision: 793
http://armadeus.svn.sourceforge.net/armadeus/?rev=793&view=rev
Author: artemys
Date: 2008-04-05 02:12:51 -0700 (Sat, 05 Apr 2008)
Log Message:
-----------
[BUILDROOT][U-BOOT] Add support for U-Boot 2.0.0-rc3 (actual bootloader for APF27) in buildroot
Modified Paths:
--------------
branches/apf2/buildroot/target/device/armadeus/apf27/Makefile.in
branches/apf2/buildroot/target/device/armadeus/u-boot/patches/1.1.6/110-apx-tools.patch
branches/apf2/buildroot/target/device/armadeus/u-boot/u-boot.mk
Added Paths:
-----------
branches/apf2/buildroot/target/device/armadeus/u-boot/patches/2.0.0-rc3/
branches/apf2/buildroot/target/device/armadeus/u-boot/patches/2.0.0-rc3/001-u-boot-2.0.0-rc3-flash-timings.patch
branches/apf2/buildroot/target/device/armadeus/u-boot/patches/2.0.0-rc3/002-u-boot-2.0.0-rc3-defaultenv-ipaddr.patch
branches/apf2/buildroot/target/device/armadeus/u-boot/patches/2.0.0-rc3/003-switch_to_fixed_ip_address.patch
branches/apf2/buildroot/target/device/armadeus/u-boot/patches/2.0.0-rc3/004-fix-some-compilation-problems.patch
branches/apf2/buildroot/target/device/armadeus/u-boot/patches/2.0.0-rc3/005-old-gcc-implement-muldiv3-for-arm.patch
Modified: branches/apf2/buildroot/target/device/armadeus/apf27/Makefile.in
===================================================================
--- branches/apf2/buildroot/target/device/armadeus/apf27/Makefile.in 2008-04-04 12:41:04 UTC (rev 792)
+++ branches/apf2/buildroot/target/device/armadeus/apf27/Makefile.in 2008-04-05 09:12:51 UTC (rev 793)
@@ -1,5 +1,5 @@
-U-BOOT_TARGET_NAME=apx9328
+U-BOOT_TARGET_NAME=pcm038
LINUX_FORMAT=uImage
LINUX_KCONFIG=$(ARMADEUS_CONFIG_PATH)/linux-$(BR2_PACKAGE_LINUX_VERSION).config
Modified: branches/apf2/buildroot/target/device/armadeus/u-boot/patches/1.1.6/110-apx-tools.patch
===================================================================
--- branches/apf2/buildroot/target/device/armadeus/u-boot/patches/1.1.6/110-apx-tools.patch 2008-04-04 12:41:04 UTC (rev 792)
+++ branches/apf2/buildroot/target/device/armadeus/u-boot/patches/1.1.6/110-apx-tools.patch 2008-04-05 09:12:51 UTC (rev 793)
@@ -280,7 +280,7 @@
+ "\n"
+ " %s converts binary files (u-boot.bin) into so called \n"
+ " bootstrap records file (u-boot.brec) that are accepted by\n"
-+ " Motorola's MC9328MX1/L (a.k.a. DragaonBall i.MX) in \"Bootstrap Mode\" \n"
++ " Motorola's MC9328MX1/L (a.k.a. DragonBall i.MX) in \"Bootstrap Mode\" \n"
+ " add memory init commands and run command\n"
+ " at end of file\n"
+ " NOTE: \n"
Added: branches/apf2/buildroot/target/device/armadeus/u-boot/patches/2.0.0-rc3/001-u-boot-2.0.0-rc3-flash-timings.patch
===================================================================
--- branches/apf2/buildroot/target/device/armadeus/u-boot/patches/2.0.0-rc3/001-u-boot-2.0.0-rc3-flash-timings.patch (rev 0)
+++ branches/apf2/buildroot/target/device/armadeus/u-boot/patches/2.0.0-rc3/001-u-boot-2.0.0-rc3-flash-timings.patch 2008-04-05 09:12:51 UTC (rev 793)
@@ -0,0 +1,29 @@
+Subject: pcm038: add flash timing initialization
+From: Robert Schwebel <r.s...@pe...>
+
+Add init code for the CS0 flash timing registers. These values are not
+optimized yet, they are more or less copied from the Windows CE
+installation.
+
+Signed-off-by: Robert Schwebel <r.s...@pe...>
+
+---
+ board/pcm038/lowlevel_init.S | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+Index: board/pcm038/lowlevel_init.S
+===================================================================
+--- u-boot/board/pcm038/lowlevel_init.S.orig
++++ u-boot/board/pcm038/lowlevel_init.S
+@@ -158,6 +158,11 @@ board_init_lowlevel:
+ writel(0x09030908, PCDR1) /* PERDIV1=08 @133 MHz */
+ /* PERDIV1=04 @266 MHz */
+
++ /* configure 16 bit nor flash on cs0 */
++ writel(0x0000CC03, 0xD8002000)
++ writel(0xa0330D01, 0xD8002004)
++ writel(0x00220800, 0xD8002008)
++
+ /* skip sdram initialization if we run from ram */
+ cmp pc, #0xa0000000
+ bls 1f
Added: branches/apf2/buildroot/target/device/armadeus/u-boot/patches/2.0.0-rc3/002-u-boot-2.0.0-rc3-defaultenv-ipaddr.patch
===================================================================
--- branches/apf2/buildroot/target/device/armadeus/u-boot/patches/2.0.0-rc3/002-u-boot-2.0.0-rc3-defaultenv-ipaddr.patch (rev 0)
+++ branches/apf2/buildroot/target/device/armadeus/u-boot/patches/2.0.0-rc3/002-u-boot-2.0.0-rc3-defaultenv-ipaddr.patch 2008-04-05 09:12:51 UTC (rev 793)
@@ -0,0 +1,56 @@
+Subject: pcm038: fix default environment wrt. ip address
+From: Robert Schwebel <r.s...@pe...>
+
+The boot script doesn't honour the ip= parameter when booting from flash
+only.
+
+Signed-off-by: Robert Schwebel <r.s...@pe...>
+
+---
+ board/pcm038/env/bin/boot | 14 ++++++++------
+ board/pcm038/env/config | 3 ++-
+ 2 files changed, 10 insertions(+), 7 deletions(-)
+
+Index: board/pcm038/env/bin/boot
+===================================================================
+--- u-boot/board/pcm038/env/bin/boot.orig
++++ u-boot/board/pcm038/env/bin/boot
+@@ -12,14 +12,15 @@ if [ x$1 = xnet ]; then
+ kernel=net
+ fi
+
+-if [ $root = flash ]; then
++if [ x$ip = xdhcp ]; then
++ bootargs="$bootargs ip=dhcp"
++else
++ bootargs="$bootargs ip=$eth0.ipaddr:$eth0.serverip:$eth0.gateway:$eth0.netmask:::"
++fi
++
++if [ x$root = xflash ]; then
+ bootargs="$bootargs root=$rootpart rootfstype=jffs2"
+ else
+- if [ x$ip = xdhcp ]; then
+- bootargs="$bootargs ip=dhcp"
+- else
+- bootargs="$bootargs ip=$eth0.ipaddr:$eth0.serverip:$eth0.gateway:$eth0.netmask:::"
+- fi
+ bootargs="$bootargs root=/dev/nfs nfsroot=$eth0.serverip:$nfsroot,v3,tcp"
+ fi
+
+@@ -34,3 +35,4 @@ if [ $kernel = net ]; then
+ else
+ bootm /dev/nor0.kernel
+ fi
++
+Index: board/pcm038/env/config
+===================================================================
+--- u-boot/board/pcm038/env/config.orig
++++ u-boot/board/pcm038/env/config
+@@ -22,4 +22,5 @@ nfsroot="/ptx/work/octopus/rsc/svn/osela
+ bootargs="console=ttymxc0,115200"
+
+ mtdparts="128k(uboot)ro,128k(ubootenv),1536k(kernel),-(root)"
+-rootpart="/dev/mtdblock3"
+\ No newline at end of file
++rootpart="/dev/mtdblock3"
++
Added: branches/apf2/buildroot/target/device/armadeus/u-boot/patches/2.0.0-rc3/003-switch_to_fixed_ip_address.patch
===================================================================
--- branches/apf2/buildroot/target/device/armadeus/u-boot/patches/2.0.0-rc3/003-switch_to_fixed_ip_address.patch (rev 0)
+++ branches/apf2/buildroot/target/device/armadeus/u-boot/patches/2.0.0-rc3/003-switch_to_fixed_ip_address.patch 2008-04-05 09:12:51 UTC (rev 793)
@@ -0,0 +1,38 @@
+Subject: pcm038: default environment should use fixed ip addresses
+From: Alexander Bauer <A....@ph...>
+
+To be conform with other documents, a static ip configuration should be used.
+And kernel and root filesystem should be loaded from flash as the default
+behaviour.
+
+Signed-off-by: Alexander Bauer <A....@ph...>
+Signed-off-by: Juergen Beisert <j.b...@pe...>
+
+Index: u-boot-2.0.0-rc3/board/pcm038/env/config
+===================================================================
+--- u-boot-2.0.0-rc3.orig/board/pcm038/env/config 2008-01-11 10:44:55.000000000 +0100
++++ u-boot-2.0.0-rc3/board/pcm038/env/config 2008-01-11 10:47:30.000000000 +0100
+@@ -1,16 +1,16 @@
+ #!/bin/sh
+
+ # can be either 'net' or 'flash'
+-kernel=net
+-root=net
++kernel=flash
++root=flash
+
+-# use 'dhcp' todo dhcp in uboot and in kernel
+-ip=dhcp
++# enable 'dhcp' todo dhcp in uboot and in kernel
++#ip=dhcp
+
+-eth0.ipaddr=192.168.23.164
++eth0.ipaddr=192.168.3.11
+ eth0.netmask=255.255.255.0
+-eth0.gateway=192.168.23.2
+-eth0.serverip=192.168.23.2
++eth0.gateway=
++eth0.serverip=192.168.3.10
+ eth0.ethaddr=00:50:c2:72:a7:4a
+
+ uimage=uImage-pcm038
Added: branches/apf2/buildroot/target/device/armadeus/u-boot/patches/2.0.0-rc3/004-fix-some-compilation-problems.patch
===================================================================
--- branches/apf2/buildroot/target/device/armadeus/u-boot/patches/2.0.0-rc3/004-fix-some-compilation-problems.patch (rev 0)
+++ branches/apf2/buildroot/target/device/armadeus/u-boot/patches/2.0.0-rc3/004-fix-some-compilation-problems.patch 2008-04-05 09:12:51 UTC (rev 793)
@@ -0,0 +1,16 @@
+--- u-boot-2.0.0-rc3/arch/arm/Makefile 2007-11-29 13:56:46.000000000 +0100
++++ u-boot-2.0.0-rc3.mod/arch/arm/Makefile 2008-04-04 16:11:48.000000000 +0200
+@@ -19,7 +19,7 @@
+
+ TEXT_BASE = $(CONFIG_TEXT_BASE)
+
+-CPPFLAGS += -mabi=apcs-gnu -DTEXT_BASE=$(TEXT_BASE) -P
++CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE) -P
+ CFLAGS := -fno-common -msoft-float -Os
+
+ ifeq ($(incdir-y),)
+--- u-boot-2.0.0-rc3/scripts/mod/empty.c 2007-11-29 13:56:46.000000000 +0100
++++ u-boot-2.0.0-rc3.mod/scripts/mod/empty.c 2008-04-04 16:21:57.000000000 +0200
+@@ -1 +1,2 @@
+ /* empty file to figure out endianness / word size */
++static int toto=0;
Added: branches/apf2/buildroot/target/device/armadeus/u-boot/patches/2.0.0-rc3/005-old-gcc-implement-muldiv3-for-arm.patch
===================================================================
--- branches/apf2/buildroot/target/device/armadeus/u-boot/patches/2.0.0-rc3/005-old-gcc-implement-muldiv3-for-arm.patch (rev 0)
+++ branches/apf2/buildroot/target/device/armadeus/u-boot/patches/2.0.0-rc3/005-old-gcc-implement-muldiv3-for-arm.patch 2008-04-05 09:12:51 UTC (rev 793)
@@ -0,0 +1,59 @@
+--- u-boot-2.0.0-rc3/arch/arm/lib/Makefile 2007-11-29 13:56:46.000000000 +0100
++++ u-boot-2.0.0-rc3.mod/arch/arm/lib/Makefile 2008-04-04 17:11:48.000000000 +0200
+@@ -9,6 +9,7 @@
+ obj-y += _umodsi3.o
+ obj-y += _lshrdi3.o
+ obj-y += arm.o
++obj-y += _muldi3.o
+ obj-$(CONFIG_MODULES) += module.o
+ extra-$(CONFIG_GENERIC_LINKER_SCRIPT) += u-boot.lds
+
+--- u-boot-2.0.0-rc3/arch/arm/lib/_muldi3.S 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-2.0.0-rc3.mod/arch/arm/lib/_muldi3.S 2008-04-04 17:14:25.000000000 +0200
+@@ -0,0 +1,46 @@
++/*
++ * linux/arch/arm/lib/muldi3.S
++ *
++ * Author: Nicolas Pitre
++ * Created: Oct 19, 2005
++ * Copyright: Monta Vista Software, Inc.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ */
++
++/*#include <linux/linkage.h>*/
++
++#ifdef __ARMEB__
++#define xh r0
++#define xl r1
++#define yh r2
++#define yl r3
++#else
++#define xl r0
++#define xh r1
++#define yl r2
++#define yh r3
++#endif
++
++.globl __muldi3
++/*ENTRY(__aeabi_lmul)*/
++__muldi3:
++
++ mul xh, yl, xh
++ mla xh, xl, yh, xh
++ mov ip, xl, lsr #16
++ mov yh, yl, lsr #16
++ bic xl, xl, ip, lsl #16
++ bic yl, yl, yh, lsl #16
++ mla xh, yh, ip, xh
++ mul yh, xl, yh
++ mul xl, yl, xl
++ mul ip, yl, ip
++ adds xl, xl, yh, lsl #16
++ adc xh, xh, yh, lsr #16
++ adds xl, xl, ip, lsl #16
++ adc xh, xh, ip, lsr #16
++ mov pc, lr
++
Modified: branches/apf2/buildroot/target/device/armadeus/u-boot/u-boot.mk
===================================================================
--- branches/apf2/buildroot/target/device/armadeus/u-boot/u-boot.mk 2008-04-04 12:41:04 UTC (rev 792)
+++ branches/apf2/buildroot/target/device/armadeus/u-boot/u-boot.mk 2008-04-05 09:12:51 UTC (rev 793)
@@ -3,20 +3,36 @@
# u-boot
#
#############################################################
+# On APF27:
+ifneq ($(BR2_TARGET_ARMADEUS_APF27),)
+U-BOOT_VERSION:=2.0.0-rc3
+U-BOOT_SOURCE:=u-boot-$(U-BOOT_VERSION).tar.gz
+U-BOOT_SITE:=http://www.pengutronix.de/software/u-boot/download
+U-BOOT_DIR:=$(BUILD_DIR)/u-boot-$(U-BOOT_VERSION)
+#U-BOOT_TARGET_NAME:=pcm038 # overloaded by ../apf27/Makefile.in
+U-BOOT_UNZIP:=zcat
+U-BOOT_GENERATED_BIN:=uboot.bin
+ADDITIONAL_MAKE_PARAMETERS:=CONFIG_NOSOFTFLOAT=1 ARCH=arm
+U-BOOT_TARGET_CONFIG=$(U-BOOT_TARGET_NAME)_defconfig
+else # APx9328:
U-BOOT_VERSION:=1.1.6
U-BOOT_SOURCE:=u-boot-$(U-BOOT_VERSION).tar.bz2
U-BOOT_SITE:=http://ovh.dl.sourceforge.net/sourceforge/u-boot
U-BOOT_DIR:=$(BUILD_DIR)/u-boot-$(U-BOOT_VERSION)
+#U-BOOT_TARGET_NAME:=apx9328 overloaded by ../apx9328/Makefile.in
+U-BOOT_UNZIP:=bzcat
+U-BOOT_GENERATED_BIN:=u-boot.bin
+U-BOOT_TARGET_CONFIG=$(U-BOOT_TARGET_NAME)_config
+endif
U-BOOT_PACKAGE_DIR:=$(ARMADEUS_PATH)/u-boot
-U-BOOT_TARGET_NAME:=apx9328
U-BOOT_TARGET_IPADDR:=$(strip $(subst ",, $(BR2_TARGET_UBOOT_IPADDR_ARMADEUS)))
U-BOOT_TARGET_SERVERIP:=$(strip $(subst ",, $(BR2_TARGET_UBOOT_SERVERIP_ARMADEUS)))
U-BOOT_TARGET_GATEWAY:=$(strip $(subst ",, $(BR2_TARGET_UBOOT_GATEWAY_ARMADEUS)))
U-BOOT_TARGET_NETMASK:=$(strip $(subst ",, $(BR2_TARGET_UBOOT_NETMASK_ARMADEUS)))
U-BOOT_TARGET_ETHADDR:=$(strip $(subst ",, $(BR2_TARGET_UBOOT_ETHADDR_ARMADEUS)))
-U-BOOT_TARGET_FILE:=$(U-BOOT_DIR)/include/configs/$(U-BOOT_TARGET_NAME).h
+U-BOOT_TARGET_FILE=$(U-BOOT_DIR)/include/configs/$(U-BOOT_TARGET_NAME).h
###-----
$(DL_DIR)/$(U-BOOT_SOURCE):
@@ -27,13 +43,17 @@
###-----
$(U-BOOT_DIR)/.unpacked: $(DL_DIR)/$(U-BOOT_SOURCE)
- bzcat $(DL_DIR)/$(U-BOOT_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ $(U-BOOT_UNZIP) $(DL_DIR)/$(U-BOOT_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
toolchain/patch-kernel.sh $(U-BOOT_DIR) $(U-BOOT_PACKAGE_DIR)/patches/$(U-BOOT_VERSION) *.patch
touch $(U-BOOT_DIR)/.unpacked
###-----
$(U-BOOT_DIR)/.configured: $(U-BOOT_DIR)/.unpacked
- make -C $(U-BOOT_DIR) CROSS_COMPILE=$(TARGET_CROSS) $(U-BOOT_TARGET_NAME)_config
+ make -C $(U-BOOT_DIR) CROSS_COMPILE=$(TARGET_CROSS) $(ADDITIONAL_MAKE_PARAMETERS) $(U-BOOT_TARGET_CONFIG)
+ifneq ($(BR2_TARGET_ARMADEUS_APF27),) # if APF27
+ echo "Additional U-Boot configuration"
+ touch $(U-BOOT_DIR)/u-boot.brec
+else # if APx9328
ifneq ($(BR2_TARGET_ARMADEUS_SDRAM_SIZE),)
$(SED) "s,^#define CFG_SDRAM_MBYTE_SYZE.*,#define CFG_SDRAM_MBYTE_SYZE $(BR2_TARGET_ARMADEUS_SDRAM_SIZE),g;"\
$(U-BOOT_TARGET_FILE)
@@ -60,44 +80,40 @@
ifneq ($(U-BOOT_TARGET_IPADDR),)
$(SED) 's,^#define CONFIG_IPADDR.*,#define CONFIG_IPADDR $(U-BOOT_TARGET_IPADDR),g' \
$(U-BOOT_TARGET_FILE)
- echo "#define CONFIG_IPADDR $(U-BOOT_TARGET_IPADDR)"
endif
ifneq ($(U-BOOT_TARGET_SERVERIP),)
$(SED) 's,^#define CONFIG_SERVERIP.*,#define CONFIG_SERVERIP $(U-BOOT_TARGET_SERVERIP),g' \
$(U-BOOT_TARGET_FILE)
- echo "#define CONFIG_SERVERIP $(U-BOOT_TARGET_SERVERIP)"
endif
ifneq ($(U-BOOT_TARGET_GATEWAY),)
$(SED) 's,^#define CONFIG_GATEWAYIP.*,#define CONFIG_GATEWAYIP $(U-BOOT_TARGET_GATEWAY),g' \
$(U-BOOT_TARGET_FILE)
- echo "#define CONFIG_GATEWAYIP $(U-BOOT_TARGET_GATEWAY)"
endif
ifneq ($(U-BOOT_TARGET_NETMASK),)
$(SED) 's,^#define CONFIG_NETMASK.*,#define CONFIG_NETMASK $(U-BOOT_TARGET_NETMASK),g' \
$(U-BOOT_TARGET_FILE)
- echo "#define CONFIG_NETMASK $(U-BOOT_TARGET_NETMASK)"
endif
ifneq ($(U-BOOT_TARGET_ETHADDR),)
$(SED) 's,^#define CONFIG_ETHADDR.*,#define CONFIG_ETHADDR $(U-BOOT_TARGET_ETHADDR),g' \
$(U-BOOT_TARGET_FILE)
- echo "#define CONFIG_ETHADDR $(U-BOOT_TARGET_ETHADDR)"
endif
+endif # BR2_TARGET_ARMADEUS_APF27
touch $(U-BOOT_DIR)/.configured
###-----
-$(U-BOOT_DIR)/u-boot.bin: $(U-BOOT_DIR)/.configured
- make -C $(U-BOOT_DIR) CROSS_COMPILE=$(TARGET_CROSS)
- touch -c $(U-BOOT_DIR)/u-boot.bin
+$(U-BOOT_DIR)/$(U-BOOT_GENERATED_BIN): $(U-BOOT_DIR)/.configured
+ make -C $(U-BOOT_DIR) CROSS_COMPILE=$(TARGET_CROSS) $(ADDITIONAL_MAKE_PARAMETERS)
+ touch -c $(U-BOOT_DIR)/$(U-BOOT_GENERATED_BIN)
###-----
$(BINARIES_DIR)/u-boot.brec: $(U-BOOT_DIR)/u-boot.brec
mkdir -p $(BINARIES_DIR)
- cp $(U-BOOT_DIR)/u-boot.brec $@
+ cp $^ $@
###-----
-$(BINARIES_DIR)/u-boot.bin: $(U-BOOT_DIR)/u-boot.bin
+$(BINARIES_DIR)/u-boot.bin: $(U-BOOT_DIR)/$(U-BOOT_GENERATED_BIN)
mkdir -p $(BINARIES_DIR)
- cp $(U-BOOT_DIR)/u-boot.bin $@
+ cp $^ $@
###-----
u-boot: $(BINARIES_DIR)/u-boot.bin $(BINARIES_DIR)/u-boot.brec
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|