mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Lars Pedersen <lapeddk@gmail.com>
To: barebox@lists.infradead.org
Subject: barebox environment raw partition on beaglebone black
Date: Thu, 15 Feb 2024 14:01:09 +0100	[thread overview]
Message-ID: <CAKd8=GtV4EtC5Bx+t=YOfLXEFKB_-1N=HbU4hfCaLK6Lw3YMhA@mail.gmail.com> (raw)

Hi.

I'm trying to create a barebox environment by using af emmc a raw
partition offset on the beaglebone black.

For testing I appended the following into am33x-boneblack.dts.

/ {
    chosen {
        environment {
            compatible = "barebox,environment";
            device-path = &environment_emmc;
        };
    };

    aliases {
        state = &state_emmc;
    };

    state_emmc: state {
        #address-cells = <1>;
        #size-cells = <1>;
        compatible = "barebox,state";
        magic = <0x4b414d31>;
        backend-type = "raw";
        backend = <&backend_state_emmc>;
        backend-stridesize = <0x200>;

        bootstate {
            #address-cells = <1>;
            #size-cells = <1>;

            system0 {
                #address-cells = <1>;
                #size-cells = <1>;

                remaining_attempts@0 {
                    reg = <0x0 0x4>;
                    type = "uint32";
                    default = <10>;
                };

                priority@4 {
                    reg = <0x4 0x4>;
                    type = "uint32";
                    default = <21>;
                };
            };

            system1 {
                #address-cells = <1>;
                #size-cells = <1>;

                remaining_attempts@8 {
                    reg = <0x8 0x4>;
                    type = "uint32";
                    default = <0>;
                };

                priority@c {
                    reg = <0xc 0x4>;
                    type = "uint32";
                    default = <20>;
                };
            };

            last_chosen@10 {
                reg = <0x10 0x4>;
                type = "uint32";
            };
        };
    };
};

/* eMMC */
&mmc2 {
    partitions {
        compatible = "fixed-partitions";
        #address-cells = <1>;
        #size-cells = <1>;

        environment_emmc: partition@100000 {
            label = "barebox-environment";
            reg = <0x100000 0x100000>;
        };

        backend_state_emmc: partition@200000 {
            label = "barebox-state";
            reg = <0x200000 0x100000>;
        };
    };
};

Afterwards I get the following console output:

-------------------------------------------------
barebox 2024.01.0 #1 2024-01-01T00:00:00+00:00

Board: TI AM335x BeagleBone black
detected 'BeagleBone Black'
cpsw-mdio 4a101000.mdio@1000.of: detected phy mask 0x1
mdio_bus: miibus0: probed
eth0: got preset MAC address: 18:2c:65:2a:81:1d
i2c-omap 44e0b000.i2c@0.of: bus 0 rev0.11 at 400 kHz
i2c-omap 4819c000.i2c@0.of: bus 1 rev0.11 at 100 kHz
omap-hsmmc 48060000.mmc@0.of: registered as mmc0
omap-hsmmc 481d8000.mmc@0.of: registered as mmc1
mmc1: detected MMC card version 5.0
mmc1: registered mmc1
state: New state registered 'state'
state state.of: Fresh state detected, continuing with defaults
omap_wdt 44e35000.wdt@0.of: OMAP Watchdog Timer Rev 0x01
netconsole: registered as netconsole-1
malloc space: 0x8fefe3c0 -> 0x9fdfc77f (size 255 MiB)
am335x-phy-driver 47401b00.usb-phy@1b00.of: am_usbphy 8fff21a4 enabled
am335x-phy-driver 47401300.usb-phy@1300.of: am_usbphy 8fff225c 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
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
environment load /mnt/mmc1.0/barebox.env: No such file or directory
Maybe you have to create the partition.
changing USB current limit to 1300 mA... done

Hit m for menu or any to stop autoboot:    1
---------------------------------------------------

Why does it try to read the env on a partition on
/mnt/mmc1.0/barebox.env? Is it because barebox.bin also is read from
this partition?

Thanks.

/Lars



             reply	other threads:[~2024-02-15 13:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-15 13:01 Lars Pedersen [this message]
2024-02-15 13:47 ` Ahmad Fatoum
2024-02-15 14:29   ` Lars Pedersen

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='CAKd8=GtV4EtC5Bx+t=YOfLXEFKB_-1N=HbU4hfCaLK6Lw3YMhA@mail.gmail.com' \
    --to=lapeddk@gmail.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