[PATCH] ARM: put a valid "barebox" signature in the header on big-endian systems.

Krzysztof Halasa khc at pm.waw.pl
Sun May 13 06:05:33 EDT 2012


Uwe Kleine-König <u.kleine-koenig at pengutronix.de> writes:

>> +++ b/arch/arm/include/asm/barebox-arm-head.h
>> @@ -24,8 +24,7 @@ static inline void barebox_arm_head(void)
>>  		"1: b 1b\n"
>>  		"1: b 1b\n"
>>  #endif
>> -		".word 0x65726162\n"			/* 'bare' */
>> -		".word 0x00786f62\n"			/* 'box' */
>> +		".asciz \"barebox\"\n"
>>  		".word _text\n"				/* text base. If copied there,
>>  							 * barebox can skip relocation
>>  							 */
> Another downside of this patch (apart from the file type detection that
> still needs adaption?) is that the magic is different depending on
> endianess.

Actually it's the opposite - i.e., the magic is now always "barebox\0"
and doesn't depend on endianness :-)

Without this patch, the magic changes with endianness (it becomes
"erab\0xob" on BE).

> Just my 0.02€ on this patch, I don't know how many big endian barebox
> images are out there

Guess I have most of these here :-)
Jean-Christophe may have some, too.
-- 
Krzysztof Halasa



More information about the barebox mailing list