mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: jairo <jairo@futurasmus-knxlab.es>
To: barebox@lists.infradead.org
Subject: [help][bootchooser][device-tree] create an update system with yocto and rauc
Date: Fri, 15 Mar 2019 10:05:10 +0100	[thread overview]
Message-ID: <4ab3078e8655eebe813befaf0f3bf3edecf7726c.camel@futurasmus-knxlab.es> (raw)

Hi all,

I need to do an update system for a system embedded with yocto with the
aid of rauc, but I have some doubts ..

I have to change the boot system to bootchooser, for this, according to
the rauc documentation, I have to create a node in the internal device-
tree in which the state of the bootchooser is saved.

nv bootchooser.state_prefix = "boot_state"

Is the internal device-tree different from the kernel's device-tree?
Is it assumed that the internal device-tree is already in the barebox
binary or is dynamically loaded?
if I run of_dump I can see the device-tree but I do not know if it can
be edited before doing the barebox binary.

If I try to load a binary devicetree (the one that uses the kernel)
with the command
oftree -l /dev/nand0.root.ubi.oftree.0
I get the following error:
setting root node failed: Device or resource busy
oftree: Device or resource busy

On the other hand I have tried to update the devicetree that is already
loaded by commands of_node and of_property, (
https://rauc.readthedocs.io/en/latest/integration.html#barebox)

'''
#! / bin / sh

of_node -c / boot_state
of_node -c / boot_state / system0
of_node -c / boot_state / system1
of_node -c / boot_state / last_chosen @ 10
of_node -c / boot_state / system0 / remaining_attempts @ 0
of_node -c / boot_state / system0 / priority @ 4
of_node -c / boot_state / system1 / remaining_attempts @ 0
of_node -c / boot_state / system1 / priority @ 4


of_property -s / boot_state / system0 / remaining_attempts @ 0 reg
<0x04>
of_property -s / boot_state / system0 / remaining_attempts @ 0 type
uint32
of_property -s / boot_state / system0 / remaining_attempts @ 0 default
<3>

of_property -s / boot_state / system0 / priority @ 4 reg <0x4 0x4>
of_property -s / boot_state / system0 / priority @ 4 type uint32
of_property -s / boot_state / system0 / priority @ 4 default <20>

of_property -s / boot_state / system1 / remaining_attempts @ 0 reg <0x8
0x4>
of_property -s / boot_state / system1 / remaining_attempts @ 0 type
uint32
of_property -s / boot_state / system1 / remaining_attempts @ 0 default
<3>

of_property -s / boot_state / system1 / priority @ 4 reg <0xC 0x4>
of_property -s / boot_state / system1 / priority @ 4 type uint32
of_property -s / boot_state / system1 / priority @ 4 default <20>

of_property -s / boot_state / last_chosen @ 10 reg <0x10 0x4>
of_property -s / boot_state / last_chosen @ 10 type uint32 '''



up here, fine, but if I try to add the following line,

'''of_property -s / boot_state / system1 # address-cells <1>'''

barebox reboots and the following error exits

unable to handle NULL pointer dereference at address 0x0000000d
[...]

at the end with all the attempts, if I execute
Boot bootchooser, the following error occurs

Nothing bootable found on 'bootchooset'
Nothing bootable found


Any help is appreciated



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

                 reply	other threads:[~2019-03-15  9:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4ab3078e8655eebe813befaf0f3bf3edecf7726c.camel@futurasmus-knxlab.es \
    --to=jairo@futurasmus-knxlab.es \
    --cc=barebox@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox