All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] Fetch machine type list for ARM architectures
@ 2009-09-16 21:56 Leon Woestenberg
  2009-09-17  7:33 ` Phil Blundell
  2009-09-17  7:36 ` Koen Kooi
  0 siblings, 2 replies; 4+ messages in thread
From: Leon Woestenberg @ 2009-09-16 21:56 UTC (permalink / raw)
  To: openembedded-devel

Hello,

two (known) ARM machines currently have kernel support but their
"mach-types" file in arch/arm/tools/ is not up-to-date.

I had this change in my local tree. It works, but is quite intrusive
as it is mixing a well-known version of the kernel sources (as per the
recipe) against an upstream, constantly changing file.
This is unwanted.

I rather think we should fetch the mach-types file only for those
machine that require it.

So please DO NOT APPLY this patch as-is.

Any other ideas on this?


--
Leon.


diff --git a/recipes/linux/linux.inc b/recipes/linux/linux.inc
index 044d413..6db2022 100644
--- a/recipes/linux/linux.inc
+++ b/recipes/linux/linux.inc
@@ -53,6 +53,14 @@ python __anonymous () {
        bb.data.setVar("PACKAGES", "%s kernel-devicetree" % packages, d)
 }

+# update machine types list for ARM architecture
+do_arm_mach_types() {
+  if test ${TARGET_ARCH} == arm; then
+    curl -o mach-types
"http://www.arm.linux.org.uk/developer/machines/download.php" && \
+    cp mach-types arch/arm/tools/mach-types
+  fi
+}
+
 do_configure_prepend() {
         echo "" > ${S}/.config

@@ -170,6 +178,7 @@ do_devicetree_image() {
 }

 addtask devicetree_image after do_deploy before do_package
+addtask arm_mach_types after do_patch before do_configure

 pkg_postinst_kernel-devicetree () {
        cd /${KERNEL_IMAGEDEST}; update-alternatives --install
/${KERNEL_IMAGEDEST}/devicetree devicetree
devicetree-${KERNEL_VERSION} ${KERNEL_PRIORITY} ||


-- 
Leon



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

* Re: [RFC] Fetch machine type list for ARM architectures
  2009-09-16 21:56 [RFC] Fetch machine type list for ARM architectures Leon Woestenberg
@ 2009-09-17  7:33 ` Phil Blundell
  2009-09-25  9:26   ` Leon Woestenberg
  2009-09-17  7:36 ` Koen Kooi
  1 sibling, 1 reply; 4+ messages in thread
From: Phil Blundell @ 2009-09-17  7:33 UTC (permalink / raw)
  To: openembedded-devel

On Wed, 2009-09-16 at 23:56 +0200, Leon Woestenberg wrote:
> Hello,
> 
> two (known) ARM machines currently have kernel support but their
> "mach-types" file in arch/arm/tools/ is not up-to-date.

How did this situation come about?  The mach-types file is normally one
of the first things to be updated in the upstream kernel; I can't think
of any obvious reason why that should not have happened if the patches
to add the actual machine support have already landed in the tree.

p.





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

* Re: [RFC] Fetch machine type list for ARM architectures
  2009-09-16 21:56 [RFC] Fetch machine type list for ARM architectures Leon Woestenberg
  2009-09-17  7:33 ` Phil Blundell
@ 2009-09-17  7:36 ` Koen Kooi
  1 sibling, 0 replies; 4+ messages in thread
From: Koen Kooi @ 2009-09-17  7:36 UTC (permalink / raw)
  To: openembedded-devel

On 16-09-09 23:56, Leon Woestenberg wrote:
> Hello,
>
> two (known) ARM machines currently have kernel support but their
> "mach-types" file in arch/arm/tools/ is not up-to-date.
>
> I had this change in my local tree. It works, but is quite intrusive
> as it is mixing a well-known version of the kernel sources (as per the
> recipe) against an upstream, constantly changing file.
> This is unwanted.
>
> I rather think we should fetch the mach-types file only for those
> machine that require it.

And not do this for machines that have a different machine number than 
Russel think (the joy of nonstandard bootloaders).

regards,

Koen




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

* Re: [RFC] Fetch machine type list for ARM architectures
  2009-09-17  7:33 ` Phil Blundell
@ 2009-09-25  9:26   ` Leon Woestenberg
  0 siblings, 0 replies; 4+ messages in thread
From: Leon Woestenberg @ 2009-09-25  9:26 UTC (permalink / raw)
  To: openembedded-devel

Hello,

On Thu, Sep 17, 2009 at 9:33 AM, Phil Blundell <pb@reciva.com> wrote:
> On Wed, 2009-09-16 at 23:56 +0200, Leon Woestenberg wrote:
>> Hello,
>>
>> two (known) ARM machines currently have kernel support but their
>> "mach-types" file in arch/arm/tools/ is not up-to-date.
>
> How did this situation come about?  The mach-types file is normally one
> of the first things to be updated in the upstream kernel; I can't think
> of any obvious reason why that should not have happened if the patches
> to add the actual machine support have already landed in the tree.
>

Let me clearify, my phrasing was a bit off.

With "upstream" I didn't mean "mainline", but an upstream branch being
merged towards mainline regularly and soonish.

in this case the linux-kirkwood branch at Marvell (which is merged to
upstream regularly) had the machine support but not yet the machine
type.

There is often a race condition in ARM kernel development if (1) get
done before (2, 3).
1 - machine-specific code gets written/submitted to a branch
2 - machine type is requested, machine type file is generated
3 - new machine type file gets merged into the branch


I had merged this into OpenEmbedded, it was non-intrusive for other
machines and will not break when (3) has happened.

# update machine types list for ARM architecture, only for machines that need it
do_arm_mach_types() {
  if test ${MACHINE} == openrd-base; then

To be removed when it is upstream...


Regards,
-- 
Leon



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

end of thread, other threads:[~2009-09-25  9:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-16 21:56 [RFC] Fetch machine type list for ARM architectures Leon Woestenberg
2009-09-17  7:33 ` Phil Blundell
2009-09-25  9:26   ` Leon Woestenberg
2009-09-17  7:36 ` Koen Kooi

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.