All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] Fix uImage generation in way compatible with kernel.bbclass
@ 2007-11-28 11:47 Graeme Gregory
  2007-11-28 13:43 ` Koen Kooi
  2007-11-29 11:29 ` Graeme Gregory
  0 siblings, 2 replies; 8+ messages in thread
From: Graeme Gregory @ 2007-11-28 11:47 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 4624 bytes --]

I would like to do the attached patch to linux.inc to change uImage
generation so it is compatible with the way kernel.bbclass does things.

This means the uImage ends up in kernel-image not some random file
called uImage but not really a uImage.

koen said the do_install_prepend stuff was to work around vendor bugs
and is no longer needed in this file.

Thanks

Graeme
#
# old_revision [1e4ef7149831080d7927cc7ef101deab67fae6d7]
#
# patch "packages/linux/linux.inc"
#  from [14e3b9590c6a3ef9334959ab19c1b24b1954b55b]
#    to [46987c309dbee09b17a0f857b8163a862cadd4d8]
#
============================================================
--- packages/linux/linux.inc	14e3b9590c6a3ef9334959ab19c1b24b1954b55b
+++ packages/linux/linux.inc	46987c309dbee09b17a0f857b8163a862cadd4d8
@@ -66,7 +66,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
@@ -89,22 +89,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}"
 
@@ -112,24 +114,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}"

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RFC] Fix uImage generation in way compatible with kernel.bbclass
  2007-11-28 11:47 [RFC] Fix uImage generation in way compatible with kernel.bbclass Graeme Gregory
@ 2007-11-28 13:43 ` Koen Kooi
  2007-11-28 14:32   ` Graeme Gregory
                     ` (2 more replies)
  2007-11-29 11:29 ` Graeme Gregory
  1 sibling, 3 replies; 8+ messages in thread
From: Koen Kooi @ 2007-11-28 13:43 UTC (permalink / raw)
  To: Using the OpenEmbedded metadata to build Distributions

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Graeme Gregory schreef:
> I would like to do the attached patch to linux.inc to change uImage
> generation so it is compatible with the way kernel.bbclass does things.
> 
> This means the uImage ends up in kernel-image not some random file
> called uImage but not really a uImage.
> 
> koen said the do_install_prepend stuff was to work around vendor bugs
> and is no longer needed in this file.

Looks good, except for these bits of collateral damage:

- -        if test -e arch/${ARCH}/boot/images/uImage ; then
- -             ln -f arch/${ARCH}/boot/images/uImage
arch/${ARCH}/boot/uImage

The above is needed for various powerpc/ppc boards, and the below is
needed for at least blackfin:

- -        if test -e arch/${ARCH}/kernel/vmlinux.lds ; then
- -             ln -f arch/${ARCH}/kernel/vmlinux.lds
arch/${ARCH}/boot/vmlinux

The linux kernel doesn't seem to have a strict policy on image placement
and various vendor patches aren't exactly helping the situation :/

regards,

Koen

- --
koen@dominion.kabel.utwente.nl will go go away in december 2007, please
use k.kooi@student.utwente.nl instead.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFHTXB+MkyGM64RGpERAnEUAJ9pzhdplIFn1idz+r9u4m7VbT93YgCgjDpk
VX+OKjBT3o1A03PyurqBI+g=
=nfJA
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RFC] Fix uImage generation in way compatible with kernel.bbclass
  2007-11-28 13:43 ` Koen Kooi
@ 2007-11-28 14:32   ` Graeme Gregory
  2007-11-28 14:36   ` Graeme Gregory
  2007-11-28 14:49   ` pHilipp Zabel
  2 siblings, 0 replies; 8+ messages in thread
From: Graeme Gregory @ 2007-11-28 14:32 UTC (permalink / raw)
  To: openembedded-devel

