Skip to contentSkip to conversation

Question about CONFIG_ENV_IS_IN_FAT

U-Boot Dmitriy Alekseev 3 participants 3 messages Oct 18, 2013

lore
Share & tools
lore
#0 lore raw

Hello Submarine Friends!

My goal is to keep env at fat partition on mmc.
I added these definitions to am335x_evm.h config.

#define CONFIG_ENV_IS_IN_FAT
#define FAT_ENV_INTERFACE "mmc"
#define FAT_ENV_DEVICE 0
#define FAT_ENV_PART 1
#define FAT_ENV_FILE "uEnv.txt"

This enables to store the content on MMC, but I am concerned about two things:
1)I got this warning message every booting:
reading uEnv.txt
FAT: Misaligned buffer address (8fa16f10)
2) There is a problem with opening the file in text editors, because it have non ascii bytes at head. But seems data is not corrupt.

Is it ok? Help me shedding some light on these issues. Thank You.

Best Regards,
Dima.

#1 lore raw
Quoted 11 lines · Dmitriy Alekseev

Hello Submarine Friends!

My goal is to keep env at fat partition on mmc.
I added these definitions to am335x_evm.h config.

#define CONFIG_ENV_IS_IN_FAT
#define FAT_ENV_INTERFACE "mmc"
#define FAT_ENV_DEVICE 0
#define FAT_ENV_PART 1
#define FAT_ENV_FILE "uEnv.txt"

Note that the uEnv.txt file is used for something similar but different, so please use a different name here.

Quoted 4 lines

This enables to store the content on MMC, but I am concerned about two things:
1)I got this warning message every booting:
reading uEnv.txt
FAT: Misaligned buffer address (8fa16f10)

Depending on where in the boot process that is, it could be that.

Quoted 2 lines

2) There is a problem with opening the file in text editors, because it have non ascii bytes at head. But seems data is not corrupt.

Correct. With the environment stored as a file in FAT it is NOT also stored in plain text. You would need to use fw_printenv/setenv to modify it.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131018/47de02dd/attachment.pgp>
#2 lore raw
In reply to Dmitriy Alekseev

Dear Dmitriy,

Quoted 5 lines · In message <[email protected]> you…

This enables to store the content on MMC, but I am concerned about two things:
1)I got this warning message every booting:
reading uEnv.txt
FAT: Misaligned buffer address (8fa16f10)

This is bad.

Quoted 2 lines

2) There is a problem with opening the file in text editors, because it have non ascii bytes at head. But seems data is not corrupt.

No matter what file name you are using, this is NOT a text file. It is a binary data structure.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If God wanted me to touch my toes, he'd have put them on my knees.