From: Holger Brunck <holger.brunck@keymile.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 22/30] km/common: implement setboardid as a command
Date: Mon, 02 May 2011 09:32:11 +0200 [thread overview]
Message-ID: <4DBE5DFB.5000501@keymile.com> (raw)
In-Reply-To: <20110430082521.5DD29D5270E@gemini.denx.de>
Hi,
On 04/30/2011 10:25 AM, Wolfgang Denk wrote:
> Dear Valentin Longchamp,
>
> In message <30d7413306aba80ca4540c3353d884bdffe9a643.1302272395.git.valentin.longchamp@keymile.com> you wrote:
>> From: Holger Brunck <holger.brunck@keymile.com>
>>
>> Read out board id and HW key from the IVM eeprom and set
>> these values as an environment variable was now done inside the
>> code as a command.
>
> This begs to ask: and how has it been done so far? Should this patch
> not remove some old code, then?
>
Yes it does, we did it previously in the default environment. But this was an
out of tree patch so far. Maybe I should adapt the commit message.
>> +{
>> + unsigned char buf[32];
>> + char *p;
>> +
>> + p = get_local_var("IVM_BoardId");
>> + sprintf((char *)buf, "%s", p);
>> + setenv("boardid", (char *)buf);
>> + p = get_local_var("IVM_HWKey");
>> + sprintf((char *)buf, "%s", p);
>> + setenv("hwkey", (char *)buf);
>
> get_local_var() will return NULL in some cases. Error handling
> missing.
>
Ok.
>> + return 0;
>
> As is, the return 0 makes no sense, but I guess this will change when
> you add error handling.
>
Yes.
Thanks.
Best regards
Holger Brunck
next prev parent reply other threads:[~2011-05-02 7:32 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-08 14:23 [U-Boot] [PATCH 00/30] Keymile boards mainlining, part 2 (resend) Valentin Longchamp
2011-04-08 14:23 ` [U-Boot] [PATCH 01/30] lib, vsprintf: introduce strict_strtoul Valentin Longchamp
2011-04-29 23:15 ` Wolfgang Denk
2011-05-03 7:33 ` [U-Boot] [PATCH v2] " Heiko Schocher
2011-05-12 19:07 ` Wolfgang Denk
2011-04-08 14:23 ` [U-Boot] [PATCH 02/30] powerpc/km82xx: add DIP switch detection Valentin Longchamp
2011-04-08 14:23 ` [U-Boot] [PATCH 03/30] km/common: remove hdlc_enet implementation Valentin Longchamp
2011-04-08 14:23 ` [U-Boot] [PATCH 04/30] powerpc/km82xx: cleanup coding style for mgcoge.c Valentin Longchamp
2011-04-08 14:23 ` [U-Boot] [PATCH 05/30] powerpc/km82xx: rename mgcoge files to km82xx Valentin Longchamp
2011-04-08 14:23 ` [U-Boot] [PATCH 06/30] powerpc/km82xx: move SDRAM config to board config Valentin Longchamp
2011-04-30 7:56 ` Wolfgang Denk
2011-05-02 8:04 ` Holger Brunck
2011-05-02 8:39 ` Wolfgang Denk
2011-04-08 14:23 ` [U-Boot] [PATCH 07/30] powerpc/km82xx: adapt CONFIG_SYSSYPCR to manual Valentin Longchamp
2011-04-08 14:23 ` [U-Boot] [PATCH 08/30] powerpc/km82xx: rename mgcoge2ne to mgcoge3ne board support Valentin Longchamp
2011-04-30 8:05 ` Wolfgang Denk
2011-05-02 8:20 ` Holger Brunck
2011-05-02 8:42 ` Wolfgang Denk
2011-05-02 9:22 ` Holger Brunck
2011-05-10 20:45 ` Wolfgang Denk
2011-04-08 14:23 ` [U-Boot] [PATCH 09/30] poweprc/km82xx: add board specific environment variable Valentin Longchamp
2011-04-08 14:24 ` [U-Boot] [PATCH 10/30] arm/km: add addbootcount " Valentin Longchamp
2011-04-30 8:09 ` Wolfgang Denk
2011-05-02 8:22 ` Holger Brunck
2011-04-08 14:24 ` [U-Boot] [PATCH 11/30] arm/km: remove last_stage_init and unneeded printouts Valentin Longchamp
2011-04-08 14:24 ` [U-Boot] [PATCH 12/30] arm/km: add CRAMFS support for keymile boards Valentin Longchamp
2011-04-08 14:24 ` [U-Boot] [PATCH 13/30] arm/km: add mkimage config file for uart download Valentin Longchamp
2011-04-08 14:24 ` [U-Boot] [PATCH 14/30] arm/km: add BootROM config files for memphis SDRAM Valentin Longchamp
2011-04-08 14:24 ` [U-Boot] [PATCH 15/30] arm/km: disable ls (through jffs2 support) Valentin Longchamp
2011-04-08 14:24 ` [U-Boot] [PATCH 16/30] arm/km: add second serial interface for kirkwood Valentin Longchamp
2011-04-08 14:24 ` [U-Boot] [PATCH 17/30] cramfs: make cramfs usable without a NOR flash Valentin Longchamp
2011-04-30 8:20 ` Wolfgang Denk
2011-05-03 5:49 ` Heiko Schocher
2011-05-03 11:48 ` Wolfgang Denk
2011-05-03 12:15 ` [U-Boot] [PATCH v2 1/2] cramfs: fix bug in using CONFIG_CRAMFS_CMDLINE Heiko Schocher
2011-05-10 20:47 ` Wolfgang Denk
2011-05-03 12:15 ` [U-Boot] [PATCH v2 2/2] cramfs: make cramfs usable without a NOR flash Heiko Schocher
2011-05-10 20:47 ` Wolfgang Denk
2011-04-08 14:24 ` [U-Boot] [PATCH 18/30] i2c: add i2c deblock sequence before and after every mux config Valentin Longchamp
2011-04-28 17:26 ` Heiko Schocher
2011-04-08 14:24 ` [U-Boot] [PATCH 19/30] i2c, soft_i2c: deblock bus if switching to another i2c bus Valentin Longchamp
2011-04-28 17:26 ` Heiko Schocher
2011-04-08 14:24 ` [U-Boot] [PATCH 20/30] km/common: fix initial_boot_bank for bootpackages Valentin Longchamp
2011-04-08 14:24 ` [U-Boot] [PATCH 21/30] common/hush: make get_local_var visible for other users Valentin Longchamp
2011-04-30 8:22 ` Wolfgang Denk
2011-05-02 5:23 ` Heiko Schocher
2011-05-02 5:40 ` Wolfgang Denk
2011-04-08 14:24 ` [U-Boot] [PATCH 22/30] km/common: implement setboardid as a command Valentin Longchamp
2011-04-30 8:25 ` Wolfgang Denk
2011-05-02 7:32 ` Holger Brunck [this message]
2011-04-08 14:24 ` [U-Boot] [PATCH 23/30] km/common: replace env var checkboardidlist by function Valentin Longchamp
2011-04-30 8:29 ` Wolfgang Denk
2011-05-02 8:30 ` Holger Brunck
2011-05-02 8:43 ` Wolfgang Denk
2011-04-08 14:24 ` [U-Boot] [PATCH 24/30] km/common: add pnvramsize to default environment Valentin Longchamp
2011-04-30 8:32 ` Wolfgang Denk
2011-05-02 7:41 ` Holger Brunck
2011-04-08 14:24 ` [U-Boot] [PATCH 25/30] km/common: fix coding style issues in generic header Valentin Longchamp
2011-04-08 14:24 ` [U-Boot] [PATCH 26/30] arm, powerpc, keymile boards: move keymile specific header in subdir Valentin Longchamp
2011-04-08 14:24 ` [U-Boot] [PATCH 27/30] km/common: simplify default environment Valentin Longchamp
2011-04-08 14:24 ` [U-Boot] [PATCH 28/30] arm/km: rename mgcoge2un to mgcoge3un Valentin Longchamp
2011-04-08 14:24 ` [U-Boot] [PATCH 29/30] arm/km: change default settings for egiga on mgcoge3un Valentin Longchamp
2011-04-08 14:24 ` [U-Boot] [PATCH 30/30] arm/km: update mgcoge3un board support Valentin Longchamp
2011-05-03 8:17 ` [U-Boot] [PATCH 00/30] Keymile boards mainlining, part 2 (resend) Valentin Longchamp
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=4DBE5DFB.5000501@keymile.com \
--to=holger.brunck@keymile.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