aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/u-boot
diff options
context:
space:
mode:
authorFrans Meulenbroeks <fransmeulenbroeks@gmail.com>2011-12-27 20:55:04 +0100
committerFrans Meulenbroeks <fransmeulenbroeks@gmail.com>2011-12-27 20:55:04 +0100
commite20e9594d284b2faa2b6ce423584f92a2d2c0800 (patch)
tree87ecb2ab43741d1de8a9a5e2caf1489665a60689 /recipes/u-boot
parent38c962e6f0adbc4154cda3107404e8ce92cfbccb (diff)
downloadopenembedded-e20e9594d284b2faa2b6ce423584f92a2d2c0800.tar.gz
u-boot: added 2011.03; also added building of tools
In Aug 2010 the building of u-boot utils (fw_printenv, fw_setenv) changed Since then they are build using HOSTCC, which does not really give a good target image. After discussion with Wolfgang Denk and backreading the u-boot mailing list, I opted to redefine HOSTCC in the recipe when building env That way we can get u-boot tools on the target (btw, there is a recipe u-boot-utils_1.2.0.bb but that uses a highly outdated version of u-boot mkimage that does not support FIT (Flattended Image Tree) images) (FIT image are quite useful on powerpc if one wants to build a blob that contains both a uimage and a device tree) I've been using this version of u-boot on mpc8313 for more than half a year and FIT images for about 4 months. BTW: wrt the patch to fw_env.h: The ifndefs are needed to actually compile the tools. The changed constants are values that are more common nowadays (16 k flash pages is probably not too common; 128K is way more common) (one probably wants to change this for a specific machine anyway). Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/u-boot')
-rw-r--r--recipes/u-boot/u-boot-2011.03/tools_fwenv.patch48
-rw-r--r--recipes/u-boot/u-boot_2011.03.bb5
2 files changed, 51 insertions, 2 deletions
diff --git a/recipes/u-boot/u-boot-2011.03/tools_fwenv.patch b/recipes/u-boot/u-boot-2011.03/tools_fwenv.patch
new file mode 100644
index 0000000000..8e87800091
--- /dev/null
+++ b/recipes/u-boot/u-boot-2011.03/tools_fwenv.patch
@@ -0,0 +1,48 @@
+Index: u-boot-2011.03/tools/env/fw_env.h
+===================================================================
+--- u-boot-2011.03.orig/tools/env/fw_env.h 2011-03-31 23:45:36.000000000 +0200
++++ u-boot-2011.03/tools/env/fw_env.h 2011-12-02 13:55:24.667278362 +0100
+@@ -27,25 +27,35 @@
+ * See included "fw_env.config" sample file (TRAB board)
+ * for notes on configuration.
+ */
+-#define CONFIG_FILE "/etc/fw_env.config"
++//#define CONFIG_FILE "/etc/fw_env.config"
++
++#include "config.h"
+
+ #define HAVE_REDUND /* For systems with 2 env sectors */
+-#define DEVICE1_NAME "/dev/mtd1"
+-#define DEVICE2_NAME "/dev/mtd2"
++#define DEVICE1_NAME "/dev/mtd0"
++#define DEVICE2_NAME "/dev/mtd0"
+ #define DEVICE1_OFFSET 0x0000
+-#define ENV1_SIZE 0x4000
+-#define DEVICE1_ESIZE 0x4000
+-#define DEVICE2_OFFSET 0x0000
+-#define ENV2_SIZE 0x4000
+-#define DEVICE2_ESIZE 0x4000
++#define ENV1_SIZE 0x2000
++#define DEVICE1_ESIZE 0x20000
++#define DEVICE1_ENVSECTORS 1
++#define DEVICE2_OFFSET 0x20000
++#define ENV2_SIZE 0x2000
++#define DEVICE2_ESIZE 0x20000
++#define DEVICE2_ENVSECTORS 1
+
++#ifndef CONFIG_BAUDRATE
+ #define CONFIG_BAUDRATE 115200
++#endif
++#ifndef CONFIG_BOOTDELAY
+ #define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */
++#endif
++#ifndef CONFIG_BOOTCOMMAND
+ #define CONFIG_BOOTCOMMAND \
+ "bootp; " \
+ "setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} " \
+ "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; " \
+ "bootm"
++#endif
+
+ extern int fw_printenv(int argc, char *argv[]);
+ extern char *fw_getenv (char *name);
diff --git a/recipes/u-boot/u-boot_2011.03.bb b/recipes/u-boot/u-boot_2011.03.bb
index ac609cdbe8..57f2259af1 100644
--- a/recipes/u-boot/u-boot_2011.03.bb
+++ b/recipes/u-boot/u-boot_2011.03.bb
@@ -4,11 +4,11 @@ require u-boot.inc
DEFAULT_PREFERENCE = "-1"
DEFAULT_PREFERENCE_overo = "1"
-SRC_URI = "ftp://ftp.denx.de/pub/u-boot/u-boot-${PV}.tar.bz2 "
+SRC_URI = "ftp://ftp.denx.de/pub/u-boot/u-boot-${PV}.tar.bz2 \
+ file://tools_fwenv.patch"
SRC_URI[md5sum] = "91d02124c94368557d0e9ac05fb8c33f"
SRC_URI[sha256sum] = "08677f66d8d4ee542f6599f580cdffdf730544e1803f9d3739117d6f6d68083e"
-
TARGET_LDFLAGS = ""
inherit base
@@ -16,5 +16,6 @@ inherit base
do_compile () {
oe_runmake ${UBOOT_MACHINE}
oe_runmake all
+ oe_runmake 'HOSTCC=${CC}' env
}