Author: nick
Date: 2010-08-24 10:52:10 +0100 (Tue, 24 Aug 2010)
New Revision: 1212
Added:
balloon/branches/menuconfig/package/u-boot/patches/
balloon/branches/menuconfig/package/u-boot/patches/balloon3.patch
balloon/branches/menuconfig/package/u-boot/patches/series
Modified:
balloon/branches/menuconfig/package/u-boot/u-boot.mk
Log:
implement u-boot source download, patching and building
Added: balloon/branches/menuconfig/package/u-boot/patches/balloon3.patch
===================================================================
--- balloon/branches/menuconfig/package/u-boot/patches/balloon3.patch (rev 0)
+++ balloon/branches/menuconfig/package/u-boot/patches/balloon3.patch 2010-08-24 09:52:10 UTC (rev 1212)
@@ -0,0 +1,55 @@
+Index: u-boot-pxa/arch/arm/config.mk
+===================================================================
+--- u-boot-pxa.orig/arch/arm/config.mk 2010-08-24 10:29:29.000000000 +0100
++++ u-boot-pxa/arch/arm/config.mk 2010-08-24 10:29:35.000000000 +0100
+@@ -21,7 +21,7 @@
+ # MA 02111-1307 USA
+ #
+
+-CROSS_COMPILE ?= arm-linux-
++CROSS_COMPILE ?= arm-linux-gnu-
+
+ ifeq ($(BOARD),omap2420h4)
+ STANDALONE_LOAD_ADDR = 0x80300000
+Index: u-boot-pxa/arch/arm/cpu/pxa/config.mk
+===================================================================
+--- u-boot-pxa.orig/arch/arm/cpu/pxa/config.mk 2010-08-24 10:27:24.000000000 +0100
++++ u-boot-pxa/arch/arm/cpu/pxa/config.mk 2010-08-24 10:28:06.000000000 +0100
+@@ -22,7 +22,8 @@
+ # MA 02111-1307 USA
+ #
+
+-PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
++#PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
++PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -mhard-float
+
+ PLATFORM_CPPFLAGS += -march=armv5te -mtune=xscale
+ # =========================================================================
+Index: u-boot-pxa/include/configs/balloon3.h
+===================================================================
+--- u-boot-pxa.orig/include/configs/balloon3.h 2010-08-24 10:37:48.000000000 +0100
++++ u-boot-pxa/include/configs/balloon3.h 2010-08-24 10:39:27.000000000 +0100
+@@ -47,7 +47,7 @@
+ "bootm 0xa4000000; " \
+ "fi; " \
+ "bootm 0x40000;"
+-#define CONFIG_BOOTARGS "console=tty0 console=ttyS2,115200"
++#define CONFIG_BOOTARGS "rootfstype=yaffs2 root=/dev/mtdblock1 console=tty0 console=ttyS2,115200"
+ #define CONFIG_TIMESTAMP
+ #define CONFIG_BOOTDELAY 2 /* Autoboot delay */
+ #define CONFIG_CMDLINE_TAG
+@@ -169,6 +169,14 @@
+ #define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
+ #define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
+
++// NCB
++#define CONFIG_MTD_DEVICE
++#define CONFIG_MTD_PARTITIONS
++
++#define CONFIG_CMD_MTDPARTS
++#define MTDIDS_DEFAULT "nor0=physmap-flash.0"
++#define MTDPARTS_DEFAULT "mtdparts=physmap-flash.0:2m(reserved)," \
++ "4m(kernel),-(space)"
+ #if 0
+ /*
+ * IDE
Added: balloon/branches/menuconfig/package/u-boot/patches/series
===================================================================
--- balloon/branches/menuconfig/package/u-boot/patches/series (rev 0)
+++ balloon/branches/menuconfig/package/u-boot/patches/series 2010-08-24 09:52:10 UTC (rev 1212)
@@ -0,0 +1 @@
+balloon3.patch
Modified: balloon/branches/menuconfig/package/u-boot/u-boot.mk
===================================================================
--- balloon/branches/menuconfig/package/u-boot/u-boot.mk 2010-08-23 13:46:45 UTC (rev 1211)
+++ balloon/branches/menuconfig/package/u-boot/u-boot.mk 2010-08-24 09:52:10 UTC (rev 1212)
@@ -1,20 +1,41 @@
-$(CHECKOUT)/u-boot-pxa/u-boot.bin:
- ($(MAKE) -C $(CHECKOUT)/u-boot-pxa balloon3_config)
- ($(MAKE) -C $(CHECKOUT)/u-boot-pxa)
+RES:=$(BUILDDIR)/u-boot
+BUILD:=$(RES)/u-boot-pxa
-u-boot: $(CHECKOUT)/u-boot-pxa/u-boot.bin
- if [ ! -d $(BUILDDIR)/u-boot ]; then \
- mkdir -p $(BUILDDIR)/u-boot; \
- fi;
- ($(MAKE) $(MAKEOPTS) -C $(CHECKOUT)/u-boot-pxa)
- cp $(CHECKOUT)/u-boot-pxa/u-boot.bin $(BUILDDIR)/u-boot/u-boot.bin
- cp $(BUILDDIR)/u-boot/u-boot.bin $(BUILDDIR)/u-boot/u-boot
- gzip --best $(BUILDDIR)/u-boot/u-boot
+$(RES)/unpacked.stamp:
+ mkdir -p $(RES) $(BUILD)
+# get source from upstream if not at balloonboard.org
+ (cd $(RES) && \
+ ( (wget -N $(RELEASESITE)/sources/uboot/uboot.tar.bz2 || \
+ wget -N 'http://git.denx.de/?p=u-boot/u-boot-pxa.git;a=snapshot;h=refs/heads/balloon3;sf=tgz' -O u-boot-pxa.tgz \
+ ) \
+ && tar --extract --file u-boot-pxa.tgz)) && \
+ touch $(RES)/unpacked.stamp
+$(RES)/patchlink.stamp: $(RES)/unpacked.stamp
+ #if there is already a patches link then unquilt first
+# ln -s `pwd`/patches $(BUILD)/patches || \
+# (cd $(BUILD) && quilt pop -af || test $$? = 2 ); rm -f $(BUILD)/patches
+ ln -s $(CHECKOUT)/package/u-boot/patches $(BUILD)/patches
+ touch $(RES)/patchlink.stamp
+
+PATCHLIST = $(shell awk '{ print "$(patches)/"$1 }' $(patchr)/series)
+$(RES)/quilt.stamp: $(PATCHLIST) $(RES)/patchlink.stamp
+ (cd $(BUILD) && quilt push -a || test $$? = 2 )
+ touch $(RES)/quilt.stamp
+
+$(BUILD)/u-boot.bin: $(RES)/quilt.stamp
+ ($(MAKE) -C $(BUILD) balloon3_config)
+ ($(MAKE) -C $(BUILD))
+
+u-boot: $(BUILD)/u-boot.bin
+ cp $(BUILD)/u-boot.bin $(RES)/u-boot.bin
+ cp $(RES)/u-boot.bin $(RES)/u-boot
+ gzip --best $(RES)/u-boot
+
u-boot-clean:
- ($(MAKE) $(MAKEOPTS) -C $(CHECKOUT)/u-boot-pxa clean)
- rm -rf $(BUILDDIR)/u-boot/*
+ ($(MAKE) $(MAKEOPTS) -C $(BUILD) clean) && 0
+ rm $(RES)/u-boot.bin $(RES)/u-boot.gz && 0
.PHONY: u-boot u-boot-clean