* Re: Access u-boot environment variables from Linux
2003-07-14 9:05 Access u-boot environment variables from Linux Eli Brin
@ 2003-07-14 8:41 ` Wolfgang Denk
0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2003-07-14 8:41 UTC (permalink / raw)
To: Eli Brin; +Cc: 'linuxppc-embedded@lists.linuxppc.org'
Dear Eli,
in message <75DF04AC5ED4D511A9810090273CB4163F5DE0@rokonet-e.rokonet.co.il> you wrote:
>
> I will start at the beginning, as I should have...
Thanks :-)
> I would like the manufacturing to burn the H/W configuration and MAC
> to the flash, and the TQ860L probably at 0x3ff00. They will also burn
> u-boot,
With "burn ... the TQ860L ... at 0x3ff00" you mean the TQ-specific
Hardware Information Block which can be installed at offset
0x0003FFC0 in the first flash bank?
> I would like u-boot to read this data (H/W configuration and MAC) and
> put it into environment variables. I would like to read and modify
> those variables from Linux user space.
The first part, the initialization of some vendor dependend environ-
ment variables (i. e. serial# and ethaddr) has already been implemen-
ted for the TQM8xx modules: see board/tqm8xx/load_sernum_ethaddr.c
For the second part, reading and modifying environment variables from
Linux, see the tools I mentioned before (in tools/env).
> We use MTD for updating the kernel, ramdisk, jffs2. But, I can not (or
> don't know how) the get access to the u-boot environment variables
> with MTD. I have an MTD patch from Nye (Zuma networks) to do exactly
> that, but I did not test it yet on kernel 2.4.4.
I answered this already in my previous message. Use the tools/env
stuff.
> So I thought to use MTD for remote update and jffs2, and your patch to
> busybox to get access to u-boot variables.
This stuff has been obsoleted by the solution in tools/env which
allows for easy configuration to different boards / setups.
> I find it easier to use SELF. We use ELDK for development and tests,
> but for creating the final target images, SELF is great.
Yes, but it makes little sense to always recompile everything from
scratch when the same tools are ready available as binaries in the
ELDK.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de
The C-shell doesn't parse. It adhoculates.
- Casper.Dik@Holland.Sun.COM in <3ol96k$b2j@engnews2.Eng.Sun.COM>
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: Access u-boot environment variables from Linux
@ 2003-07-14 9:05 Eli Brin
2003-07-14 8:41 ` Wolfgang Denk
0 siblings, 1 reply; 6+ messages in thread
From: Eli Brin @ 2003-07-14 9:05 UTC (permalink / raw)
To: 'Wolfgang Denk'; +Cc: 'linuxppc-embedded@lists.linuxppc.org'
Dear Wolfgang,
I will start at the beginning, as I should have...
We will have multiple configurations of our target hardware (with/without
modem, no. of uarts, PCMCIA, USB and more...).
I would like the manufacturing to burn the H/W configuration and MAC to the
flash, and the TQ860L probably at 0x3ff00. They will also burn u-boot,
kernel, ramdisk and jffs2 partitions. We will provide a raw file for
programming, and they will modify the H/W configuration and MAC area.
I would like u-boot to read this data (H/W configuration and MAC) and put it
into environment variables. I would like to read and modify those variables
from Linux user space.
We use MTD for updating the kernel, ramdisk, jffs2. But, I can not (or
don't know how) the get access to the u-boot environment variables with MTD.
I have an MTD patch from Nye (Zuma networks) to do exactly that, but I did
not test it yet on kernel 2.4.4.
So I thought to use MTD for remote update and jffs2, and your patch to
busybox to get access to u-boot variables.
Regarding SELF:
I find it easier to use SELF. We use ELDK for development and tests, but
for creating the final target images, SELF is great.
We added our own applications and module and libraries from work done with
ELDK like openssl and mgetty. So we updated the SELF scripts to reflect new
kernel and libraries (2.2.5) and MTD from ELDK .
If there is a better/easier way to get access to H/W configuration data
from Linux user space I will be glad to learn.
Now that I have read the README file in /tools/env I don't need the old
/dev/flasha anymore - Thanks :).
Thank you,
Eli Brin
I would like to get the H/W configuration
-----Original Message-----
From: Wolfgang Denk [mailto:wd@denx.de]
Sent: Monday, July 14, 2003 12:05 AM
To: Eli Brin
Cc: 'linuxppc-embedded@lists.linuxppc.org'
Subject: Re: Access u-boot environment variables from Linux
Dear Eli,
in message <75DF04AC5ED4D511A9810090273CB4163F5DDD@rokonet-e.rokonet.co.il>
you wrote:
>
> I have configure the config.mk.TQM860L_FEC file with: HAVE_FLASH_ENV =
> yes.
I thinkthis file is referring to a _very_ old version of the Linux
kernel. You'd better use the Linux kernel and the SELF package that comes
included with the ELDK, or use the top of our CVS tree.
> modprobe: modprobe: Can't locate module char-major-60
> /dev/flasha: No such device
>
> I can see all /dev/flasha and others.
>
> The kernel is the default TQM860L_FEC from the ELDK (not from SELF,
> but should be the same).
Grrrgh...
Your description gives no indication of what you're trying to do, and what
you're doing. Please note, that you have two options for the flash
driver: the old, non-standard character device interface [/dev/flash*]
(which is there just for backward compatibility with some existing
projects, and because it supports a mmap() interface),
or you can use the standard MTD interface [/dev/mtd*,
/dev/mtdblock*].
>From your description I think you want to use the MTD interface.
The MTD interface is also what is being used the default
configurations of our current kernel trees.
If I guess right, you want to access /dev/mtd*, not /dev/flash*
Also, judging from the subject of your posting, you should probably read
the "tools/env/README" file in the U-Boot source tree.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de A wise
person makes his own decisions, a weak one obeys public
opinion. -- Chinese proverb
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: Access u-boot environment variables from Linux
@ 2003-07-14 10:18 Eli Brin
2003-07-14 10:13 ` Wolfgang Denk
0 siblings, 1 reply; 6+ messages in thread
From: Eli Brin @ 2003-07-14 10:18 UTC (permalink / raw)
To: 'Wolfgang Denk'; +Cc: 'linuxppc-embedded@lists.linuxppc.org'
Dear Wolfgang,
>With "burn ... the TQ860L ... at 0x3ff00" you mean the TQ-specific
>Hardware Information Block which can be installed at offset
>0x0003FFC0 in the first flash bank?
Yes, but our final target will use 0x0003FF00, so we can have more
space. We are making our target as compatible as possible to the
TQM860L.
>This stuff has been obsoleted by the solution in tools/env which
>allows for easy configuration to different boards / setups.
Yes. I didn't know of it. It was absent in ppc-boot, and _reading_ the
change log from version to version may solve this...
>Yes, but it makes little sense to always recompile everything from
>scratch when the same tools are ready available as binaries in the ELDK.
Perhaps, and probably, you are right. I will re-check/re-think. It looks
easier to make changes on the SELF scripts. And it can be used on Linux
version that do not support the ELDK rebuild from scratch.
Anyway, my original problem is solved :) . I use the /tools/env, and
perhaps later the MTD patch.
Thanks,
Eli Brin
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Access u-boot environment variables from Linux
2003-07-14 10:18 Eli Brin
@ 2003-07-14 10:13 ` Wolfgang Denk
0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2003-07-14 10:13 UTC (permalink / raw)
To: Eli Brin; +Cc: 'linuxppc-embedded@lists.linuxppc.org'
Dear Eli,
in message <75DF04AC5ED4D511A9810090273CB4163F5DE2@rokonet-e.rokonet.co.il> you wrote:
>
> >Hardware Information Block which can be installed at offset
> >0x0003FFC0 in the first flash bank?
>
> Yes, but our final target will use 0x0003FF00, so we can have more
> space. We are making our target as compatible as possible to the
> TQM860L.
Well, if you move the address, you're breaking compatibility anyway.
Feel free to implement a proprietary solution that fits your needs.
> Perhaps, and probably, you are right. I will re-check/re-think. It
> looks easier to make changes on the SELF scripts. And it can be used
> on Linux version that do not support the ELDK rebuild from scratch.
Agreed.
> Anyway, my original problem is solved :) . I use the /tools/env, and
> perhaps later the MTD patch.
Fine.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de
In C we had to code our own bugs, in C++ we can inherit them.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Access u-boot environment variables from Linux
2003-07-13 15:38 Eli Brin
@ 2003-07-13 22:04 ` Wolfgang Denk
0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2003-07-13 22:04 UTC (permalink / raw)
To: Eli Brin; +Cc: 'linuxppc-embedded@lists.linuxppc.org'
Dear Eli,
in message <75DF04AC5ED4D511A9810090273CB4163F5DDD@rokonet-e.rokonet.co.il> you wrote:
>
> I have configure the config.mk.TQM860L_FEC file with: HAVE_FLASH_ENV = yes.
I thinkthis file is referring to a _very_ old version of the Linux
kernel. You'd better use the Linux kernel and the SELF package that
comes included with the ELDK, or use the top of our CVS tree.
> modprobe: modprobe: Can't locate module char-major-60
> /dev/flasha: No such device
>
> I can see all /dev/flasha and others.
>
> The kernel is the default TQM860L_FEC from the ELDK (not from SELF, but
> should be the same).
Grrrgh...
Your description gives no indication of what you're trying to do, and
what you're doing. Please note, that you have two options for the
flash driver: the old, non-standard character device interface
[/dev/flash*] (which is there just for backward compatibility with
some existing projects, and because it supports a mmap() interface),
or you can use the standard MTD interface [/dev/mtd*,
/dev/mtdblock*].
>From your description I think you want to use the MTD interface.
The MTD interface is also what is being used the default
configurations of our current kernel trees.
If I guess right, you want to access /dev/mtd*, not /dev/flash*
Also, judging from the subject of your posting, you should probably
read the "tools/env/README" file in the U-Boot source tree.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de
A wise person makes his own decisions, a weak one obeys public
opinion. -- Chinese proverb
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Access u-boot environment variables from Linux
@ 2003-07-13 15:38 Eli Brin
2003-07-13 22:04 ` Wolfgang Denk
0 siblings, 1 reply; 6+ messages in thread
From: Eli Brin @ 2003-07-13 15:38 UTC (permalink / raw)
To: 'linuxppc-embedded@lists.linuxppc.org'
Hello,
I use the SELF from Denx (with busybox 0.60.1).
I have configure the config.mk.TQM860L_FEC file with: HAVE_FLASH_ENV = yes.
Also, I have copied the /lib/modules folder from the ELDK so the modprobe
wont complain.
Trying to do: printenv, flash_info or any command result in :
modprobe: modprobe: Can't locate module char-major-60
/dev/flasha: No such device
I can see all /dev/flasha and others.
The kernel is the default TQM860L_FEC from the ELDK (not from SELF, but
should be the same).
Please advise...
Thank you,
Eli Brin
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-07-14 10:18 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-14 9:05 Access u-boot environment variables from Linux Eli Brin
2003-07-14 8:41 ` Wolfgang Denk
-- strict thread matches above, loose matches on Subject: below --
2003-07-14 10:18 Eli Brin
2003-07-14 10:13 ` Wolfgang Denk
2003-07-13 15:38 Eli Brin
2003-07-13 22:04 ` Wolfgang Denk
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.