summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorMichael 'Mickey' Lauer <mickey@vanille-media.de>2009-02-13 01:28:41 +0100
committerMichael 'Mickey' Lauer <mickey@vanille-media.de>2009-02-13 01:28:54 +0100
commit329e712274b3ca2e8edb9716f1608a083ae3ed83 (patch)
tree8f537b0e7dfa49cf5808bc5a38d6719699d48589 /packages
parented0059d421f84310e6491305431293d382d8c5bc (diff)
qi: make it build working binaries
Diffstat (limited to 'packages')
-rw-r--r--packages/qi/files/sanitize-makefile.patch27
-rw-r--r--packages/qi/qi.inc55
-rw-r--r--packages/qi/qi_git.bb6
3 files changed, 62 insertions, 26 deletions
diff --git a/packages/qi/files/sanitize-makefile.patch b/packages/qi/files/sanitize-makefile.patch
new file mode 100644
index 0000000000..cd1abf3f58
--- /dev/null
+++ b/packages/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/packages/qi/qi.inc b/packages/qi/qi.inc
index ce28508fec..3de44ded0b 100644
--- a/packages/qi/qi.inc
+++ b/packages/qi/qi.inc
@@ -1,45 +1,52 @@
-DESCRIPTION = "Qi bootloader w/ Openmoko GTA02 and GTA03 support"
+DESCRIPTION = "Qi bootloader w/ Openmoko GTA01, GTA02, and GTA03 support"
LICENSE = "GPL"
SECTION = "bootloader"
PROVIDES = "virtual/bootloader"
LOCALVERSION = "gitr${SRCREV}"
-PV = "0.0.0+${LOCALVERSION}"
+PV = "1.0.0+${LOCALVERSION}"
EXTRA_OEMAKE = ""
PARALLEL_MAKE = ""
-BUILD_BRANCH ?= "master"
-
-QI_MACHINES = "s3c2442 s3c6410"
do_configure() {
echo >config.mk
- #sed -i s,@,, Makefile
+ # uncomment to debug
+# sed -i s,@,, Makefile
+ cat >config.mk <<EOF
+
+BUILD_HOST=\$(shell hostname)
+BUILD_VERSION=${PV}
+BUILD_DATE=\$(shell date)
+
+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=${CC}
+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 () {
- gccv=`${CC} -dumpversion`
- for mach in ${QI_MACHINES}
- do
- ${MAKE} clean
- ${MAKE} CPU=$mach \
- HOSTCC="${BUILD_CC}" \
- COMPILER_LIB_PATH="${CROSS_DIR}/lib/gcc/${TARGET_SYS}/$gccv/" \
- BUILD_BRANCH="master" \
- BUILD_HEAD="${LOCALVERSION}"
- cp -f image/qi-$mach* ${S}
- done
+do_compile() {
+ make clean && \
+ make CPU=s3c2442 && \
+ make CPU=s3c2410 && \
+ make CPU=s3c6410
}
do_deploy () {
install -d ${DEPLOY_DIR_IMAGE}
- for mach in ${QI_MACHINES}
- do
- cat qi-$mach-${BUILD_BRANCH}_${LOCALVERSION} >> qi-$mach-${BUILD_BRANCH}_${LOCALVERSION}.udfu
- install -m 0644 qi-$mach-${BUILD_BRANCH}_${LOCALVERSION}.udfu ${DEPLOY_DIR_IMAGE}/qi-$mach-${BUILD_BRANCH}-${PV}-${PR}.bin
- ln -sf ${DEPLOY_DIR_IMAGE}/qi-${mach}-${PV}-${PR}.bin ${DEPLOY_DIR_IMAGE}/qi-${mach}-${BUILD_BRANCH}-latest.bin
- done
+ 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
diff --git a/packages/qi/qi_git.bb b/packages/qi/qi_git.bb
index 37bf9af11f..968f688da4 100644
--- a/packages/qi/qi_git.bb
+++ b/packages/qi/qi_git.bb
@@ -1,7 +1,9 @@
require qi.inc
-BUILD_BRANCH = "master"
PR = "r0"
-SRC_URI = "git://git.openmoko.org/git/qi.git;protocol=git;branch=${BUILD_BRANCH}"
+SRC_URI = "\
+ git://git.openmoko.org/git/qi.git;protocol=git;branch=master \
+ file://sanitize-makefile.patch;patch=1 \
+"
S = "${WORKDIR}/git"