[oe-commits] org.oe.dev kernel.bbclass: fix generation of uImage on powerpc platforms
jeremy_laine commit
oe at amethyst.openembedded.net
Fri Mar 28 17:59:34 UTC 2008
kernel.bbclass: fix generation of uImage on powerpc platforms
* add a map_uboot_arch function to kernel.bbclass which changes
"powerpc" to "ppc" and export UBOOT_ARCH
* pass -A ${UBOOT_ARCH} instead of -A ${ARCH} to mkimage in kernel.bbclass
Author: jeremy_laine at openembedded.org
Branch: org.openembedded.dev
Revision: 8ee010aff1f0de5c118b6b85b253a966b0d7af82
ViewMTN: http://monotone.openembedded.org/revision/info/8ee010aff1f0de5c118b6b85b253a966b0d7af82
Files:
1
classes/kernel-arch.bbclass
classes/kernel.bbclass
Diffs:
#
# mt diff -r5b6dcfdf9baa0245dd7475bb40c1ffec9aa2b753 -r8ee010aff1f0de5c118b6b85b253a966b0d7af82
#
#
#
# patch "classes/kernel-arch.bbclass"
# from [bc087fcf76549ca28fef463566ac9a3f46a3d703]
# to [a483a48991725bddaa414801e036e80ca754b603]
#
# patch "classes/kernel.bbclass"
# from [b6e05ecebbfd152cbd0c654bcea62bbcf8f18352]
# to [56eee918e2285b8298e9e2feecc353c0723683aa]
#
============================================================
--- classes/kernel-arch.bbclass bc087fcf76549ca28fef463566ac9a3f46a3d703
+++ classes/kernel-arch.bbclass a483a48991725bddaa414801e036e80ca754b603
@@ -30,3 +30,11 @@ export ARCH = "${@map_kernel_arch(bb.dat
bb.error("cannot map '%s' to a linux kernel architecture" % a)
export ARCH = "${@map_kernel_arch(bb.data.getVar('TARGET_ARCH', d, 1), d)}"
+
+def map_uboot_arch(a, d):
+ if a == "powerpc":
+ return "ppc"
+ return a
+
+export UBOOT_ARCH = "${@map_uboot_arch(bb.data.getVar('ARCH', d, 1), d)}"
+
============================================================
--- classes/kernel.bbclass b6e05ecebbfd152cbd0c654bcea62bbcf8f18352
+++ classes/kernel.bbclass 56eee918e2285b8298e9e2feecc353c0723683aa
@@ -475,13 +475,13 @@ do_deploy() {
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_LOADADDRESS} -e ${UBOOT_ENTRYPOINT} -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin ${DEPLOY_DIR_IMAGE}/uImage-${PV}-${PR}-${MACHINE}.bin
+ uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C none -a ${UBOOT_LOADADDRESS} -e ${UBOOT_ENTRYPOINT} -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin ${DEPLOY_DIR_IMAGE}/uImage-${PV}-${PR}-${MACHINE}.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_LOADADDRESS} -e ${UBOOT_ENTRYPOINT} -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin.gz ${DEPLOY_DIR_IMAGE}/uImage-${PV}-${PR}-${MACHINE}.bin
+ uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C gzip -a ${UBOOT_LOADADDRESS} -e ${UBOOT_ENTRYPOINT} -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin.gz ${DEPLOY_DIR_IMAGE}/uImage-${PV}-${PR}-${MACHINE}.bin
rm -f linux.bin.gz
fi
package_stagefile_shell ${DEPLOY_DIR_IMAGE}/uImage-${PV}-${PR}-${MACHINE}.bin
More information about the Openembedded-commits
mailing list