From: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
To: Jonas Gorski <jogo@openwrt.org>
Cc: linux-mips@linux-mips.org, hauke@hauke-m.de, openwrt@kresin.me,
antonynpavlov@gmail.com
Subject: Re: [PATCH v2] Re: Adding support for device tree and command line
Date: Sun, 29 May 2016 12:08:56 -0700 [thread overview]
Message-ID: <1464548936.5020.37.camel@chimera> (raw)
In-Reply-To: <16b32a30-b0b4-d69e-b53d-827b9640c0cb@openwrt.org>
On Sun, 2016-05-29 at 21:01 +0200, Jonas Gorski wrote:
> On 29.05.2016 20:38, Daniel Gimpelevich wrote:
> > On Sun, 2016-05-29 at 12:53 +0200, Jonas Gorski wrote:
> >> This will break/won't compile for ZBOOT_APPENDED_DTB as __appended_dtb
> >> is
> >> part of the wrapping decompressor, and the kernel has no knowledge of
> >> this
> >> this symbol.
> >
> > If this were true, it wouldn't compile with the code you added to
> > compressed/head.S, either. You're referencing it as an external symbol,
> > which is exactly the same thing I'm doing here.
>
> There are two different __appended_dtb definitions: the one for the
> (uncompressed) kernel appended one that is visible to the kernel (in
> kernel/vmlinux.lds.S), and one in boot/compressed/ld.script that is
> visible only to the wrapping decompressor.
>
> Since the wrapping decompressor is built *after* the kernel was compiled
> and compressed, there is no way to tell the kernel where __appended_dtb is
> relative to the decompressor, so for ZBOOT_APPENDED_DTB you cannot
> reference __appended_dtb from kernel code.
>
> Your proposed
> > alternatives are functionally almost equivalent to your earlier rejected
> > patches:
>
> These weren't rejected, just deemed insufficient (mostly by me myself).
>
> And only to this one is similar:
> > https://patchwork.linux-mips.org/patch/7274/
>
> But in contrast to this one, it doesn't populate initial_boot_params auto-
> matically, but instead still requires the mach to do that (by calling
> __dt_setup_arch()). I dropped that because IIRC at that time I read that
> initial_boot_params isn't supposed to be directly accessed.
> Also not populating initial_boot_params is IMHO better as just because
> a0 says -2 it doesn't mean a1 references a dtb - that should still be up
> to the mach to say that it expects a dtb to be passed.
>
>
> > https://patchwork.linux-mips.org/patch/7313/
>
> This one was only missing alignment for the !SMP case but is otherwise
> equivalent to what is in the kernel now.
>
>
> Jonas
I see, and you are absolutely right in what you now suggest. What
escapes me at the moment, though, is how to reconcile all this with UHI.
UHI bootloaders may pass an external DTB, and it should be
indistinguishable by the boot code from an appended DTB. Thoughts?
next prev parent reply other threads:[~2016-05-29 19:09 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-23 21:14 Adding support for device tree and command line Hauke Mehrtens
2016-05-23 21:34 ` Hauke Mehrtens
2016-05-23 22:12 ` Daniel Gimpelevich
2016-05-24 5:32 ` [RFC PATCH] " Daniel Gimpelevich
2016-05-24 11:27 ` Antony Pavlov
2016-05-24 15:15 ` Daniel Gimpelevich
2016-05-24 15:27 ` Daniel Gimpelevich
2016-05-24 16:48 ` Antony Pavlov
2016-05-24 17:00 ` Daniel Gimpelevich
2016-05-25 3:31 ` Antony Pavlov
2016-05-25 3:33 ` Daniel Gimpelevich
2016-05-27 21:06 ` [PATCH v2] " Daniel Gimpelevich
2016-05-28 10:31 ` Antony Pavlov
2016-05-28 19:05 ` Daniel Gimpelevich
2016-05-29 1:23 ` Daniel Gimpelevich
2016-05-30 17:24 ` Antony Pavlov
2016-05-29 10:53 ` Jonas Gorski
2016-05-29 18:38 ` Daniel Gimpelevich
2016-05-29 19:01 ` Jonas Gorski
2016-05-29 19:08 ` Daniel Gimpelevich [this message]
2016-05-29 19:22 ` Jonas Gorski
2016-05-29 19:26 ` Daniel Gimpelevich
2016-05-29 19:30 ` Jonas Gorski
2016-05-29 21:19 ` Daniel Gimpelevich
2016-05-26 16:25 ` [RFC PATCH] " Hauke Mehrtens
2016-05-26 17:24 ` Daniel Gimpelevich
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=1464548936.5020.37.camel@chimera \
--to=daniel@gimpelevich.san-francisco.ca.us \
--cc=antonynpavlov@gmail.com \
--cc=hauke@hauke-m.de \
--cc=jogo@openwrt.org \
--cc=linux-mips@linux-mips.org \
--cc=openwrt@kresin.me \
/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.