grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Raspberry pi support


From: Leif Lindholm
Subject: Re: Raspberry pi support
Date: Mon, 8 Apr 2013 11:44:45 +0000
User-agent: Mutt/1.5.20 (2009-06-14)

On Sun, Apr 07, 2013 at 07:20:35PM +0200, Vladimir '??-coder/phcoder' 
Serbinenko wrote:
> Based on Leif Lindholm's patches I could go to GRUB console on raspberry pi.
> The biggest problem is that cache flushing is simply skipped. Another
> problem is that due to different linux image format linux loader doesn't
> work.

Is this because you're feeding it a uImage?
It is entirely possible to runtime detect the U-Boot signature, and simply
skip the header.

> I didn't test grub-install but fed GRUB to uboot using kermit.
> Is there any advantage in building armv6 binary by default unless user
> overrides through TARGET_CFLAGS?

I think it would get messy: the barrier operations supported by ARMv6 are
deprecated in ARMv7.

I would suggest an alternative approach, which is to build all of the
assembly in "arm" state, and to keep the generic functionality to an
ARMv6 subset.

This would then have to be done in multiple files, but as an example, I
have implemented this for specifically the cache synchronization, attached
to this email.

> Some of the fixes are to make tools work on amd64
> 
> 
> === modified file 'conf/Makefile.common'
> --- conf/Makefile.common      2013-04-07 00:41:07 +0000
> +++ conf/Makefile.common      2013-04-07 16:08:07 +0000
> @@ -40,8 +40,7 @@
>  if COND_arm
>  # Image entry point always in ARM (A32) state - ensure proper functionality 
> if
>  # the rest is built for the Thumb (T32) state.
> -  CFLAGS_PLATFORM += -mthumb-interwork -mno-unaligned-access -mlong-calls
> -  CCASFLAGS_PLATFORM = -Wa,-mimplicit-it=thumb
> +  CFLAGS_PLATFORM += -mthumb-interwork -march=armv6 -mlong-calls
>    LDFLAGS_PLATFORM = -Wl,--wrap=__clear_cache
>  endif
  
-mno-unaligned-access is required to function on platforms that do not
have caches/MMU enabled at this point. They do exist, so please leave it in.

And for reasons stated above, -march= should be set to whatever your
target architecture is. Extracted by configure, I suppose?

/
    Leif

Attachment: armv6cache.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]