public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* Bogus machine-type from bootloader
@ 2010-12-24 11:19 Damjan Marion
  2010-12-24 11:29 ` Russell King - ARM Linux
  2010-12-25 11:34 ` Alexander Clouter
  0 siblings, 2 replies; 4+ messages in thread
From: Damjan Marion @ 2010-12-24 11:19 UTC (permalink / raw)
  To: linux-arm-kernel


hi,

Is there any "proper" way if fixing bogus machine type sent by bootloader (ofcourse except fixing bootloader itself)?

I'm looking into code where author did following:


+++ a/arch/arm/boot/compressed/head-str9100.S	2009-01-20 04:26:26.000000000 +0100
@@ -0,0 +1,7 @@
+#include <asm/mach-types.h>
+
+		.section	".start", "ax"
+
+__str9100_start:
+		mov	r7, #(MACH_TYPE_STR9100 & 0xFF00)
+		orr	r7, r7, #(MACH_TYPE_STR9100 & 0x00FF)

I assume this is not something acceptable for having in official kernel source.


Damjan

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

* Bogus machine-type from bootloader
  2010-12-24 11:19 Bogus machine-type from bootloader Damjan Marion
@ 2010-12-24 11:29 ` Russell King - ARM Linux
  2010-12-24 13:17   ` Damjan Marion
  2010-12-25 11:34 ` Alexander Clouter
  1 sibling, 1 reply; 4+ messages in thread
From: Russell King - ARM Linux @ 2010-12-24 11:29 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Dec 24, 2010 at 12:19:25PM +0100, Damjan Marion wrote:
> Is there any "proper" way if fixing bogus machine type sent by
> bootloader (ofcourse except fixing bootloader itself)?
> 
> I'm looking into code where author did following:
> 
> 
> +++ a/arch/arm/boot/compressed/head-str9100.S	2009-01-20 04:26:26.000000000 +0100
> @@ -0,0 +1,7 @@
> +#include <asm/mach-types.h>
> +
> +		.section	".start", "ax"
> +
> +__str9100_start:
> +		mov	r7, #(MACH_TYPE_STR9100 & 0xFF00)
> +		orr	r7, r7, #(MACH_TYPE_STR9100 & 0x00FF)
> 
> I assume this is not something acceptable for having in official kernel source.

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

* Bogus machine-type from bootloader
  2010-12-24 11:29 ` Russell King - ARM Linux
@ 2010-12-24 13:17   ` Damjan Marion
  0 siblings, 0 replies; 4+ messages in thread
From: Damjan Marion @ 2010-12-24 13:17 UTC (permalink / raw)
  To: linux-arm-kernel

On Dec 24, 2010, at 12:29 PM, Russell King - ARM Linux wrote:
> On Fri, Dec 24, 2010 at 12:19:25PM +0100, Damjan Marion wrote:
>> Is there any "proper" way if fixing bogus machine type sent by
>> bootloader (ofcourse except fixing bootloader itself)?
>> 
>> I'm looking into code where author did following:
>> 
>> 
>> +++ a/arch/arm/boot/compressed/head-str9100.S	2009-01-20 04:26:26.000000000 +0100
>> @@ -0,0 +1,7 @@
>> +#include <asm/mach-types.h>
>> +
>> +		.section	".start", "ax"
>> +
>> +__str9100_start:
>> +		mov	r7, #(MACH_TYPE_STR9100 & 0xFF00)
>> +		orr	r7, r7, #(MACH_TYPE_STR9100 & 0x00FF)
>> 
>> I assume this is not something acceptable for having in official kernel source.
> 
> From what I remember looking at the patch URL you posted, they also
> added entries for ID 2000 to their mach-types file, which have long
> since been taken by other people.

Yes, i fixed that

# bdinfo
arch_number = 0x00000CBA

but kernel still complains:

Error: unrecognized/unsupported machine ID (r1 = 0x00e6dca8).

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

* Bogus machine-type from bootloader
  2010-12-24 11:19 Bogus machine-type from bootloader Damjan Marion
  2010-12-24 11:29 ` Russell King - ARM Linux
@ 2010-12-25 11:34 ` Alexander Clouter
  1 sibling, 0 replies; 4+ messages in thread
From: Alexander Clouter @ 2010-12-25 11:34 UTC (permalink / raw)
  To: linux-arm-kernel

Damjan Marion <damjan.marion@gmail.com> wrote:
> 
> Is there any "proper" way if fixing bogus machine type sent by 
> bootloader (ofcourse except fixing bootloader itself)?
>
Proper no, as the bootloader is the 'proper' way.

The kludge fix that many distro's seem to use (Debian for example):

http://www.digriz.org.uk/ts78xx/booting-woes#unrecognized.2BAC8-unsupported_machine_ID

In short, what it does is get the first two instructions of a booting 
kernel to load the correct machine ID into r1.  The example there is for 
0x0674 (1652), you can adjust it for your own needs.

Cook the kernel, run the 'fixup' script and you should be okay.

Cheers

-- 
Alexander Clouter
.sigmonster says: Androphobia:
                  	Fear of men.

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

end of thread, other threads:[~2010-12-25 11:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-24 11:19 Bogus machine-type from bootloader Damjan Marion
2010-12-24 11:29 ` Russell King - ARM Linux
2010-12-24 13:17   ` Damjan Marion
2010-12-25 11:34 ` Alexander Clouter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox