[oe] [PATCH] Automate uboot entry/load addresses detection.

Ihar Hrachyshka ihar.hrachyshka at gmail.com
Tue Mar 3 15:55:35 UTC 2009


Bumping the thread after a month of no activity...

On Tue, Feb 3, 2009 at 1:31 PM, Koen Kooi <k.kooi at student.utwente.nl> wrote:
> On 03-02-09 12:02, Ihar Hrachyshka wrote:
>>
>> Any chances for inclusion?
>
> It looks pretty good to me, but I'd like to hear from people that tested it
> :)
>
> regards,
>
> Koen
>
>
>> On Fri, Jan 30, 2009 at 2:37 PM, Ihar Hrachyshka
>> <ihar.hrachyshka at gmail.com>  wrote:
>>>
>>> Automated UBOOT_LOADADDRESS and UBOOT_ENTRYPOINT variables detection (no
>>> need to specify them for every machine and/or kernel now).
>>>
>>> Signed-off-by: Ihar Hrachyshka<ihar.hrachyshka at gmail.com>
>>> ---
>>>  classes/kernel.bbclass |    8 ++++----
>>>  1 files changed, 4 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass
>>> index d1f59e5..f7a7014 100644
>>> --- a/classes/kernel.bbclass
>>> +++ b/classes/kernel.bbclass
>>> @@ -69,10 +69,6 @@ KERNEL_LOCALVERSION ?= ""
>>>  # kernels are generally machine specific
>>>  PACKAGE_ARCH = "${MACHINE_ARCH}"
>>>
>>> -# U-Boot support
>>> -UBOOT_ENTRYPOINT ?= "20008000"
>>> -UBOOT_LOADADDRESS ?= "${UBOOT_ENTRYPOINT}"
>>> -
>>>  kernel_do_compile() {
>>>        if [ ! -z "${INITRAMFS_IMAGE}" ]; then
>>>                cp
>>> "${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.cpio.gz"
>>> initramfs.cpio.gz
>>> @@ -489,12 +485,16 @@ 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_LOADADDRESS=`${OBJDUMP} -p
>>> arch/${ARCH}/boot/compressed/vmlinux | sed -n 's/LOAD.*vaddr \([^
>>> ]*\).*/\1/p'`; \
>>> +                       UBOOT_ENTRYPOINT=`${OBJDUMP} -f
>>> arch/${ARCH}/boot/compressed/vmlinux | sed -n 's/.*start address \([^
>>> ]*\).*/\1/p'`; \
>>>                        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}/${KERNEL_IMAGE_BASE_NAME}.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_LOADADDRESS=`${OBJDUMP} -p vmlinux | sed -n
>>> 's/LOAD.*vaddr \([^ ]*\).*/\1/p'`; \
>>> +                       UBOOT_ENTRYPOINT=`${OBJDUMP} -f vmlinux | sed -n
>>> 's/.*start address \([^ ]*\).*/\1/p'`; \
>>>                        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}/${KERNEL_IMAGE_BASE_NAME}.bin
>>>                        rm -f linux.bin.gz
>>>                fi
>>> --
>>> 1.5.6.3
>>>
>>>
>>>
>
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>




More information about the Openembedded-devel mailing list