u-boot-2009.11: Add recipe
PATCH v4 1/1 u-boot-2009.11: Add recipe
Fix buggy dataflash support for sam9g45/m10 Add support for sd-card
More robust error handling for dataflash access. Add debug command to allow runtime control of verbosity Add support for at91sam9m10g45ek
--- ...port-running-ATSAM9G45-M10-from-dataflash.patch | 117 +++ ...-SAM9M10-G45-config-for-dataflash-support.patch | 110 +++ ...rt-selecting-SPI-mode-in-dataflash-driver.patch | 116 +++ ...replace-verbose-dataflash_mmc_mux-command.patch | 28 + ...ibarm-board.c-Gets-overwritten-workaround.patch | 34 + .../0007-fat.c-Add-DEBUG-currently-disabled.patch | 26 + ...0008-env_dataflash.c-More-robust-handling.patch | 148 ++++ ...g.c-Add-a-generic-function-for-debug-vars.patch | 168 +++++ ...10-debug.h-Add-header-for-debug-variables.patch | 60 ++ ...-common-Makefile-Add-cmd_debug.c-to-build.patch | 27 + ...mci.c-Support-writing-out-AT91-mci-config.patch | 100 +++ ...taflash.c-Status-printout-depend-on-DEBUG.patch | 59 ++ .../0014-AT91-MCI-Add-support-for-SD-Card.patch | 740 ++++++++++++++++++++ .../0015-sam9m10g45ek-Add-configuration-file.patch | 113 +++ recipes/u-boot/u-boot_2009.11.bb | 41 ++ 15 files changed, 1887 insertions(+), 0 deletions(-) create mode 100644 recipes/u-boot/u-boot-2009.11/at91/0002-Support-running-ATSAM9G45-M10-from-dataflash.patch create mode 100644 recipes/u-boot/u-boot-2009.11/at91/0003-Update-SAM9M10-G45-config-for-dataflash-support.patch create mode 100644 recipes/u-boot/u-boot-2009.11/at91/0004-Support-selecting-SPI-mode-in-dataflash-driver.patch create mode 100644 recipes/u-boot/u-boot-2009.11/at91/0005-mux-replace-verbose-dataflash_mmc_mux-command.patch create mode 100644 recipes/u-boot/u-boot-2009.11/at91/0006-libarm-board.c-Gets-overwritten-workaround.patch create mode 100644 recipes/u-boot/u-boot-2009.11/at91/0007-fat.c-Add-DEBUG-currently-disabled.patch create mode 100644 recipes/u-boot/u-boot-2009.11/at91/0008-env_dataflash.c-More-robust-handling.patch create mode 100644 recipes/u-boot/u-boot-2009.11/at91/0009-cmd_debug.c-Add-a-generic-function-for-debug-vars.patch create mode 100644 recipes/u-boot/u-boot-2009.11/at91/0010-debug.h-Add-header-for-debug-variables.patch create mode 100644 recipes/u-boot/u-boot-2009.11/at91/0011-common-Makefile-Add-cmd_debug.c-to-build.patch create mode 100644 recipes/u-boot/u-boot-2009.11/at91/0012-cmd_mci.c-Support-writing-out-AT91-mci-config.patch create mode 100644 recipes/u-boot/u-boot-2009.11/at91/0013-atmel_dataflash.c-Status-printout-depend-on-DEBUG.patch create mode 100644 recipes/u-boot/u-boot-2009.11/at91/0014-AT91-MCI-Add-support-for-SD-Card.patch create mode 100644 recipes/u-boot/u-boot-2009.11/at91/0015-sam9m10g45ek-Add-configuration-file.patch create mode 100644 recipes/u-boot/u-boot_2009.11.bb
recipes/u-boot/u-boot-2009.11/at91/0002-Support-running-ATSAM9G45-M10-from-dataflash.patch new file +117 -0
@@ -0,0 +1,117 @@ +From 05c663921ff0fab52cafd2ff23848fa4bfabc5ec Mon Sep 17 00:00:00 2001 +From: Ulf Samuelsson <[email protected]> +Date: Sat, 27 Feb 2010 08:58:44 +0100 +Subject: [PATCH] Support running ATSAM9G45/M10 from dataflash + +The current at91sam9g45 targets can build for dataflash +but the target will still use NAND flash for the environment. + +This patch will add the first hooks to allow use of dataflash. +The end result will use dataflash, but there are bit errors +during transmission, so the CRC check will always fail. +This will be fixed by later patches. + +Signed-off-by: Ulf Samuelsson <[email protected]> +--- + Makefile | 2 +- + board/atmel/at91sam9m10g45ek/Makefile | 1 + + board/atmel/at91sam9m10g45ek/partition.c | 40 +++++++++++++++++++++++++++ + cpu/arm926ejs/at91/at91sam9m10g45_devices.c | 3 +- + 4 files changed, 43 insertions(+), 3 deletions(-) + create mode 100644 board/atmel/at91sam9m10g45ek/partition.c + +diff --git a/Makefile b/Makefile +index f06a97c..0bfa61c 100644 +--- a/Makefile ++++ b/Makefile +@@ -2876,7 +2876,7 @@ at91sam9g45ekes_config : unconfig + echo "#define CONFIG_SYS_USE_NANDFLASH 1" >>$(obj)include/config.h ; \ + $(XECHO) "... with environment variable in NAND FLASH" ; \ + else \ +- echo "#define CONFIG_ATMEL_SPI 1" >>$(obj)include/config.h ; \ ++ echo "#define CONFIG_SYS_USE_DATAFLASH 1" >>$(obj)include/config.h ; \ + $(XECHO) "... with environment variable in SPI DATAFLASH CS0" ; \ + fi; + @$(MKCONFIG) -a at91sam9m10g45ek arm arm926ejs at91sam9m10g45ek atmel at91 +diff --git a/board/atmel/at91sam9m10g45ek/Makefile b/board/atmel/at91sam9m10g45ek/Makefile +index 4caf1e4..914cc1a 100644 +--- a/board/atmel/at91sam9m10g45ek/Makefile ++++ b/board/atmel/at91sam9m10g45ek/Makefile +@@ -31,6 +31,7 @@ LIB = $(obj)lib$(BOARD).a + + COBJS-y += at91sam9m10g45ek.o + COBJS-y += led.o ++COBJS-$(CONFIG_HAS_DATAFLASH) += partition.o + + SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) + OBJS := $(addprefix $(obj),$(COBJS-y)) +diff --git a/board/atmel/at91sam9m10g45ek/partition.c b/board/atmel/at91sam9m10g45ek/partition.c +new file mode 100644 +index 0000000..2629c67 +--- /dev/null ++++ b/board/atmel/at91sam9m10g45ek/partition.c +@@ -0,0 +1,40 @@ ++/* ++ * (C) Copyright 2008 ++ * Ulf Samuelsson <[email protected]> ++ * ++ * 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 ++ * ++ */ ++#include <common.h> ++#include <config.h> ++#include <asm/hardware.h> ++#include <dataflash.h> ++ ++AT91S_DATAFLASH_INFO dataflash_info[CONFIG_SYS_MAX_DATAFLASH_BANKS]; ++ ++struct dataflash_addr cs[CONFIG_SYS_MAX_DATAFLASH_BANKS] = { ++ {CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0, 0}, /* Logical adress, CS */ ++ {CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS1, 1} ++}; ++ ++/*define the area offsets*/ ++dataflash_protect_t area_list[NB_DATAFLASH_AREA] = { ++ {0x00000000, 0x000041FF, FLAG_PROTECT_SET, 0, "Bootstrap"}, ++ {0x00004200, 0x000083FF, FLAG_PROTECT_CLEAR, 0, "Environment"}, ++ {0x00008400, 0x00041FFF, FLAG_PROTECT_SET, 0, "U-Boot"}, ++ {0x00042000, 0x00251FFF, FLAG_PROTECT_CLEAR, 0, "Kernel"}, ++ {0x00252000, 0xFFFFFFFF, FLAG_PROTECT_CLEAR, 0, "FS"}, ++}; +diff --git a/cpu/arm926ejs/at91/at91sam9m10g45_devices.c b/cpu/arm926ejs/at91/at91sam9m10g45_devices.c +index 98d90f2..07717ea 100644 +--- a/cpu/arm926ejs/at91/at91sam9m10g45_devices.c ++++ b/cpu/arm926ejs/at91/at91sam9m10g45_devices.c +@@ -75,7 +75,6 @@ void at91_serial_hw_init(void) + #endif + } + +-#ifdef CONFIG_ATMEL_SPI + void at91_spi0_hw_init(unsigned long cs_mask) + { + at91_set_A_periph(AT91_PIN_PB0, 0); /* SPI0_MISO */ +@@ -146,7 +145,7 @@ void at91_spi1_hw_init(unsigned long cs_mask) + } + + } +-#endif ++ + + #ifdef CONFIG_MACB + void at91_macb_hw_init(void) +-- +1.6.0.2 +
recipes/u-boot/u-boot-2009.11/at91/0003-Update-SAM9M10-G45-config-for-dataflash-support.patch new file +110 -0
110 lines not on this page · raw message
recipes/u-boot/u-boot-2009.11/at91/0004-Support-selecting-SPI-mode-in-dataflash-driver.patch new file +116 -0
116 lines not on this page · raw message
recipes/u-boot/u-boot-2009.11/at91/0005-mux-replace-verbose-dataflash_mmc_mux-command.patch new file +28 -0
@@ -0,0 +1,28 @@ +From 600ddf4971206a6c653c23ddbce48253f1e07dd2 Mon Sep 17 00:00:00 2001 +From: Ulf Samuelsson <[email protected]> +Date: Sat, 13 Mar 2010 13:25:26 +0100 +Subject: [PATCH] mux: replace verbose dataflash_mmc_mux command + +Replace verbose 17 character command with the original thing + +Signed-off-by: Ulf Samuelsson <[email protected]> +--- + common/cmd_dataflash_mmc_mux.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/common/cmd_dataflash_mmc_mux.c b/common/cmd_dataflash_mmc_mux.c +index 97e303e..2fc67d4 100644 +--- a/common/cmd_dataflash_mmc_mux.c ++++ b/common/cmd_dataflash_mmc_mux.c +@@ -59,7 +59,7 @@ static int mmc_nspi (const char *s) + + U_BOOT_CMD( + dataflash_mmc_mux, 2, 1, do_dataflash_mmc_mux, +- "dataflash_mmc_mux\t- enable or disable MMC or SPI\n", ++ "mux\t- enable or disable MMC or SPI\n", + "[mmc, spi]\n" + " - enable or disable MMC or SPI" + ); +-- +1.6.0.2 +
recipes/u-boot/u-boot-2009.11/at91/0006-libarm-board.c-Gets-overwritten-workaround.patch new file +34 -0
@@ -0,0 +1,34 @@ +From 1c72f37cbea8c1bb98d438108558a4e222c5ce2b Mon Sep 17 00:00:00 2001 +From: Ulf Samuelsson <[email protected]> +Date: Sat, 13 Mar 2010 13:29:34 +0100 +Subject: [PATCH] libarm/board.c: Gets overwritten - workaround! + +U_BOOT_VERSION gets overwritten by something. +Workaround, but no fix for the problem, by +adding another variable which can get overwritten +without problems. + +Signed-off-by: Ulf Samuelsson <[email protected]> +--- + lib_arm/board.c | 5 +++-- + 1 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/lib_arm/board.c b/lib_arm/board.c +index e148739..379e39b 100644 +--- a/lib_arm/board.c ++++ b/lib_arm/board.c +@@ -74,8 +74,9 @@ extern void dataflash_print_info(void); + #define CONFIG_IDENT_STRING "" + #endif + +-const char version_string[] = +- U_BOOT_VERSION" (" U_BOOT_DATE " - " U_BOOT_TIME ")"CONFIG_IDENT_STRING; ++const char dummy[] = "Is this overwritten ?"; ++const char version_string[] = ++ U_BOOT_VERSION " (" U_BOOT_DATE " - " U_BOOT_TIME ")"CONFIG_IDENT_STRING; + + #ifdef CONFIG_DRIVER_RTL8019 + extern void rtl8019_get_enetaddr (uchar * addr); +-- +1.6.0.2 +
recipes/u-boot/u-boot-2009.11/at91/0007-fat.c-Add-DEBUG-currently-disabled.patch new file +26 -0
@@ -0,0 +1,26 @@ +From db9c87b27153d55cd1818d2f1a2772b8070b3715 Mon Sep 17 00:00:00 2001 +From: Ulf Samuelsson <[email protected]> +Date: Sat, 13 Mar 2010 13:32:40 +0100 +Subject: [PATCH] fat.c: Add DEBUG (currently disabled) + +Signed-off-by: Ulf Samuelsson <[email protected]> +--- + fs/fat/fat.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/fs/fat/fat.c b/fs/fat/fat.c +index 2445f1e..87e7f08 100644 +--- a/fs/fat/fat.c ++++ b/fs/fat/fat.c +@@ -24,7 +24,7 @@ + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ +- ++//#define DEBUG + #include <common.h> + #include <config.h> + #include <fat.h> +-- +1.6.0.2 +
recipes/u-boot/u-boot-2009.11/at91/0008-env_dataflash.c-More-robust-handling.patch new file +148 -0
148 lines not on this page · raw message
recipes/u-boot/u-boot-2009.11/at91/0009-cmd_debug.c-Add-a-generic-function-for-debug-vars.patch new file +168 -0
168 lines not on this page · raw message
recipes/u-boot/u-boot-2009.11/at91/0010-debug.h-Add-header-for-debug-variables.patch new file +60 -0
60 lines not on this page · raw message
recipes/u-boot/u-boot-2009.11/at91/0011-common-Makefile-Add-cmd_debug.c-to-build.patch new file +27 -0
@@ -0,0 +1,27 @@ +From 81c5954a3932d46de7db92c7314060a491e20063 Mon Sep 17 00:00:00 2001 +From: Ulf Samuelsson <[email protected]> +Date: Sun, 14 Mar 2010 00:12:35 +0100 +Subject: [PATCH] common/Makefile: Add cmd_debug.c to build + +Ensure cmd_debug.c is built if CONFIG_CMD_DEBUG is set + +Signed-off-by: Ulf Samuelsson <[email protected]> +--- + common/Makefile | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/common/Makefile b/common/Makefile +index 47f6a71..a827be8 100644 +--- a/common/Makefile ++++ b/common/Makefile +@@ -75,6 +75,7 @@ COBJS-$(CONFIG_CMD_CONSOLE) += cmd_console.o + COBJS-$(CONFIG_CMD_CPLBINFO) += cmd_cplbinfo.o + COBJS-$(CONFIG_DATAFLASH_MMC_SELECT) += cmd_dataflash_mmc_mux.o + COBJS-$(CONFIG_CMD_DATE) += cmd_date.o ++COBJS-$(CONFIG_CMD_DEBUG) += cmd_debug.o + ifdef CONFIG_4xx + COBJS-$(CONFIG_CMD_SETGETDCR) += cmd_dcr.o + endif +-- +1.6.0.2 +
recipes/u-boot/u-boot-2009.11/at91/0012-cmd_mci.c-Support-writing-out-AT91-mci-config.patch new file +100 -0
100 lines not on this page · raw message
recipes/u-boot/u-boot-2009.11/at91/0013-atmel_dataflash.c-Status-printout-depend-on-DEBUG.patch new file +59 -0
59 lines not on this page · raw message
recipes/u-boot/u-boot-2009.11/at91/0014-AT91-MCI-Add-support-for-SD-Card.patch new file +740 -0
740 lines not on this page · raw message
recipes/u-boot/u-boot-2009.11/at91/0015-sam9m10g45ek-Add-configuration-file.patch new file +113 -0
113 lines not on this page · raw message
recipes/u-boot/u-boot_2009.11.bb new file +41 -0
41 lines not on this page · raw message
Signature · 1 line
1.6.0.2
On Tue, 2010-03-16 at 22:32 +0100, Ulf Samuelsson wrote:
[snip]
Quoted 1 line
recipes/u-boot/u-boot_2009.11.bb +0
-0
[snip]
Quoted 1 line
+PR = "r1"
r0 to start with.
Quoted 1 line
+require u-boot.inc
And doesn't that give us...
recipes/u-boot/u-boot_2009.11.bb line 40
Quoted 8 lines
recipes/u-boot/u-boot_2009.11.bb +8
-0+TARGET_LDFLAGS = "" + +inherit base + +do_compile () { + oe_runmake ${UBOOT_MACHINE} + oe_runmake all +}
Also, missing checksums.
Signature · 2 lines
Tom Rini <[email protected]> Mentor Graphics Corporation