barebox - rk3568

Sascha Hauer sha at pengutronix.de
Tue Jan 4 06:16:20 PST 2022


On Tue, Jan 04, 2022 at 12:20:51PM +0100, Frank Wunderlich wrote:
> Hi,
> 
> thanks, got it compiled and booting...currently looking around how to do things ;)
> have successful booted linux+dtb+initrd manually and pinged my router as network test.
> 
> now i looks how to include scripts that i don't need to write all again and again...
> 
> documentation says that a direktory will be used in boards directory, but this seems not working
> 
> so i used the config-approach
> 
> DEFAULT_ENVIRONMENT_PATH=arch/arm/boards/rockchip-rk3568-evb/defaultenv
> 
> i'm not sure how the saveenv works (where the environment is
> stored...i have no /dev/env0). in uboot i can define a device (mmc),
> partition (1:1), filename (uboot.env) for storing environment onto a
> fat-partition. i guess you have something similar too

You don't need a /dev/env0. The EVB device tree has:

               environment-sd {
                       compatible = "barebox,environment";
                       device-path = &environment_sd;
                       status = "disabled";
               };

               environment-emmc {
                       compatible = "barebox,environment";
                       device-path = &environment_emmc;
                       status = "disabled";
               };

One of these nodes will be enabled based on the current bootsource:

       if (bootsource == BOOTSOURCE_MMC && instance == 1)
               of_device_enable_path("/chosen/environment-sd");
       else
               of_device_enable_path("/chosen/environment-emmc");

As you have exchanged the device tree you either don't have the nodes
in your device tree or the device tree doesn't match the board code:

The EVB board code has:

static const struct of_device_id rk3568_evb_of_match[] = {
       { .compatible = "rockchip,rk3568-evb1-v10" },
       { /* Sentinel */},
};

Which matches the EVB device tree:

       compatible = "rockchip,rk3568-evb1-v10", "rockchip,rk3568";

I don't know exactly what you have changed and what not, but I think your
problem is somewhere here.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list