From: Michael Heimpold <mhei@heimpold.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] can u-boot tools fw_{printenv, setenv} work with eMMC HW partition?
Date: Sat, 24 Aug 2013 15:08:59 +0200 [thread overview]
Message-ID: <2868345.KCFN3Hjp9Z@kerker> (raw)
In-Reply-To: <alpine.DEB.2.02.1308240731330.29981@oneiric>
Hi,
> right, i can see that and that clarifies things for me. my
> *original* question was whether there was a way to set up
> /etc/fw_env.config to refer to the eMMC partition /dev/mmcblk1boot1
> *directly*, treating it as a regular block partition and bypassing all
> the MTD-related processing. (perhaps stefano can weigh in and say
> whether that's how he understood what i was asking.)
>
> if you instead refer to /dev/mmcblk1, as i understand it, you're
> just back to the standard MTD-based access, yes?
the /dev/mmcblk... devices are block devices and do not provide
the MTD API of the kernel. I guess this is the cause for the error message
you've seen. You could try strace to verify.
And this is the problem why the patches Luka mentioned are required:
they make fw_{printenv,setenv} aware of opening such block devices
by-passing the MTD-specific stuff, that means simply open the file,
write/read the data and close the file descriptor. Without these patches
these tools assume that the file descriptor opened are MTD-based.
You can pass what ever you want via your config, so your file could
look like:
/dev/mmcblk1boot1 0x0 0x4000
Since the partition is somewhere placed on the eMMC device, you
can also refer to the same location using /dev/mmcblk1. In the latter
case you have to calculate the offset correctly to not overwrite
other data (e.g. on other partitions). Using /dev/mmcblk1boot1 as
"entry point" the kernel should reject write requests which go beyond
the partition size.
BR, Michael
next prev parent reply other threads:[~2013-08-24 13:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-23 12:25 [U-Boot] can u-boot tools fw_{printenv, setenv} work with eMMC HW partition? Robert P. J. Day
2013-08-23 12:44 ` Andreas Bießmann
2013-08-23 12:57 ` Robert P. J. Day
2013-08-23 12:46 ` Stefano Babic
2013-08-23 13:25 ` Robert P. J. Day
2013-08-23 15:19 ` Luka Perkov
2013-08-23 15:28 ` Robert P. J. Day
2013-08-23 21:11 ` Robert P. J. Day
2013-08-23 22:20 ` Luka Perkov
2013-08-24 4:01 ` Robert P. J. Day
2013-08-24 11:16 ` Luka Perkov
2013-08-24 11:37 ` Robert P. J. Day
2013-08-24 13:08 ` Michael Heimpold [this message]
2013-08-24 17:33 ` Luka Perkov
2013-08-25 10:47 ` Stefano Babic
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=2868345.KCFN3Hjp9Z@kerker \
--to=mhei@heimpold.de \
--cc=u-boot@lists.denx.de \
/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