Skip to contentSkip to conversation

Fetch machine type list for ARM architectures

RFC In review Leon Woestenberg 3 participants 4 messages Sep 16, 2009 – Sep 25, 2009

lore
Share & tools
lore
#0 lore raw

RFC 1/1 Fetch machine type list for ARM architectures

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.

recipes/linux/linux.inc +4 -0
index 044d413..6db2022 100644
@@ -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} ||

Signature · 1 line
Leon
#1 lore raw
Quoted 4 lines · Leon Woestenberg

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.

#2 lore raw

Hello,

Quoted 11 lines · Phil Blundell
Quoted 4 lines · Leon Woestenberg

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,

Signature · 1 line
Leon
#3 lore raw
In reply to Leon Woestenberg
Quoted 5 lines · Leon Woestenberg

Hello,

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

Quoted 7 lines

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