Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Florian Fainelli <florian@openwrt.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: David VomLehn <dvomlehn@cisco.com>,
	Grant Likely <grant.likely@secretlab.ca>,
	Ralf Baechle <ralf@linux-mips.org>,
	linux-mips@linux-mips.org, Imre Kaloz <kaloz@openwrt.org>,
	Gabor Juhos <juhosg@openwrt.org>,
	John Crispin <blogic@openwrt.org>,
	"Dezhong Diao (dediao)" <dediao@cisco.com>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: Converting MIPS to Device Tree
Date: Sun, 12 Jun 2011 20:20:15 +0200	[thread overview]
Message-ID: <201106122020.15609.florian@openwrt.org> (raw)
In-Reply-To: <BANLkTikjgj-QH=8u6NeGbWHy5hi1jiiU6Q@mail.gmail.com>

On Wednesday 08 June 2011 09:15:14 Geert Uytterhoeven wrote:
> On Wed, Jun 8, 2011 at 01:02, David VomLehn <dvomlehn@cisco.com> wrote:
> > I took a look at the issue of passing device trees to the kernel and
> > started by surveying the methods currently in use for passing
> > information from the bootloader to the kernel. I came up with the ten
> > approaches:
> > 
> > How MIPS Bootloaders Pass Information to the Kernel
> > ---------------------------------------------------
> > Apologies for any errors; this was meant more to be a quick survey
> > rather than a detailed analysis.
> > 
> > 6.      a0 - argc
> >        a1 - argv
> >        a2 - non-standard envp
> >        Command line created by concatenating argv strings, starting at
> >        argv[1]. The envp is a pointer to a list of char ptr to name/char
> >        ptr pairs.
> >        Platforms: txx9
> 
> This depends on the actual boot loader. My rbtx4927 has a VxWorks boot
> loader, which just doesn't pass anything.
> 
> Cfr. commit 97b0511ce125b0cb95d73b198c1bdbb3cebc4de2 ("MIPS: TXx9:
> Make firmware parameter passing more robust").

Thinking about this more, on platforms for which we do not have control about 
the bootloader, we can usually still get it to boot a wrapper. Such a wrapper 
could do the following:

- embedd the kernel
- embedd the appropriate dtb
- copy the relevant a0-a3 values and pass to the kernel a pointer to the valid 
dtb in the aX register

such a wrapper already exists, which is the code responsible for decompressing 
the kernel in arch/mips/boot/compressed.

If we want to support multiple flavors of the same SoC, using the same kernel 
image, we only need to relink the boot wrapper with the correct dtb (and 
kernel of course).
--
Florian

  parent reply	other threads:[~2011-06-12 18:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-06  1:07 Converting MIPS to Device Tree Ralf Baechle
2011-06-06  4:41 ` Grant Likely
2011-06-07 23:02   ` David VomLehn
2011-06-07 23:22     ` David Daney
2011-06-08  1:09       ` David VomLehn
2011-06-10 18:57       ` Ralf Baechle
2011-06-10 19:00         ` David Daney
2011-06-08  7:15     ` Geert Uytterhoeven
2011-06-08 10:10       ` Florian Fainelli
2011-06-12 18:20       ` Florian Fainelli [this message]
2011-06-13  5:10         ` Grant Likely
2011-06-09  2:19 ` Tonyliu
2011-06-09  2:19   ` Tonyliu

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=201106122020.15609.florian@openwrt.org \
    --to=florian@openwrt.org \
    --cc=blogic@openwrt.org \
    --cc=dediao@cisco.com \
    --cc=dvomlehn@cisco.com \
    --cc=geert@linux-m68k.org \
    --cc=grant.likely@secretlab.ca \
    --cc=juhosg@openwrt.org \
    --cc=kaloz@openwrt.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    --cc=tglx@linutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox