public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* probably a simple question regarding running "fw_printenv" on SD card partition
@ 2026-02-06 18:19 Robert P. J. Day
  2026-02-07 15:13 ` [OE-core] " Clayton Casciato
  0 siblings, 1 reply; 2+ messages in thread
From: Robert P. J. Day @ 2026-02-06 18:19 UTC (permalink / raw)
  To: OE Core mailing list


  i'm sure i'm overlooking something trivial but here's the issue.

  i have an embedded board similar to STM32MP15-eval for which i have
a pretty simple "walnascar"-based core-image-minimal image with an
additional handful of HW bringup utilities -- you know, I2C, SPI,
stuff like that. boots just fine, runs everything it's supposed to.

  the SD card layout is defined by an ST-provided script, and this is
what the (micro) SD card looks like that is generated by the script:

Number  Start (sector)    End (sector)  Size       Code  Name
   1              34             545   256.0 KiB   8301  fsbl1
   2             546            1057   256.0 KiB   8301  fsbl2
   3            1058            1569   256.0 KiB   FFFF  metadata1
   4            1570            2081   256.0 KiB   FFFF  metadata2
   5            2082           10273   4.0 MiB     FFFF  fip-a
   6           10274           18465   4.0 MiB     FFFF  fip-b
   7           18466           19489   512.0 KiB   B000  u-boot-env
   8           19490          150561   64.0 MiB    8300  bootfs
   9          150562          183329   16.0 MiB    8300  vendorfs
  10          183330         8571937   4.0 GiB     8300  rootfs
  11         8571938        10485726   934.5 MiB   8300  userfs

so after i boot, the partition corresponding to u-boot-env is
/dev/mmcblk0p7, for which i can see the offset on the card, and the
size. just for fun, while running on the target, i can hexdump that
partition, where i can see the u-boot env settings start just past
offset 0x7e000 in that partition:

# hexdump -C /dev/mmcblk0p7
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
0007e000  c2 0c 50 4e 02 61 72 63  68 3d 61 72 6d 00 61 75  |..PN.arch=arm.au|
0007e010  74 6f 6c 6f 61 64 3d 30  00 62 61 75 64 72 61 74  |toload=0.baudrat|
0007e020  65 3d 31 31 35 32 30 30  00 62 6f 61 72 64 3d 73  |e=115200.board=s|
0007e030  74 6d 33 32 6d 70 31 00  62 6f 61 72 64 5f 6e 61  |tm32mp1.board_na|
0007e040  6d 65 3d 73 74 6d 33 32  6d 70 31 35 37 64 2d 61  |me=stm32mp157d-a|
0007e050  63 72 65 2d 63 6f 72 65  2d 6d 78 00 62 6f 6f 74  |cre-core-mx.boot|
0007e060  5f 61 5f 73 63 72 69 70  74 3d 6c 6f 61 64 20 24  |_a_script=load $|
0007e070  7b 64 65 76 74 79 70 65  7d 20 24 7b 64 65 76 6e  |{devtype} ${devn|

... and so on, and so on.

  and now that i installed libubootenv-bin in the image, and boot it,
i want to access that SD card partition as the u-boot environment, so
i want to define the default config file /etc/fw_env.config but
nothing i put in that file seems to work, all i get is:

# fw_printenv
Cannot read environment, using default
Cannot read default environment from file
#

  i've tried various combinations in that config file, including stuff
like:

  # MTD device name   Device offset   Env. size   Flash sector size
  /dev/mmcblk0p7      0x7e000         0x2000      0x200

(where i was trying to define the offset as being that far into the SD
card partition).

  i've tried various combinations and permutations in that file -- am
i simply misunderstanding something here?

rday



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-02-07 15:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-06 18:19 probably a simple question regarding running "fw_printenv" on SD card partition Robert P. J. Day
2026-02-07 15:13 ` [OE-core] " Clayton Casciato

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox