[U-Boot] Is it OK to use target code from host tools

Albert ARIBAUD albert.u.boot at aribaud.net
Mon Apr 7 18:22:03 CEST 2014


Hi Charles,

On Wed, 5 Mar 2014 11:30:26 +1300, Charles Manning
<cdhmanning at gmail.com> wrote:

> Hello All
> 
> I am currently reworking a socfpga signer patch which is part of mkimage.
> 
> One thing I need to do is to stuff some bytes into a header ensuring the
> endianism is correct.
> 
> This is a trivial thing to do in C, but I have been instructed to use the
> existing functions put_unaligned_le32() etc.
> 
> These are part of Linux in linux/unaligned/access_ok.h. But this includes
> <asm/*>
> 
> It seems to me that this mixing of host space and target space is
> potentially problematic.

Hmm... Where exactly is there a mixing of host and target?

> Is this a safe thing to do?
> 
> Thanks
> 
> Charles


Amicalement,
-- 
Albert.


More information about the U-Boot mailing list