[oe-commits] org.oe.dev linux.inc : change the generation of uImage to do_compile_append so that

xora commit openembedded-commits at lists.openembedded.org
Fri Nov 30 10:05:34 UTC 2007


linux.inc : change the generation of uImage to do_compile_append so that
the later stages like install/packaging/deploy can make use of this. This
was done so that kernel-image could contain a uImage but is suitable for
other cases as well.

Author: xora at openembedded.org
Branch: org.openembedded.dev
Revision: 0dbb48946ab15c0ee9c232d1a1fc31e5b65037cd
ViewMTN: http://monotone.openembedded.org/revision/info/0dbb48946ab15c0ee9c232d1a1fc31e5b65037cd
Files:
1
packages/linux/linux.inc
Diffs:

#
# mt diff -r80fd0955e80b2c63237b5f426d6a9eeee945bb87 -r0dbb48946ab15c0ee9c232d1a1fc31e5b65037cd
#
# 
# 
# patch "packages/linux/linux.inc"
#  from [12ee7627f507a1eb127802f7268674f901a357fc]
#    to [d6f662d0c2c24eea3b90b2d9c4fcc01f9ab6779f]
# 
============================================================
--- packages/linux/linux.inc	12ee7627f507a1eb127802f7268674f901a357fc
+++ packages/linux/linux.inc	d6f662d0c2c24eea3b90b2d9c4fcc01f9ab6779f
@@ -74,7 +74,7 @@ do_configure_prepend() {
                     -e '/CONFIG_CMDLINE=/d' \
                     -i ${S}/.config
                 echo "CONFIG_INET=y"                     >> ${S}/.config
-				echo "CONFIG_IP_PNP=y"                   >> ${S}/.config
+                echo "CONFIG_IP_PNP=y"                   >> ${S}/.config
                 echo "CONFIG_USB_GADGET=y"               >> ${S}/.config
                 echo "CONFIG_USB_GADGET_SELECTED=y"      >> ${S}/.config
                 echo "CONFIG_USB_ETH=y"                  >> ${S}/.config
@@ -97,22 +97,24 @@ do_sizecheck() {
         fi
 }
 
-do_install_prepend() {
-        if test -e arch/${ARCH}/boot/Image ; then
-             ln -f arch/${ARCH}/boot/Image arch/${ARCH}/boot/uImage
-        fi
+UBOOT_ENTRYPOINT ?= "20008000"
 
-        if test -e arch/${ARCH}/boot/images/uImage ; then
-             ln -f arch/${ARCH}/boot/images/uImage arch/${ARCH}/boot/uImage
+do_compile_append() {
+    if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then 
+        if test -e arch/${ARCH}/boot/compressed/vmlinux ; 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 arch/${ARCH}/boot/uImage
+            rm -f linux.bin
+        else
+            ${OBJCOPY} -O binary -R .note -R .comment -S vmlinux linux.bin
+            rm -f linux.bin.gz
+            gzip -9 linux.bin
+            uboot-mkimage -A ${ARCH} -O linux -T kernel -C gzip -a ${UBOOT_ENTRYPOINT} -e ${UBOOT_ENTRYPOINT} -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin.gz arch/${ARCH}/boot/uImage
+            rm -f linux.bin.gz
         fi
-
-        if test -e arch/${ARCH}/kernel/vmlinux.lds ; then
-             ln -f arch/${ARCH}/kernel/vmlinux.lds arch/${ARCH}/boot/vmlinux
-        fi
+    fi
 }
 
-UBOOT_ENTRYPOINT ?= "20008000"
-
 KERNEL_IMAGE_BASE_NAME = "${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}-${DATETIME}"
 KERNEL_IMAGE_SYMLINK_NAME = "${KERNEL_IMAGETYPE}-${MACHINE}"
 
@@ -120,24 +122,10 @@ 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 
-            if test -e arch/${ARCH}/boot/compressed/vmlinux ; 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}/uImage-${PV}-${PR}-${MACHINE}-${DATETIME}.bin
-                rm -f linux.bin
-            else
-                ${OBJCOPY} -O binary -R .note -R .comment -S vmlinux linux.bin
-                rm -f linux.bin.gz
-                gzip -9 linux.bin
-                uboot-mkimage -A ${ARCH} -O linux -T kernel -C gzip -a ${UBOOT_ENTRYPOINT} -e ${UBOOT_ENTRYPOINT} -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin.gz ${DEPLOY_DIR_IMAGE}/uImage-${PV}-${PR}-${MACHINE}-${DATETIME}.bin
-                rm -f linux.bin.gz
-            fi
-        fi
 
-		cd ${DEPLOY_DIR_IMAGE}
-		rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.bin
-		ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${KERNEL_IMAGE_SYMLINK_NAME}.bin
+        cd ${DEPLOY_DIR_IMAGE}
+        rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.bin
+        ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${KERNEL_IMAGE_SYMLINK_NAME}.bin
 }
 
 do_deploy[dirs] = "${S}"






More information about the Openembedded-commits mailing list