mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Pascal Vizeli <pascal.vizeli@syshack.ch>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org, Pascal Vizeli <pvizeli@syshack.ch>
Subject: Re: [PATCH 1/1] command: oftree: support load device tree from memory
Date: Thu, 7 Jun 2018 14:45:57 +0200	[thread overview]
Message-ID: <CACvFaDfDqWxCXp6dLr=9k3tT1vyNfSUcfA7agK4T8JKj_WLKWA@mail.gmail.com> (raw)
In-Reply-To: <CACvFaDehzoBCPQRELost2kPNOMM-RaXxjk+pk59H7at4WRr68Q@mail.gmail.com>

Okay. I found out the problem with bad magic and they is fix now. I
was needed a higher position into memory.

Anyway I found also a bug, that the fixup for partition hungs in a loop:
Dump on internal
flatten
unflatten
Run fix
Run fixup
Fixup memory
End fixup
Run fixup
fixup boot
End fixup
Run fixup
Fixup partition

I will find the bug and provide a bugfix. After that all should work :)

Greets
Pascal

2018-06-07 12:42 GMT+02:00 Pascal Vizeli <pascal.vizeli@syshack.ch>:
> That sounds good. Thanks for the direction.
>
> My workaround look like:
> memcpy -d /tmp/rpi.dtb 0xf42400 0 0x10000
> of_dump -f /tmp/rpi.dtb > /dev/null
> oftree -f -l /tmp/rpi.dtb
>
> Without 'of_dump', the 'oftree' give a bad magic 0x5.... error.
>
> I need add support for HassOS to raspberry and in a second round I
> will try to implement your suggestion.
>
> best regards
> Pascal
>
> 2018-06-07 10:53 GMT+02:00 Sascha Hauer <s.hauer@pengutronix.de>:
>> On Thu, Jun 07, 2018 at 10:29:53AM +0200, Pascal Vizeli wrote:
>>> Thanks for this workaround. I will use this.
>>>
>>> I will later send a patch they store the device tree address on
>>> raspberry into a variable.
>>> So that user can load this, if he need it.
>>>
>>> The question is now, would you allow to load a device tree with a
>>> memory address on oftree utility?
>>> And if yes, where is the best place to add this function.
>>
>> Instead of a command I would prefer if you could just store r2 from
>> the original bootloader you have been started with, and in a board
>> specific initcall you copy the devicetree you found in memory to a
>> file. Then the user has access to the devicetree with regular file
>> commands and there is no need to guess the memory address where the
>> original bootloader stored the device tree.
>>
>> Sascha
>>
>> --
>> Pengutronix e.K.                           |                             |
>> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
>> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
>> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2018-06-07 12:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-06 15:16 Pascal Vizeli
2018-06-06 19:57 ` Andrey Smirnov
2018-06-07  7:20 ` Sascha Hauer
2018-06-07  8:29   ` Pascal Vizeli
2018-06-07  8:53     ` Sascha Hauer
2018-06-07 10:42       ` Pascal Vizeli
2018-06-07 12:45         ` Pascal Vizeli [this message]

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='CACvFaDfDqWxCXp6dLr=9k3tT1vyNfSUcfA7agK4T8JKj_WLKWA@mail.gmail.com' \
    --to=pascal.vizeli@syshack.ch \
    --cc=barebox@lists.infradead.org \
    --cc=pvizeli@syshack.ch \
    --cc=s.hauer@pengutronix.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