From: Daniel Mack <zonque@gmail.com>
To: Jason Cooper <jason@lakedaemon.net>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
devicetree-discuss@lists.ozlabs.org,
linux-arm-kernel@lists.infradead.org,
Nicolas Pitre <nico@fluxnic.net>
Subject: Re: [RFC PATCH 0/2] impedance-matcher generic improvements
Date: Tue, 30 Jul 2013 15:37:38 +0200 [thread overview]
Message-ID: <51F7C1A2.5010208@gmail.com> (raw)
In-Reply-To: <20130730131725.GC5882@titan.lakedaemon.net>
Hi Jason,
On 30.07.2013 15:17, Jason Cooper wrote:
> On Tue, Jul 30, 2013 at 09:48:51AM +0200, Daniel Mack wrote:
>> On 29.07.2013 23:23, Jason Cooper wrote:
>>> Basic idea is to replace a device's stock kernel with this impedance-matcher.
>>> Load the kernel and/or the devicetree blob to desired addresses. Add
>>> 'loadaddrs=0xXXXXXXXX,0xYYYYYYYY' to the kernel's command line. Or, if you are
>>> appending, 'loadaddrs=appended,0xYYYYYYYY'. First address is the location of
>>> the kernel, second is the location of the dtb.
>>
>> Nice to see that idea implemented! For me though, changing any of the
>> U-Boot variables is out of the question, and I need the matcher just the
>> way I implemented it, including the LED blink pattern to let the user
>> know if things go wrong.
>
> Understandable. After thinking about it a bit, I think I'm going to
> rework this patch to allow appending both kernels and dtbs (as you had),
> and abstract out the led blink so that your code would become a compile
> time option.
And how would you match machids and system_rev values to the dtb files?
This is how I identify my boards at least. But as Stephen Warren said in
the thread that started this discussion, there might be totally
different ways of detection. For instance, other boards could read GPIO
lines, or even have a pseudo driver that initializes the I2C controller
in order to talk to an EEPROM or such. Reading from an ADC is another
option.
And the more I think about it, I believe Nicolas was right in saying
that such a thing does not need to be very generic (as much as I like
generic solutions in principle).
If at all, I think we should start thinking of that code base as
something like a framework, consisting of a merely empty main() function
body, a lds linker script and some objcopy magic in the Makefile. And
then have a menuconfig which allows to select one out of many hardware
types, which then uses its specific way of board detection, LED
signaling and so on. The two lines of vectoring to the actual kernel can
be generic then. But again, I really don't know if it's worth the hassle.
> hrmmm, I don't like forking on general principle. Let me do the above
> rework and see if that works for you, while adding the capabilities I
> need.
>
> When I'm done, you should just be able to do:
>
> $ make APPEND_KERNEL=input/zImage APPEND_DTBS=input/*.dtb uImage
Out of curiosity, I'd like to see how you dynamically create the symbol
definitions for the binary blobs :)
> In the meantime, would you mind adding a license to your code? If you
> have no preference, I like GPLv2-only, but it's your code, so whatever
> you like.
Done, GPLv2 it is.
Thanks,
Daniel
next prev parent reply other threads:[~2013-07-30 13:37 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-04 16:56 Appended DTB files for multi-machine kernels Daniel Mack
[not found] ` <51D5A938.30607-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-07-04 17:11 ` Mark Brown
2013-07-04 21:34 ` Arnd Bergmann
[not found] ` <201307042334.37161.arnd-r2nGTMty4D4@public.gmane.org>
2013-07-04 23:02 ` Daniel Mack
2013-07-05 8:32 ` Magnus Damm
2013-07-05 18:36 ` Stephen Warren
2013-07-04 17:28 ` Nicolas Pitre
[not found] ` <alpine.LFD.2.03.1307041322070.18597-hIgblCxmbi8OMTOF05IoTw@public.gmane.org>
2013-07-04 17:57 ` Daniel Mack
[not found] ` <51D5B7A1.60609-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-07-04 18:27 ` Nicolas Pitre
2013-07-26 16:13 ` Daniel Mack
2013-07-26 16:44 ` Nicolas Pitre
2013-07-29 21:23 ` [RFC PATCH 0/2] impedance-matcher generic improvements Jason Cooper
2013-07-30 7:48 ` Daniel Mack
2013-07-30 13:17 ` Jason Cooper
2013-07-30 13:37 ` Daniel Mack [this message]
2013-07-30 14:42 ` Jason Cooper
2013-07-29 21:24 ` [PATCH 1/2] add cscope Makefile target Jason Cooper
2013-07-29 21:24 ` [RFC PATCH 2/2] WIP: Get kernel and dtb addresses from command line Jason Cooper
2013-07-04 18:36 ` Appended DTB files for multi-machine kernels Dirk Behme
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=51F7C1A2.5010208@gmail.com \
--to=zonque@gmail.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=jason@lakedaemon.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=nico@fluxnic.net \
--cc=thomas.petazzoni@free-electrons.com \
/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;
as well as URLs for NNTP newsgroup(s).