[oe-commits] org.oe.dev uboot: OS native utils for accessing the boot environment vars.
awilcox commit
openembedded-commits at lists.openembedded.org
Thu Dec 7 19:42:16 UTC 2006
uboot: OS native utils for accessing the boot environment vars.
Author: awilcox at openembedded.org
Branch: org.openembedded.dev
Revision: a1d187a68d0d5b5271cf304de0ee3e2cf9528118
ViewMTN: http://monotone.openembedded.org/revision.psp?id=a1d187a68d0d5b5271cf304de0ee3e2cf9528118
Files:
1
packages/uboot-utils
packages/uboot-utils/env-Makefile.patch
packages/uboot-utils/fw_env.c.patch
packages/uboot-utils/fw_env.h.patch
packages/uboot-utils/tools-Makefile.patch
packages/uboot-utils/uboot-utils_1.1.2.bb
Diffs:
#
# mt diff -rf3f92e60f4a8e3b853e62130e37db4bd1a89f0fe -ra1d187a68d0d5b5271cf304de0ee3e2cf9528118
#
#
#
# add_dir "packages/uboot-utils"
#
# add_file "packages/uboot-utils/env-Makefile.patch"
# content [e3822526b16e32cf8162168cfedf194aad7d1dee]
#
# add_file "packages/uboot-utils/fw_env.c.patch"
# content [b89726621ad69615e10c7a11fd4529141fe3b5b1]
#
# add_file "packages/uboot-utils/fw_env.h.patch"
# content [bf83c2c595418e7871c5779e17b9e917ec906745]
#
# add_file "packages/uboot-utils/tools-Makefile.patch"
# content [c3893c38e489bd9d00b9a8c164651e7782a39727]
#
# add_file "packages/uboot-utils/uboot-utils_1.1.2.bb"
# content [6749826226f55feb5dbe7d69357805eac68f80fa]
#
============================================================
--- packages/uboot-utils/env-Makefile.patch e3822526b16e32cf8162168cfedf194aad7d1dee
+++ packages/uboot-utils/env-Makefile.patch e3822526b16e32cf8162168cfedf194aad7d1dee
@@ -0,0 +1,24 @@
+--- u-boot-1.1.2.orig/tools/env/Makefile 2003-06-27 14:32:48.000000000 -0700
++++ u-boot-1.1.2/tools/env/Makefile 2006-11-08 12:33:43.000000000 -0800
+@@ -27,7 +27,7 @@
+ all: fw_printenv
+
+ fw_printenv: $(SOURCES) $(HEADERS)
+- $(CROSS_COMPILE)gcc -Wall -DUSE_HOSTCC $(SOURCES) -o fw_printenv
++ $(CROSS_COMPILE)gcc $(TARGET_CFLAGS) -idirafter ../../include -Wall -DUSE_HOSTCC $(SOURCES) -o fw_printenv
+
+ clean:
+ rm -f fw_printenv crc32.c
+@@ -37,9 +37,9 @@
+
+ #########################################################################
+
+-.depend: Makefile $(SOURCES)
+- $(CC) -M $(HOST_CFLAGS) $(CPPFLAGS) -DUSE_HOSTCC $(SOURCES) > $@
++#.depend: Makefile $(SOURCES)
++# $(CC) -M $(HOST_CFLAGS) $(TARGET_CPPFLAGS) -DUSE_HOSTCC $(SOURCES) > $@
+
+-sinclude .depend
++#sinclude .depend
+
+ #########################################################################
============================================================
--- packages/uboot-utils/fw_env.c.patch b89726621ad69615e10c7a11fd4529141fe3b5b1
+++ packages/uboot-utils/fw_env.c.patch b89726621ad69615e10c7a11fd4529141fe3b5b1
@@ -0,0 +1,13 @@
+--- u-boot-1.1.2.orig/tools/env/fw_env.c 2004-12-31 01:32:54.000000000 -0800
++++ u-boot-1.1.2/tools/env/fw_env.c 2006-11-08 12:43:41.000000000 -0800
+@@ -31,7 +31,9 @@
+ #include <sys/ioctl.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
+-#include <linux/mtd/mtd.h>
++#include <stdint.h>
++#include <mtd/mtd-abi.h>
++#include <mtd/mtd-user.h>
+ #include "fw_env.h"
+
+ typedef unsigned char uchar;
============================================================
--- packages/uboot-utils/fw_env.h.patch bf83c2c595418e7871c5779e17b9e917ec906745
+++ packages/uboot-utils/fw_env.h.patch bf83c2c595418e7871c5779e17b9e917ec906745
@@ -0,0 +1,24 @@
+--- u-boot-1.1.2.orig/tools/env/fw_env.h 2003-06-27 14:32:49.000000000 -0700
++++ u-boot-1.1.2/tools/env/fw_env.h 2006-11-16 10:51:01.000000000 -0800
+@@ -27,14 +27,15 @@
+ * See included "fw_env.config" sample file (TRAB board)
+ * for notes on configuration.
+ */
+-#define CONFIG_FILE "/etc/fw_env.config"
+
+-#define HAVE_REDUND /* For systems with 2 env sectors */
+-#define DEVICE1_NAME "/dev/mtd1"
++/* #define CONFIG_FILE "/etc/fw_env.config" */
++
++#undef HAVE_REDUND /* For systems with 2 env sectors */
++#define DEVICE1_NAME "/dev/mtd/3"
+ #define DEVICE2_NAME "/dev/mtd2"
+-#define DEVICE1_OFFSET 0x0000
+-#define ENV1_SIZE 0x4000
+-#define DEVICE1_ESIZE 0x4000
++#define DEVICE1_OFFSET 0x30000
++#define ENV1_SIZE 0x10000
++#define DEVICE1_ESIZE 0x10000
+ #define DEVICE2_OFFSET 0x0000
+ #define ENV2_SIZE 0x4000
+ #define DEVICE2_ESIZE 0x4000
============================================================
--- packages/uboot-utils/tools-Makefile.patch c3893c38e489bd9d00b9a8c164651e7782a39727
+++ packages/uboot-utils/tools-Makefile.patch c3893c38e489bd9d00b9a8c164651e7782a39727
@@ -0,0 +1,19 @@
+--- u-boot-1.1.2.orig/tools/Makefile 2004-09-28 14:39:46.000000000 -0700
++++ u-boot-1.1.2/tools/Makefile 2006-11-08 11:07:18.000000000 -0800
+@@ -56,7 +56,7 @@
+ HOSTOS := $(shell uname -s | tr A-Z a-z | \
+ sed -e 's/\(cygwin\).*/cygwin/')
+
+-TOOLSUBDIRS =
++TOOLSUBDIRS = env
+
+ #
+ # Mac OS X / Darwin's C preprocessor is Apple specific. It
+@@ -176,6 +176,7 @@
+ else
+ @for dir in $(TOOLSUBDIRS) ; do \
+ $(MAKE) \
++ CROSS_COMPILE=$(CROSS_COMPILE) \
+ HOSTOS=$(HOSTOS) \
+ HOSTARCH=$(HOSTARCH) \
+ HOST_CFLAGS="$(HOST_CFLAGS)" \
============================================================
--- packages/uboot-utils/uboot-utils_1.1.2.bb 6749826226f55feb5dbe7d69357805eac68f80fa
+++ packages/uboot-utils/uboot-utils_1.1.2.bb 6749826226f55feb5dbe7d69357805eac68f80fa
@@ -0,0 +1,33 @@
+DESCRIPTION = "U-boot bootloader OS env. access tools for PPC"
+PRIORITY = "optional"
+LICENSE = "GPL"
+DEPENDS = "mtd-utils"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${PN}/u-boot-${PV}.tar.bz2 \
+ file://fw_env.h.patch;patch=1 \
+ file://fw_env.c.patch;patch=1 \
+ file://tools-Makefile.patch;patch=1 \
+ file://env-Makefile.patch;patch=1 "
+
+S = "${WORKDIR}/u-boot-${PV}"
+EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}"
+TARGET_LDFLAGS = ""
+
+UBOOT_MACHINE ?= "${MACHINE}_config"
+
+inherit base
+
+do_configure() {
+ :
+}
+
+do_compile () {
+ oe_runmake Sandpoint8240_config
+ oe_runmake tools
+}
+
+do_install () {
+ install -d ${D}/sbin
+ install -m 755 ${S}/tools/env/fw_printenv ${D}/sbin/fw_printenv
+ install -m 755 ${S}/tools/env/fw_printenv ${D}/sbin/fw_setenv
+}
More information about the Openembedded-commits
mailing list