From: Joye Laurent <Laurent.Joye@haslerrail.com>
To: "barebox@lists.infradead.org" <barebox@lists.infradead.org>
Subject: Barebox State stored in DOS partition
Date: Mon, 29 May 2017 09:34:43 +0000 [thread overview]
Message-ID: <1496050483.2610.35.camel@haslerrail.com> (raw)
Hello,
I'm trying to save my state variable set inside a DOS partition.
I'm working on a beaglebone black board.
I use the version v2017.05.0 of barebox.
I've just added the following code to the file
arch/arm/dts/am335x-boneblack.dts file:
state: part2boot {
/* <:-) */
magic = <0x292D3A3C>;
compatible = "barebox,state";
backend-type = "dtb";
backend = &mmc2, "partname:1";
backend-stridesize = <512>;
#address-cells = <0x1>;
#size-cells = <0x1>;
active {
reg = <0x00 0x04>;
type = "enum32";
names = "rootfs1", "rootfs2";
default = <0>;
};
state {
reg = <0x04 0x04>;
type = "enum32";
names = "no_change", "new_image", "check_validity";
default = <0>;
};
};
};
Note that the related emmc device (referred as mmc2 in the dts tree, and
as mmc1 by the barebox command devinfo) is already formatted (FAT32) on
its second partition (mmc1.1).
Note that the backend node is defined as suggested here
(https://www.spinics.net/lists/u-boot-v2/msg29515.html).
By starting barebox, I get the following:
barebox 2017.05.0-UNTAGGED_VERSION-dirty #1 Mon May 29 09:52:48 CEST
2017
Board: TI AM335x BeagleBone black
detected 'BeagleBone Black'
cpsw 4a100000.ethernet: detected phy mask 0x1
mdio_bus: miibus0: probed
eth0: got preset MAC address: 60:64:05:fe:de:67
cpsw 4a100000.ethernet: Failed to setup slave 1: I/O error
am335x-phy-driver 47401300.usb-phy: am_usbphy 8ffa7fbc enabled
am335x-phy-driver 47401b00.usb-phy: am_usbphy 8ffa92dc enabled
musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split,
HB-ISO Rx, HB-ISO Tx, SoftConn)
musb-hdrc: MHDRC RTL version 2.0
musb-hdrc: setup fifo_mode 4
musb-hdrc: 28/31 max ep, 16384/16384 memory
i2c-omap 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
omap-hsmmc 48060000.mmc: registered as 48060000.mmc
mmc0: detected SD card version 2.0
mmc0: registered mmc0
omap-hsmmc 481d8000.mmc: registered as 481d8000.mmc
mmc1: detected MMC card version 4.5
mmc1: registered mmc1
part2boot: Cannot resolve "backend" phandle
state part2boot.6: probe failed: Invalid argument
omap_wdt 44e35000.wdt: OMAP Watchdog Timer Rev 0x01
netconsole: registered as netconsole-1
malloc space: 0x8fefef60 -> 0x9fdfdebf (size 255 MiB)
environment load /boot/barebox.env: No such file or directory
Maybe you have to create the partition.
running /env/bin/init...
HaslerRail initialization...
changing USB current limit to 1300 mA... done
Here is the output of the command of_dump /part2boot:
part2boot {
magic = <0x292d3a3c>;
compatible = "barebox,state";
backend-type = "dtb";
backend = "/ocp/mmc@481d8000", "partname:1";
backend-stridesize = <0x200>;
#address-cells = <0x1>;
#size-cells = <0x1>;
active {
reg = <0x0 0x4>;
type = "enum32";
names = "rootfs1", "rootfs2";
default = <0x0>;
};
state {
reg = <0x4 0x4>;
type = "enum32";
names = "no_change", "new_image", "check_validity";
default = <0x0>;
};
};
Could you please help me to correctly describe my state variable set
inside the dts file?
Is it really possible to store a variable set inside a formatted FAT32
filesystem?
Many thanks in advance for your help
Laurent Joye
HaslerRail AG
Switzerland
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2017-05-29 9:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-29 9:34 Joye Laurent [this message]
2017-05-30 6:01 ` Sascha Hauer
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=1496050483.2610.35.camel@haslerrail.com \
--to=laurent.joye@haslerrail.com \
--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