Koen Kooi wrote:
> Graeme Gregory schreef:
>> I would like to do the attached patch to linux.inc to change uImage
>> generation so it is compatible with the way kernel.bbclass does things.
> 
>> This means the uImage ends up in kernel-image not some random file
>> called uImage but not really a uImage.
> 
>> koen said the do_install_prepend stuff was to work around vendor bugs
>> and is no longer needed in this file.
> 
> Looks good, except for these bits of collateral damage:
> 
> -        if test -e arch/${ARCH}/boot/images/uImage ; then
> -             ln -f arch/${ARCH}/boot/images/uImage
> arch/${ARCH}/boot/uImage
> 
> The above is needed for various powerpc/ppc boards, and the below is
> needed for at least blackfin:
> 
> -        if test -e arch/${ARCH}/kernel/vmlinux.lds ; then
> -             ln -f arch/${ARCH}/kernel/vmlinux.lds
> arch/${ARCH}/boot/vmlinux
> 
> The linux kernel doesn't seem to have a strict policy on image placement
> and various vendor patches aren't exactly helping the situation :/
> 
Ok, I misunderstood you and thought they were all not needed lines, I
shall restore these two then.

Graeme




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RFC] Fix uImage generation in way compatible with kernel.bbclass
  2007-11-28 13:43 ` Koen Kooi
  2007-11-28 14:32   ` Graeme Gregory
@ 2007-11-28 14:36   ` Graeme Gregory
  2007-11-28 15:55     ` Koen Kooi
  2007-11-28 14:49   ` pHilipp Zabel
  2 siblings, 1 reply; 8+ messages in thread
From: Graeme Gregory @ 2007-11-28 14:36 UTC (permalink / raw)
  To: openembedded-devel

Koen Kooi wrote:
 > Looks good, except for these bits of collateral damage:
> 
> -        if test -e arch/${ARCH}/boot/images/uImage ; then
> -             ln -f arch/${ARCH}/boot/images/uImage
> arch/${ARCH}/boot/uImage
> 
Actually isnt this bolloxed anyway by regenerating the uImage
in do_deploy?

Graeme




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RFC] Fix uImage generation in way compatible with kernel.bbclass
  2007-11-28 13:43 ` Koen Kooi
  2007-11-28 14:32   ` Graeme Gregory
  2007-11-28 14:36   ` Graeme Gregory
@ 2007-11-28 14:49   ` pHilipp Zabel
  2 siblings, 0 replies; 8+ messages in thread
From: pHilipp Zabel @ 2007-11-28 14:49 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Using the OpenEmbedded metadata to build Distributions

On Nov 28, 2007 2:43 PM, Koen Kooi <k.kooi@student.utwente.nl> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Graeme Gregory schreef:
>
> > I would like to do the attached patch to linux.inc to change uImage
> > generation so it is compatible with the way kernel.bbclass does things.
> >
> > This means the uImage ends up in kernel-image not some random file
> > called uImage but not really a uImage.
> >
> > koen said the do_install_prepend stuff was to work around vendor bugs
> > and is no longer needed in this file.
>
> Looks good, except for these bits of collateral damage:
>
> - -        if test -e arch/${ARCH}/boot/images/uImage ; then
> - -             ln -f arch/${ARCH}/boot/images/uImage
> arch/${ARCH}/boot/uImage
>
> The above is needed for various powerpc/ppc boards, and the below is
> needed for at least blackfin:
>
> - -        if test -e arch/${ARCH}/kernel/vmlinux.lds ; then
> - -             ln -f arch/${ARCH}/kernel/vmlinux.lds
> arch/${ARCH}/boot/vmlinux

The blackfin patches overwrite the kernel linker script with the
binary kernel image?!

> The linux kernel doesn't seem to have a strict policy on image placement
> and various vendor patches aren't exactly helping the situation :/
>
> regards,
>
> Koen
>
> - --
> koen@dominion.kabel.utwente.nl will go go away in december 2007, please
> use k.kooi@student.utwente.nl instead.
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (Darwin)
>
> iD8DBQFHTXB+MkyGM64RGpERAnEUAJ9pzhdplIFn1idz+r9u4m7VbT93YgCgjDpk
> VX+OKjBT3o1A03PyurqBI+g=
> =nfJA
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>

cheers
Philipp



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RFC] Fix uImage generation in way compatible with kernel.bbclass
  2007-11-28 14:36   ` Graeme Gregory
@ 2007-11-28 15:55     ` Koen Kooi
  2007-11-28 17:16       ` Graeme Gregory
  0 siblings, 1 reply; 8+ messages in thread
From: Koen Kooi @ 2007-11-28 15:55 UTC (permalink / raw)
  To: Using the OpenEmbedded metadata to build Distributions

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Graeme Gregory schreef:
> Koen Kooi wrote:
>  > Looks good, except for these bits of collateral damage:
>> -        if test -e arch/${ARCH}/boot/images/uImage ; then
>> -             ln -f arch/${ARCH}/boot/images/uImage
>> arch/${ARCH}/boot/uImage
>>
> Actually isnt this bolloxed anyway by regenerating the uImage
> in do_deploy?

It is, I think we can fix it in your shiny new do_compile_append method :)
And pH5 is partly right about the linker script, I checked and in newer
revisions the .lds file is indeed a linker script.

regards,

Koen

- --
koen@dominion.kabel.utwente.nl will go go away in december 2007, please
use k.kooi@student.utwente.nl instead.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFHTY9jMkyGM64RGpERAk11AJ98JIBcYjnYtWZwKBMZSMNUnkTx+ACgu4xY
4dw0KvVB2IMoopvaXerWT/k=
=rW6H
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RFC] Fix uImage generation in way compatible with kernel.bbclass
  2007-11-28 15:55     ` Koen Kooi
@ 2007-11-28 17:16       ` Graeme Gregory
  0 siblings, 0 replies; 8+ messages in thread
From: Graeme Gregory @ 2007-11-28 17:16 UTC (permalink / raw)
  To: openembedded-devel

Koen Kooi wrote:
> Graeme Gregory schreef:
>> Koen Kooi wrote:
>>  > Looks good, except for these bits of collateral damage:
>>> -        if test -e arch/${ARCH}/boot/images/uImage ; then
>>> -             ln -f arch/${ARCH}/boot/images/uImage
>>> arch/${ARCH}/boot/uImage
>>>
>> Actually isnt this bolloxed anyway by regenerating the uImage
>> in do_deploy?
> 
> It is, I think we can fix it in your shiny new do_compile_append method :)
> And pH5 is partly right about the linker script, I checked and in newer
> revisions the .lds file is indeed a linker script.
> 

Well it should already be fixed in the do_compile_append, as
arch/${ARCH}/boot/uImage is created, which seems to be the point of this
hack anyway.

Graeme





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RFC] Fix uImage generation in way compatible with kernel.bbclass
  2007-11-28 11:47 [RFC] Fix uImage generation in way compatible with kernel.bbclass Graeme Gregory
  2007-11-28 13:43 ` Koen Kooi
@ 2007-11-29 11:29 ` Graeme Gregory
  1 sibling, 0 replies; 8+ messages in thread
From: Graeme Gregory @ 2007-11-29 11:29 UTC (permalink / raw)
  To: openembedded-devel

On Wed, 28 Nov 2007 11:47:13 +0000
Graeme Gregory <dp@xora.org.uk> wrote:

> I would like to do the attached patch to linux.inc to change uImage
> generation so it is compatible with the way kernel.bbclass does
> things.
> 
> This means the uImage ends up in kernel-image not some random file
> called uImage but not really a uImage.
> 
> koen said the do_install_prepend stuff was to work around vendor bugs
> and is no longer needed in this file.
> 
I think we have knocked down all the objections by email now?

Shall I apply?

Graeme



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-11-29 11:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-28 11:47 [RFC] Fix uImage generation in way compatible with kernel.bbclass Graeme Gregory
2007-11-28 13:43 ` Koen Kooi
2007-11-28 14:32   ` Graeme Gregory
2007-11-28 14:36   ` Graeme Gregory
2007-11-28 15:55     ` Koen Kooi
2007-11-28 17:16       ` Graeme Gregory
2007-11-28 14:49   ` pHilipp Zabel
2007-11-29 11:29 ` Graeme Gregory

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.