public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Andreas Bießmann" <andreas.devel@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] can u-boot tools fw_{printenv, setenv} work with eMMC HW partition?
Date: Fri, 23 Aug 2013 14:44:53 +0200	[thread overview]
Message-ID: <52175945.9020209@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1308230816340.21283@oneiric>

Dear Robert P. J. Day,

On 08/23/2013 02:25 PM, Robert P. J. Day wrote:

<snip>

> so it's clearly there, but i have no idea what i'd put in
> /etc/fw_env.config to refer to that partition.
> 
>   i tried adding the simple line:
> 
> /dev/mmcblk1boot1       0x0     0x4000
> 
> to (allegedly) represent a block device, but i got the error:
> 
> # fw_printenv
> Cannot access MTD device /dev/mmcblk1boot: No such file or directory
> #

I think you stumble over this:

---8<---
abiessmann@punisher % grep -C 4 'struct envdev_s' tools/env/fw_env.c
	typeof(y) _min2 = (y);			\
	(void) (&_min1 == &_min2);		\
	_min1 < _min2 ? _min1 : _min2; })

struct envdev_s {
	char devname[16];		/* Device name */
	ulong devoff;			/* Device offset */
	ulong env_size;			/* environment size */
	ulong erase_size;		/* device erase size */
	ulong env_sectors;		/* number of environment sectors */
	uint8_t mtd_type;		/* type of the MTD device */
};
--->8---

An device name can only have 16 char by this declaration ;)

> so i'm guessing that was a really bad initial guess. i'm guessing i'd
> need to add a line referring to the existing device file /dev/mmcblk1,
> and add the actual HW partition offset and size, yes? i just have to
> figure out what that is, if that's the way it's done.

Dunno if that'd be all to support RAW eMMC partition. As long as thy
behave like raw MTD partition it should work out.

Best regards

Andreas Bie?mann

  reply	other threads:[~2013-08-23 12:44 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 [this message]
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
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=52175945.9020209@gmail.com \
    --to=andreas.devel@googlemail.com \
    --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