All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manuel Sahm <Manuel.Sahm@feig.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] make env
Date: Tue, 25 Mar 2008 13:56:38 +0100	[thread overview]
Message-ID: <47E8F686.9020903@feig.de> (raw)
In-Reply-To: <20080320213357.GA22780@michl.2n.cz>

Hello,

I took the U-Boot version 1.3.2; now I am able to generate the make env 
-> fw_printenv utility.

I copy the jw_printenv binary and rename it to fw_setenv.

I use the config file in the /etc directory.
I want to access a NAND flash. [Pagesize = 0x800; ERASEBLOCKSIZE=0x20000]
My uboot is in mtd1.
mtd1 is from 0x20000 ... 0x100000 in my NAND-Flash
The Uboot enviroment is from 0x60000...0x80000; the redundant from 
0x80000...0x100000

My fw_config file is:

/dev/mtd1      0x40000   0x20000   0x20000
/dev/mtd1      0x60000   0x20000   0x20000

Is this correct ?

I am able tu use fw_printenv, the variables are printed on the console
If I use fw_setenv I get errors:

fw_setenv test 1

Unlocking Flash
Done
nand_write: attempting to write not page aligned data
Erasing old enviroment
Done
Writing enviroment to /dev/mtd1: Invalid argument
Error: can?t write fw_env to flash

What?s wrong ????

Thank you very much

Manuel Sahm


Ladislav Michl schrieb:
> On Thu, Mar 20, 2008 at 10:27:18PM +0100, Wolfgang Denk wrote:
>   
>> It's not fw_setenv specific. You would have to do the same  when  you
>> cross-compile  any  other  native  Linux  application  code. The best
>> approach would be to fix your toolchain.
>>     
>
> Well, any other applications compile just fine. This is needed only when
> you are interfacing some kernel subsystem (MTD in this case) and need
> its headers. Current approach needs one toolchain for compiling fw_setenv
> with 2.4 kernel and another for 2.6 kernel while there is no technical
> reason not to use very same toolchain for both.
>
> Best regards,
> 	ladis
>
> PS. I'm just pointing to one minor difficulty, as I have no problem with
> that. I only tried to guess where might be Manuel's problem once he
> figure out MTD_VERSION variable.
>
>   

  reply	other threads:[~2008-03-25 12:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-20 15:57 [U-Boot-Users] make env Manuel Sahm
2008-03-20 16:04 ` Wolfgang Denk
2008-03-20 17:56   ` Ladislav Michl
2008-03-20 20:02     ` Wolfgang Denk
2008-03-20 20:11       ` Ladislav Michl
2008-03-20 21:27         ` Wolfgang Denk
2008-03-20 21:33           ` Ladislav Michl
2008-03-25 12:56             ` Manuel Sahm [this message]
2008-03-25 13:36               ` Markus Klotzbücher
2008-03-25 16:19                 ` Manuel Sahm
2008-03-25 17:04                   ` Markus Klotzbücher
2008-03-25 20:11               ` Wolfgang Denk
2008-04-02  9:31                 ` Manuel Sahm
2008-04-02 10:39                   ` Wolfgang Denk
2008-04-02 11:18                     ` Manuel Sahm
2008-04-02 14:33                       ` Wolfgang Denk
2008-04-06 17:37                       ` Markus Klotzbücher

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=47E8F686.9020903@feig.de \
    --to=manuel.sahm@feig.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.