summaryrefslogtreecommitdiff
path: root/recipes/qi
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/qi
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/qi')
-rw-r--r--recipes/qi/files/sanitize-makefile.patch27
-rw-r--r--recipes/qi/qi.inc56
-rw-r--r--recipes/qi/qi_git.bb9
3 files changed, 92 insertions, 0 deletions
diff --git a/recipes/qi/files/sanitize-makefile.patch b/recipes/qi/files/sanitize-makefile.patch
new file mode 100644
index 0000000000..cd1abf3f58
--- /dev/null
+++ b/recipes/qi/files/sanitize-makefile.patch
@@ -0,0 +1,27 @@
+Index: git/Makefile
+===================================================================
+--- git.orig/Makefile
++++ git/Makefile
+@@ -16,12 +16,6 @@
+
+ include config.mk
+
+-BUILD_DATE := $(shell date)
+-BUILD_HOST := $(shell hostname)
+-BUILD_BRANCH := $(shell git branch | grep ^\* | cut -d' ' -f2)
+-BUILD_HEAD := $(shell git show --pretty=oneline | head -n1 | cut -d' ' -f1 | cut -b1-16)
+-BUILD_VERSION := ${BUILD_BRANCH}_${BUILD_HEAD}
+-
+ LDS = src/cpu/$(CPU)/qi.lds
+ INCLUDE = include
+ IMAGE_DIR = image
+@@ -73,7 +67,7 @@ all:${UDFU_IMAGE}
+ ${OBJS}:${SRCS} ${INCLUDE}/*.h
+
+ ${MKUDFU}:
+- make -C $(TOOLS)
++ gcc tools/mkudfu.c -o ${MKUDFU} -Itools/
+
+ ${UDFU_IMAGE}:${OBJS} ${MKUDFU}
+ mkdir -p image
+
diff --git a/recipes/qi/qi.inc b/recipes/qi/qi.inc
new file mode 100644
index 0000000000..949a011463
--- /dev/null
+++ b/recipes/qi/qi.inc
@@ -0,0 +1,56 @@
+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}"
+
+EXTRA_OEMAKE = ""
+PARALLEL_MAKE = ""
+
+do_configure() {
+ echo >config.mk
+ # uncomment to debug
+ sed -i s,@,, Makefile
+ cat >config.mk <<EOF
+
+BUILD_HOST=\$(shell hostname)
+BUILD_VERSION=${PV}
+BUILD_DATE=\$(shell date)
+
+# NOTE: The following depends on the fact that only one version of the cross-compiler
+# has been built. If it bails out with something like: "| arm-linux-ld: 4.3.3: No such file or directory"
+# then you need to remove all previously built toolchain directories out of the cross library path.
+GCCV="`${CC} -dumpversion`"
+COMPILER_LIB_PATH_PRE=${CROSS_DIR}/lib/gcc/${TARGET_SYS}/$(GCCV)
+COMPILER_LIB_PATH=\$(COMPILER_LIB_PATH_PRE)/\$(shell ls \$(COMPILER_LIB_PATH_PRE))
+
+AS=${AS}
+LD=${LD}
+CC=${HOST_PREFIX}gcc
+OBJCOPY=${OBJCOPY}
+OBJDUMP=${OBJDUMP}
+HOSTCC=${BUILD_CC}
+
+export HOSTCC BUILD_HOST BUILD_VERSION BUILD_DATE CROSS_COMPILE AD LD CC OBJCOPY OBJDUMP MKUDFU
+EOF
+}
+
+do_compile() {
+ make clean && \
+ make CPU=s3c2442 && \
+ make CPU=s3c2410 && \
+ make CPU=s3c6410
+}
+
+do_deploy () {
+ install -d ${DEPLOY_DIR_IMAGE}
+ cp -f image/qi-*.udfu ${DEPLOY_DIR_IMAGE}
+}
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+do_deploy[dirs] = "${S}"
+addtask deploy before do_package after do_install
+addtask quilt before do_patch after do_unpack
+addtask svnrev before do_patch after do_quilt
diff --git a/recipes/qi/qi_git.bb b/recipes/qi/qi_git.bb
new file mode 100644
index 0000000000..968f688da4
--- /dev/null
+++ b/recipes/qi/qi_git.bb
@@ -0,0 +1,9 @@
+require qi.inc
+PR = "r0"
+
+SRC_URI = "\
+ git://git.openmoko.org/git/qi.git;protocol=git;branch=master \
+ file://sanitize-makefile.patch;patch=1 \
+"
+S = "${WORKDIR}/git"
+