All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: Leif Lindholm <leif.lindholm@linaro.org>
Cc: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: Raspberry pi support
Date: Mon, 08 Apr 2013 14:59:59 +0200	[thread overview]
Message-ID: <5162BF4F.3090307@gmail.com> (raw)
In-Reply-To: <20130408114445.GS23069@rocoto.smurfnet.nu>

[-- Attachment #1: Type: text/plain, Size: 2694 bytes --]

On 08.04.2013 13:44, Leif Lindholm wrote:

> 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.
> 

The kernel shipped with raspbian aren't uImages. they are with some kind
of raspberry stuff in it. They have to be loaded at 0 with entry point
at 0. u-boot is available for raspberry pi but isn't used by default.

>> 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.
> 

The questions basically would be how we switch between armv6 and armv7.
I see as possibilities:
defining target_cpu of armv6 and armv7, so it will give 4 ports
armv[67]-(uboot|efi). Another possibility is to decide on runtime but
it's probably more difficult.

> 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.
> 

Do we lose anything by not supporting thumb2 for assembly?
What armv7 functionality is useful?

>> === 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.

My compiler simply doesn't know this option. I suppose it always assumes
that no unaligned access is available. Availability of this option must
be detected on configure time.

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

Hence --target-cpu=armv[67] proposal.g


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]

  reply	other threads:[~2013-04-08 13:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-07 17:20 Raspberry pi support Vladimir 'φ-coder/phcoder' Serbinenko
2013-04-08 11:44 ` Leif Lindholm
2013-04-08 12:59   ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2013-04-08 14:40     ` Leif Lindholm
2013-04-08 19:58       ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-05-01 10:25         ` Leif Lindholm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5162BF4F.3090307@gmail.com \
    --to=phcoder@gmail.com \
    --cc=grub-devel@gnu.org \
    --cc=leif.lindholm@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.