[oe-commits] Martin Jansa : qi-ubi: add qi variant with UBI enabled in kernel params

git version control git at git.openembedded.org
Wed Jan 6 18:12:57 UTC 2010


Module: openembedded.git
Branch: martin_jansa/srcpv
Commit: f34f361fe779e817cf6e44680be4a9820ee88018
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=f34f361fe779e817cf6e44680be4a9820ee88018

Author: Martin Jansa <Martin.Jansa at gmail.com>
Date:   Tue Jan  5 14:01:36 2010 +0100

qi-ubi: add qi variant with UBI enabled in kernel params

Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>

---

 conf/distro/include/sane-srcrevs.inc               |    1 +
 ...ernel-params-to-boot-from-ubifs-ubi0-om-g.patch |   28 ++++++++++++++++++++
 recipes/qi/qi-ubi_git.bb                           |   10 +++++++
 recipes/qi/qi.inc                                  |    5 +--
 recipes/qi/qi_git.bb                               |    1 +
 5 files changed, 42 insertions(+), 3 deletions(-)

diff --git a/conf/distro/include/sane-srcrevs.inc b/conf/distro/include/sane-srcrevs.inc
index 579387e..3cddffd 100644
--- a/conf/distro/include/sane-srcrevs.inc
+++ b/conf/distro/include/sane-srcrevs.inc
@@ -279,6 +279,7 @@ SRCREV_pn-qemu ?= "${QEMUSRCREV}"
 SRCREV_pn-qemu-native ?= "${QEMUSRCREV}"
 SRCREV_pn-qemu-sdk ?= "${QEMUSRCREV}"
 SRCREV_pn-qi ?= "c38b062a609f1442e6a9e13005cfbdfd59a5ac0d"
+SRCREV_pn-qi-ubi ?= "c38b062a609f1442e6a9e13005cfbdfd59a5ac0d"
 SRCREV_pn-remoko ?= "148"
 SRCREV_pn-remoko-server ?= "148"
 SRCREV_pn-s3c24xx-gpio ?= "4949"
diff --git a/recipes/qi/files/0002-gta02-add-kernel-params-to-boot-from-ubifs-ubi0-om-g.patch b/recipes/qi/files/0002-gta02-add-kernel-params-to-boot-from-ubifs-ubi0-om-g.patch
new file mode 100644
index 0000000..d2e7517
--- /dev/null
+++ b/recipes/qi/files/0002-gta02-add-kernel-params-to-boot-from-ubifs-ubi0-om-g.patch
@@ -0,0 +1,28 @@
+From 843dbaa59d56b7c042662f48ed68bd41960635dd Mon Sep 17 00:00:00 2001
+From: Martin Jansa <Martin.Jansa at gmail.com>
+Date: Tue, 5 Jan 2010 12:44:25 +0100
+Subject: [PATCH 2/2] gta02: add kernel params to boot from ubifs ubi0:om-gta02-rootfs
+
+---
+ src/cpu/s3c2442/gta02.c |    5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/cpu/s3c2442/gta02.c b/src/cpu/s3c2442/gta02.c
+index 0347f61..48ee245 100644
+--- a/src/cpu/s3c2442/gta02.c
++++ b/src/cpu/s3c2442/gta02.c
+@@ -733,8 +733,9 @@ const struct board_api board_api_gta02 = {
+ 			/* NOTE offset below is replaced at runtime */
+ 			.offset_blocks512_if_no_partition = 0x80000 / 512,
+ 			.filesystem = FS_RAW,
+-			.commandline_append = " rootfstype=jffs2 "
+-					      "root=/dev/mtdblock6 ",
++			.commandline_append = " rootfstype=ubifs " \
++			                      " ubi.mtd=6,2048 " \
++			                      " root=ubi0:om-gta02-rootfs ",
+ 		},
+ 	},
+ };
+-- 
+1.6.6
+
diff --git a/recipes/qi/qi-ubi_git.bb b/recipes/qi/qi-ubi_git.bb
new file mode 100644
index 0000000..fb8bbe0
--- /dev/null
+++ b/recipes/qi/qi-ubi_git.bb
@@ -0,0 +1,10 @@
+require qi_git.bb
+
+do_configure_prepend() {
+  sed -i 's#\(IMAGE = .(IMAGE_DIR)/\)qi-\(.(CPU)-.(BUILD_VERSION)\)#\1qi-ubi-\2#g' ${S}/Makefile
+  sed -i 's#\(UDFU_IMAGE = .(IMAGE_DIR)/\)qi-\(.(CPU)-.(BUILD_VERSION).udfu\)#\1qi-ubi-\2#g' ${S}/Makefile
+}
+
+SRC_URI_append = "\
+  file://0002-gta02-add-kernel-params-to-boot-from-ubifs-ubi0-om-g.patch;patch=1 \
+"
diff --git a/recipes/qi/qi.inc b/recipes/qi/qi.inc
index f944390..05cf144 100644
--- a/recipes/qi/qi.inc
+++ b/recipes/qi/qi.inc
@@ -2,8 +2,7 @@ DESCRIPTION = "Qi bootloader w/ Openmoko GTA01, GTA02, and GTA03 support"
 LICENSE = "GPL"
 SECTION = "bootloader"
 PROVIDES = "virtual/bootloader"
-LOCALVERSION = "gitr${SRCREV}"
-PV = "1.0.2+${LOCALVERSION}"
+PV = "1.0.2"
 
 EXTRA_OEMAKE = ""
 PARALLEL_MAKE = ""
@@ -15,7 +14,7 @@ do_configure() {
 	cat >config.mk <<EOF
 
 BUILD_HOST=\$(shell hostname)
-BUILD_VERSION=${PV}
+BUILD_VERSION=${PV}-${PR}
 BUILD_DATE=\$(shell date --iso-8601=seconds)
 
 # NOTE: The following depends on the fact that only one version of the cross-compiler
diff --git a/recipes/qi/qi_git.bb b/recipes/qi/qi_git.bb
index 968f688..3364054 100644
--- a/recipes/qi/qi_git.bb
+++ b/recipes/qi/qi_git.bb
@@ -1,5 +1,6 @@
 require qi.inc
 PR = "r0"
+PR_append = "+gitr${SRCREV}"
 
 SRC_URI = "\
   git://git.openmoko.org/git/qi.git;protocol=git;branch=master \





More information about the Openembedded-commits mailing list