summaryrefslogtreecommitdiff
path: root/recipes/linux/gumstix-linux.inc
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/linux/gumstix-linux.inc
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/linux/gumstix-linux.inc')
-rw-r--r--recipes/linux/gumstix-linux.inc74
1 files changed, 74 insertions, 0 deletions
diff --git a/recipes/linux/gumstix-linux.inc b/recipes/linux/gumstix-linux.inc
new file mode 100644
index 0000000000..50111cb545
--- /dev/null
+++ b/recipes/linux/gumstix-linux.inc
@@ -0,0 +1,74 @@
+DESCRIPTION = "Linux kernel for custom configurations"
+SECTION = "kernel"
+LICENSE = "GPL"
+PR = "r1"
+
+inherit kernel
+
+DEPENDS += " \
+ u-boot-mkimage-openmoko-native \
+ "
+
+KERNEL_IMAGE_BASE_NAME = ${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}
+
+S = "${WORKDIR}/linux-${PV}"
+do_deploy[dirs] = "${S}"
+
+do_configure_prepend() {
+ echo "" > ${S}/.config
+
+ if [ "${TARGET_OS}" == "linux-gnueabi" -o "${TARGET_OS}" == "linux-uclibcgnueabi" ]; then
+ echo "CONFIG_AEABI=y" >> ${S}/.config
+ echo "CONFIG_OABI_COMPAT=y" >> ${S}/.config
+ else
+ echo "# CONFIG_AEABI is not set" >> ${S}/.config
+ echo "# CONFIG_OABI_COMPAT is not set" >> ${S}/.config
+ fi
+
+ echo "CONFIG_CMDLINE=\"${CMDLINE}\"" >> ${S}/.config
+
+ sed -e '/CONFIG_AEABI/d' \
+ -e '/CONFIG_OABI_COMPAT=/d' \
+ -e '/CONFIG_CMDLINE=/d' \
+ < '${WORKDIR}/defconfig' >>'${S}/.config'
+
+ yes '' | oe_runmake oldconfig
+}
+
+do_sizecheck() {
+ if [ ! -z "${KERNEL_IMAGE_MAXSIZE}" ]; then
+ size=`ls -l arch/${ARCH}/boot/${KERNEL_IMAGETYPE} | awk '{ print $5}'`
+ if [ $size -ge ${KERNEL_IMAGE_MAXSIZE} ]; then
+ rm arch/${ARCH}/boot/${KERNEL_IMAGETYPE}
+ die "This kernel (size=$size) is too big for your device. Please reduce the size of the kernel by making more of it modular."
+ fi
+ fi
+}
+
+do_install_prepend() {
+ if test -e arch/${ARCH}/boot/Image ; then
+ ln -f arch/${ARCH}/boot/Image arch/${ARCH}/boot/uImage
+ fi
+
+ if test -e arch/${ARCH}/boot/images/uImage ; then
+ ln -f arch/${ARCH}/boot/images/uImage arch/${ARCH}/boot/uImage
+ fi
+}
+
+do_deploy() {
+ install -d ${DEPLOY_DIR_IMAGE}
+ install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}.bin
+ tar -cvzf ${DEPLOY_DIR_IMAGE}/modules-${KERNEL_RELEASE}-${PR}-${MACHINE}.tgz -C ${D} lib
+
+ if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then
+ ${OBJCOPY} -O binary -R .note -R .comment -S arch/${ARCH}/boot/compressed/vmlinux linux.bin
+ uboot-mkimage -A ${ARCH} -O linux -T kernel -C none -a ${UBOOT_ENTRYPOINT} -e ${UBOOT_ENTRYPOINT} -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE_BASE_NAME}.bin
+ rm -f linux.bin
+
+ fi
+}
+
+addtask sizecheck before do_install after do_compile
+addtask deploy before do_package after do_install
+
+