On Thu, Mar 29, 2012 at 2:24 AM, Martin Jansa <[email protected]> wrote:
> Signed-off-by: Martin Jansa <[email protected]>
> ---
> meta/classes/kernel.bbclass | 39 +++++++++++++++++++++++----------------
> 1 files changed, 23 insertions(+), 16 deletions(-)
>
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index 3519e7c..8cd5fc7 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -502,32 +502,39 @@ do_sizecheck() {
>
> addtask sizecheck before do_install after do_compile
>
> -KERNEL_IMAGE_BASE_NAME ?=
> "${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}-${DATETIME}"
> -# Don't include the DATETIME variable in the sstate package signatures
> -KERNEL_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME"
> -KERNEL_IMAGE_SYMLINK_NAME ?= "${KERNEL_IMAGETYPE}-${MACHINE}"
> -
> -kernel_do_deploy() {
> - install -m 0644 ${KERNEL_OUTPUT}
> ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
> - if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
> - tar -cvzf
> ${DEPLOYDIR}/modules-${KERNEL_VERSION}-${PR}-${MACHINE}.tgz -C ${D} lib
> - fi
> -
> +do_uboot_mkimage() {
> if test "x${KERNEL_IMAGETYPE}" = "xuImage" ; then
> - if test -e arch/${ARCH}/boot/uImage ; then
> - cp arch/${ARCH}/boot/uImage
> ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
We continually try and remove this, but it is a valid use case where some
people do want the kernel's uImage to be used and not regenerate it outside
of the kernel build process.
The last time this was discussed, it concluded that rather than making this
a simple test, we should do it via a flag .. and I'm still of the
opinion that would
be the right approach here. There's no reason to break either use case.
Cheers,
Bruce
> - elif test -e arch/${ARCH}/boot/compressed/vmlinux ; then
> + ENTRYPOINT=${UBOOT_ENTRYPOINT}
> + if test -n "${UBOOT_ENTRYSYMBOL}"; then
> + ENTRYPOINT=`${HOST_PREFIX}nm ${S}/vmlinux | \
> + awk '$3=="${UBOOT_ENTRYSYMBOL}" {print $1}'`
> + fi
> + 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
> ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
> + uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C
> none -a ${UBOOT_LOADADDRESS} -e $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
> ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
> + uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C
> gzip -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n
> "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin.gz arch/${ARCH}/boot/uImage
> rm -f linux.bin.gz
> fi
> fi
> +}
> +
> +addtask uboot_mkimage before do_install after do_compile
> +
> +KERNEL_IMAGE_BASE_NAME ?=
> "${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}-${DATETIME}"
> +# Don't include the DATETIME variable in the sstate package signatures
> +KERNEL_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME"
> +KERNEL_IMAGE_SYMLINK_NAME ?= "${KERNEL_IMAGETYPE}-${MACHINE}"
> +
> +kernel_do_deploy() {
> + install -m 0644 ${KERNEL_OUTPUT}
> ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
> + if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
> + tar -cvzf
> ${DEPLOYDIR}/modules-${KERNEL_VERSION}-${PR}-${MACHINE}.tgz -C ${D} lib
> + fi
>
> cd ${DEPLOYDIR}
> rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.bin
> --
> 1.7.8.5
>
>
> _______________________________________________
> Openembedded-core mailing list
> [email protected]
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
--
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core