linux-mips
[Top] [All Lists]

Re: Can you add a signature to the kernel ELF image?

To: Ralf Baechle <ralf@linux-mips.org>
Subject: Re: Can you add a signature to the kernel ELF image?
From: Adam Nielsen <a.nielsen@shikadi.net>
Date: Wed, 25 Nov 2009 21:34:50 +1000
Cc: linux-mips@linux-mips.org
In-reply-to: <20091124234406.GB20316@linux-mips.org>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <4B0C625B.5070408@shikadi.net> <20091124234406.GB20316@linux-mips.org>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.8.1.22) Gecko/20090809 Thunderbird/2.0.0.22 Mnenhy/0.7.5.0
Take a look at arch/mips/kernel/head.S.  This file will be the first on
the final linker call's command line, that is head.S's .text section will
end at the lowest address.

Ah excellent, that combined with the linker script (to twiddle load addresses) is just what I'm after.

#ifdef CONFIG_NCD_HMX
        b       1f
        nop
        nop
        .word   0x20
        .asciz  "XncdHMX"
        .word   0, 0, 0
#endif

Perfect, thanks for the example, that makes it much easier.

[1] http://www.linux-mips.org/wiki/HMX

The wiki page says something about a CRC but just poking a 0x20 into a
constant address is not exactly a CRC calculation.  Not sure how this
really is meant.

As far as I'm aware 0x20 means "ignore the CRC", I think the CRC itself is covered by one of the zero words.

Cheers,
Adam.

<Prev in Thread] Current Thread [Next in Thread>