Add PXE support
Subsystems (3)
v5 cover Add PXE support
This patch series adds PXE booting support to U-boot. It adds aseries of DHCP options to allow U-boot DHCP requests to be compliant with RFC 4578, and a set of commands to provide PXELINUX like behavior.
The pxe commands provide a near subset of the functionality provided by the PXELINUX boot loader. This allows U-boot based systems to be controlled remotely using the same PXE based techniques that many non U-boot based servers use.
As an example, support for the pxe commands is enabled for the ca9x4_ct_vxp config.
Additional details for the pxe commands are available in the README.pxe file added as part of this patch series.
This patch series adds support for RFC 4578 compliant DHCP request options, which enhance the ability of DHCP servers to respond differently to different clients.
As an example, the last patch in this series enables support for the PXE DHCP options for the ca9x4_ct_vxp config.
v5 of the patch series responds to a couple of comments from Mike Frysinger, and fixes a checkpatch simple_strtoul warning. Details are in the individual patch logs.
Jason Hobbs (13):
Add generic, reusable menu code
common, menu: use abortboot for menu timeout
common: add run_command2 for running simple or hush commands Add isblank
cosmetic: remove unneeded curly braces
Replace space and tab checks with isblank
README: document standard image variables
lib: add uuid_str_to_bin for use with bootp and PXE uuid Add pxe command
net: bootp: add PXE/RFC 4578 DHCP options support Convert ca9x4_ct_vxp to standard env variables
arm: ca9x4_ct_vxp: enable pxe command support
arm: ca9x4_ct_vxp: enable PXE BOOTP options support
README | 19 + board/hymod/env.c | 9 +- common/Makefile | 2 + common/cmd_pxe.c | 1355 ++++++++++++++++++++++++++++++++++ common/command.c | 9 +- common/hush.c | 2 +- common/main.c | 75 +- common/menu.c | 417 +++++++++++ doc/README.menu | 119 +++ doc/README.pxe | 240 ++++++ drivers/bios_emulator/x86emu/debug.c | 7 +- examples/standalone/smc911x_eeprom.c | 5 +- include/common.h | 13 + include/configs/ca9x4_ct_vxp.h | 19 +- include/hush.h | 2 +- include/linux/ctype.h | 6 + include/menu.h | 30 + lib/Makefile | 1 + lib/hashtable.c | 4 +- lib/uuid.c | 85 +++ net/bootp.c | 40 + 21 files changed, 2402 insertions(+), 57 deletions(-) create mode 100644 common/cmd_pxe.c create mode 100644 common/menu.c create mode 100644 doc/README.menu create mode 100644 doc/README.pxe create mode 100644 include/menu.h create mode 100644 lib/uuid.c
PATCH v5 1/13 Add generic, reusable menu code
This will be used first by the pxe code, but is intended to be generic and reusable for other jobs in U-boot.
---
changes in v2:
- new in v2
changes in v3:
- move timeout support to later patch
- fix NULL case bug in menu_item_key_match
- consistently use 'item_key' instead of 'key'
- move default/prompt logic into menu code
- consistently return int for error propagation
- change option setting functions to menu_create parameters
- add README.menu
changes in v4:
- change pxecfg to pxe in commit log
- improve the menu documentation
changes in v5:
- none
common/Makefile | 1 + common/menu.c | 393 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ doc/README.menu | 119 +++++++++++++++++ include/menu.h | 30 ++++ 4 files changed, 543 insertions(+), 0 deletions(-) create mode 100644 common/menu.c create mode 100644 doc/README.menu create mode 100644 include/menu.h
common/Makefile +1 -0
@@ -169,6 +169,7 @@ COBJS-$(CONFIG_CMD_KGDB) += kgdb.o kgdb_stubs.o COBJS-$(CONFIG_KALLSYMS) += kallsyms.o COBJS-$(CONFIG_LCD) += lcd.o COBJS-$(CONFIG_LYNXKDI) += lynxkdi.o +COBJS-$(CONFIG_MENU) += menu.o COBJS-$(CONFIG_MODEM_SUPPORT) += modem.o COBJS-$(CONFIG_UPDATE_TFTP) += update.o COBJS-$(CONFIG_USB_KEYBOARD) += usb_kbd.o
common/menu.c new file +393 -0
393 lines not on this page · raw message
doc/README.menu new file +119 -0
119 lines not on this page · raw message
include/menu.h new file +30 -0
@@ -0,0 +1,30 @@ +/* +* Copyright 2010-2011 Calxeda, Inc. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the Free +* Software Foundation; either version 2 of the License, or (at your option) +* any later version. +* +* This program is distributed in the hope it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +* +* You should have received a copy of the GNU General Public License along with +* this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef __MENU_H__ +#define __MENU_H__ + +struct menu ; + +struct menu *menu_create (char *title,int prompt, +void (*item_data_print)(void *)); +int menu_default_set (struct menu *m,char *item_key); +int menu_get_choice (struct menu *m,void **choice); +int menu_item_add (struct menu *m,char *item_key,void *item_data); +int menu_destroy (struct menu *m); + +#endif /* __MENU_H__ */
Signature · 1 line
1.7.0.4
Wolfgang Denk
AppliedPATCH v5 1/13 Add generic, reusable menu code
Dear "Jason Hobbs",
Quoted 24 lines · In message <[email protected]> you…
This will be used first by the pxe code, but is intended to be generic and reusable for other jobs in U-boot.
Signed-off-by Jason Hobbs <[email protected]>---
changes in v2:
- new in v2changes in v3:
- move timeout support to later patch
- fix NULL case bug inmenu_item_key_match
- consistently use 'item_key' instead of 'key'
- move default/prompt logic into menu code
- consistently return int for error propagation
- change option setting functions tomenu_createparameters
- add README.menuchanges in v4:
- change pxecfg to pxe in commit log
- improve the menu documentationchanges in v5:
- none
Quoted 8 lines
common/Makefile | 1 + common/menu.c | 393 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ doc/README.menu | 119 +++++++++++++++++ include/menu.h | 30 ++++ 4 files changed, 543 insertions(+), 0 deletions(-) create mode 100644 common/menu.c create mode 100644 doc/README.menu create mode 100644 include/menu.h
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "One planet is all you get."
PATCH v5 2/13 common, menu: use abortboot for menu timeout
In reply to Jason Hobbs---
changes in v2:
- expose abortboot externally instead of using a wrapper
- expose abortboot externally when CONFIG_MENU is set
changes in v3:
- simplify the conditional export of abortboot
- add timeout support for the menu in this patch
- add doc for timeout feature
changes in v4:
- added more comments to menu.c
changes in v5:
- none
common/main.c | 10 ++++++++-- common/menu.c | 40 ++++++++++++++++++++++++++++++++-------- doc/README.menu | 6 +++--- include/common.h | 3 +++ include/menu.h | 2 +- 5 files changed, 47 insertions(+), 14 deletions(-)
common/main.c +8 -2
@@ -88,7 +88,10 @@ extern void mdm_init(void); /* defined in board.c */*/ #if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >= 0) # if defined(CONFIG_AUTOBOOT_KEYED) -static inline int abortboot(int bootdelay) +#ifndef CONFIG_MENU +static inline +#endif +int abortboot(int bootdelay) { int abort = 0; uint64_t etime = endtick(bootdelay);
@@ -202,7 +205,10 @@ static inline int abortboot(int bootdelay)static int menukey =0 ;#endif -static inline int abortboot (int bootdelay) +#ifndef CONFIG_MENU +static inline +#endif +int abortboot (int bootdelay) {int abort =0 ;
common/menu.c +32 -8
@@ -43,6 +43,7 @@ struct menu_item {*/ struct menu {struct menu_item *default_item; +int timeout;char *title;int prompt;void (*item_data_print)(void *);
@@ -158,13 +159,29 @@ static inline struct menu_item *menu_item_by_key(struct menu *m, }/* +* Wait for the user to hit a key according to the timeout set for the menu. +* Returns 1 if the user hit a key, or 0 if the timeout expired. +*/ +static inline int menu_interrupted (struct menu *m) +{ +if (!m->timeout) +return 0 ; + +if (abortboot (m->timeout/10 )) +return 1 ; + +return 0 ; +} + +/* * Checks whether or not the default menu item should be used without -* prompting for a user choice. If the menu is set to always prompt, return -* 0. Otherwise, return 1 to indicate we should use the default menu item. +* prompting for a user choice. If the menu is set to always prompt, or the +* user hits a key during the timeout period, return 0. Otherwise, return 1 to +* indicate we should use the default menu item. */ static inline int menu_use_default (struct menu *m) { -return !m->prompt; +return !m->prompt && !menu_interrupted (m); }/*
@@ -250,7 +267,8 @@ int menu_default_set(struct menu *m, char *item_key)/* * menu_get_choice() - Returns the user's selected menu entry, or the default -* if the menu is set to not prompt. This is safe to call more than once. +* if the menu is set to not prompt or the timeout expires. This is safe to +* call more than once. * * m - Points to a menu created by menu_create(). *
@@ -259,8 +277,8 @@ int menu_default_set(struct menu *m, char *item_key)* written at the location it points to. * * Returns 1 if successful, -EINVAL if m or choice is NULL, -ENOENT if no -* default has been set and the menu is set to not prompt, or -EINTR if the -* user exits the menu via ^c. +* default has been set and the menu is set to not prompt or the timeout +* expires, or -EINTR if the user exits the menu via ^c. */ int menu_get_choice (struct menu *m,void **choice) {
@@ -330,7 +348,12 @@ int menu_item_add(struct menu *m, char *item_key, void *item_data)* list of menu items. It will be copied to internal storage, and is safe to * discard after passing to menu_create(). * -* prompt - If 0, don't ask for user input. +* timeout - A delay in seconds to wait for user input. If 0, timeout is +* disabled, and the default choice will be returned unless prompt is 1. +* +* prompt - If 0, don't ask for user input unless there is an interrupted +* timeout. If 1, the user will be prompted for input regardless of the value +* of timeout. * * item_data_print - If not NULL, will be called for each item when the menu * is displayed, with the pointer to the item's data passed as the argument.
@@ -341,7 +364,7 @@ int menu_item_add(struct menu *m, char *item_key, void *item_data)* Returns a pointer to the menu if successful, or NULL if there is * insufficient memory available to create the menu. */ -struct menu *menu_create (char *title,int prompt, +struct menu *menu_create (char *title,int timeout,int prompt,void (*item_data_print)(void *)) {struct menu *m;
@@ -353,6 +376,7 @@ struct menu *menu_create(char *title, int prompt, m->default_item =NULL ; m->prompt = prompt; + m->timeout = timeout; m->item_data_print = item_data_print;if (title) {
doc/README.menu +3 -3
@@ -45,7 +45,7 @@ struct menu; /* * menu_create() - Creates a menu handle with default settings */ -struct menu *menu_create(char *title, int prompt, +struct menu *menu_create(char *title, int timeout, int prompt, void (*item_data_print)(void *)); /*
@@ -60,7 +60,7 @@ int menu_default_set(struct menu *m, char *item_key); /* * menu_get_choice() - Returns the user's selected menu entry, or the - * default if the menu is set to not prompt. + * default if the menu is set to not prompt or the timeout expires. */ int menu_get_choice(struct menu *m, void **choice);
@@ -90,7 +90,7 @@ char *pick_a_tool(void) int i; char *tool = NULL; - m = menu_create("Tools", 1, NULL); + m = menu_create("Tools", 0, 1, NULL); for(i = 0; tools[i]; i++) { if (menu_item_add(m, tools[i], tools[i]) != 1) {
include/common.h +3 -0
@@ -239,6 +239,9 @@ int readline_into_buffer (const char *const prompt, char * buffer);int parse_line (char *,char *[]);void init_cmd_timeout (void );void reset_cmd_timeout (void ); +#ifdef CONFIG_MENU +int abortboot (int bootdelay); +#endif /* arch/$(ARCH)/lib/board.c */ void board_init_f (ulong ) __attribute__ ((noreturn));
include/menu.h +1 -1
@@ -20,7 +20,7 @@struct menu ; -struct menu *menu_create (char *title,int prompt, +struct menu *menu_create (char *title,int timeout,int prompt,void (*item_data_print)(void *));int menu_default_set (struct menu *m,char *item_key);int menu_get_choice (struct menu *m,void **choice);
Signature · 1 line
1.7.0.4
Wolfgang Denk
AppliedPATCH v5 2/13 common, menu: use abortboot for menu timeout
Dear "Jason Hobbs",
Quoted 17 lines · In message <[email protected]> you…
Signed-off-by Jason Hobbs <[email protected]>---
changes in v2:
- expose abortboot externally instead of using a wrapper
- expose abortboot externally whenCONFIG_MENUis setchanges in v3:
- simplify the conditional export of abortboot
- add timeout support for the menu in this patch
- add doc for timeout featurechanges in v4:
- added more comments tomenu.cchanges in v5:
- none
Quoted 6 lines
common/main.c | 10 ++++++++-- common/menu.c | 40 ++++++++++++++++++++++++++++++++-------- doc/README.menu | 6 +++--- include/common.h | 3 +++ include/menu.h | 2 +- 5 files changed, 47 insertions(+), 14 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Drawing on my fine command of language, I said nothing.
PATCH v5 3/13 common: add run_command2 for running simple or hush commands
In reply to Jason Hobbs---
changes in v2:
- whitespace correction
changes in v4:
- fix indention of a run_command2 line
- make run_command2 static inline
changes in v5:
- return parse_string_outer value directly
common/hush.c | 2 +- common/main.c | 56 +++++++++++++++++++++++++++----------------------------- include/hush.h | 2 +- 3 files changed, 29 insertions(+), 31 deletions(-)
common/hush.c +1 -1
@@ -3217,7 +3217,7 @@ int parse_stream_outer(struct in_str *inp, int flag)#ifndef __U_BOOT__ static int parse_string_outer(const char *s, int flag)#else -int parse_string_outer(char *s, int flag) +int parse_string_outer(const char *s, int flag)#endif /* __U_BOOT__ */ {struct in_str input;
common/main.c +27 -29
93 lines not on this page · raw message
include/hush.h +1 -1
@@ -29,7 +29,7 @@#define FLAG_REPARSING (1 << 2)/* >=2nd pass */ extern int u_boot_hush_start (void ); -extern int parse_string_outer (char *,int ); +extern int parse_string_outer (const char *,int );extern int parse_file_outer (void );int set_local_var (const char *s,int flg_export);
Signature · 1 line
1.7.0.4
PATCH v5 3/13 common: add run_command2 for running simple or hush commands
i love how many ifdefs were punted by this :)
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110831/341b7666/attachment.pgp
Wolfgang Denk
AppliedPATCH v5 3/13 common: add run_command2 for running simple or hush commands
In reply to Jason HobbsDear "Jason Hobbs",
Quoted 10 lines · In message <[email protected]> you…
Signed-off-by Jason Hobbs <[email protected]>Cc Mike Frysinger <[email protected]>---
changes in v2:
- whitespace correctionchanges in v4:
- fix indention of arun_command2line
- makerun_command2static inline
Quoted 7 lines
changes in v5:
- returnparse_string_outervalue directlycommon/hush.c | 2 +- common/main.c | 56 +++++++++++++++++++++++++++----------------------------- include/hush.h | 2 +- 3 files changed, 29 insertions(+), 31 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
It is a good thing for an uneducated man to read books of quotations.
- Sir Winston Churchill _My Early Life_ ch. 9PATCH v5 4/13 Add isblank
In reply to Jason HobbsExisting ctype checks are implemented using a 256 byte lookup table, allowing each character to be in any of 8 character classes. Since there are 8 existing character classes without the blank class, I implemented isblank without using the lookup table. Since there are only two blank characters - tab and space - this is a more reasonable approach than doubling the size of the lookup table to accommodate one more class.
---
new in v4
changes in v5:
- none
include/linux/ctype.h | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
include/linux/ctype.h +6 -0
@@ -31,6 +31,12 @@ extern const unsigned char _ctype[];#define isupper (c) ((__ismask(c)&(_U)) != 0)#define isxdigit (c) ((__ismask(c)&(_D|_X)) != 0) +/* +* Rather than doubling the size of the _ctype lookup table to hold a 'blank' +* flag, just check for space or tab. +*/ +#define isblank (c) (c == ' ' || c == '\t') +#define isascii (c) (((unsigned char)(c))<=0x7f)#define toascii (c) (((unsigned char)(c))&0x7f)
Signature · 1 line
1.7.0.4
Wolfgang Denk
AppliedPATCH v5 4/13 Add isblank
Dear "Jason Hobbs",
Quoted 8 lines · In message <[email protected]> you…
Existing ctype checks are implemented using a 256 byte lookup table, allowing each character to be in any of 8 character classes. Since there are 8 existing character classes without the blank class, I implemented isblank without using the lookup table. Since there are only two blank characters - tab and space - this is a more reasonable approach than doubling the size of the lookup table to accommodate one more class.
Signed-off-by Jason Hobbs <[email protected]>
Quoted 8 lines
---
new in v4changes in v5:
- noneinclude/linux/ctype.h | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Comparing information and knowledge is like asking whether the fatness of a pig is more or less green than the designated hitter rule." - David Guaspari
PATCH v5 5/13 cosmetic: remove unneeded curly braces
In reply to Jason HobbsThis prevents a checkpatch warning in the patch to use isblank
---
new in v4
changes in v5:
- none
common/main.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)
common/main.c +2 -4
@@ -1097,9 +1097,8 @@ int parse_line (char *line, char *argv[])while (nargs <CONFIG_SYS_MAXARGS ) {/* skip any white space */ -while ((*line ==' ' ) || (*line =='\t' )) { +while ((*line ==' ' ) || (*line =='\t' )) ++line; - }if (*line =='\0' ) {/* end of line, no more args */ argv[nargs] =NULL ;
@@ -1112,9 +1111,8 @@ int parse_line (char *line, char *argv[]) argv[nargs++] = line;/* begin of argument string */ /* find end of string */ -while (*line && (*line !=' ' ) && (*line !='\t' )) { +while (*line && (*line !=' ' ) && (*line !='\t' )) ++line; - }if (*line =='\0' ) {/* end of line, no more args */ argv[nargs] =NULL ;
Signature · 1 line
1.7.0.4
Wolfgang Denk
AppliedPATCH v5 5/13 cosmetic: remove unneeded curly braces
Dear "Jason Hobbs",
Quoted 11 lines · In message <[email protected]> you…
This prevents a checkpatch warning in the patch to use isblank
Signed-off-by Jason Hobbs <[email protected]>---
new in v4changes in v5:
- nonecommon/main.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de For every complex problem, there is a solution that is simple, neat, and wrong. - Mark Twain
PATCH v5 6/13 Replace space and tab checks with isblank
In reply to Jason HobbsThese are various places I found that checked for conditions equivalent to isblank.
---
new in v4
changes in v5:
- none
board/hymod/env.c | 9 +++++---- common/command.c | 9 +++++---- common/main.c | 5 +++-- drivers/bios_emulator/x86emu/debug.c | 7 ++++--- examples/standalone/smc911x_eeprom.c | 5 +++-- lib/hashtable.c | 4 +++- 6 files changed, 23 insertions(+), 16 deletions(-)
board/hymod/env.c +5 -4
@@ -22,6 +22,7 @@*/ #include <common.h> +#include <linux/ctype.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -45,7 +46,7 @@ env_callback (uchar *name, uchar *value) nn++; } -while (*nn ==' ' || *nn =='\t' ) +while (isblank (*nn)) nn++;if ((nnl =strlen (nn)) ==0 ) {
@@ -61,7 +62,7 @@ env_callback (uchar *name, uchar *value) nn[--nnl] ='\0' ; } -while (nnl >0 && ((c = nn[nnl -1 ]) ==' ' || c =='\t' )) +while (nnl >0 &&isblank (nn[nnl -1 ])) nn[--nnl] ='\0' ;if (nnl ==0 ) {printf ("Empty name in global env file\n" );
@@ -71,11 +72,11 @@ env_callback (uchar *name, uchar *value) p = (char *)value; q = nv; -while ((c = *p) ==' ' || c =='\t' ) +while (isblank (*p)) p++; nvl =strlen (p); -while (nvl >0 && ((c = p[nvl -1 ]) ==' ' || c =='\t' )) +while (nvl >0 &&isblank (p[nvl -1 ])) p[--nvl] ='\0' ;while ((*q = *p++) !='\0' ) {
common/command.c +5 -4
@@ -27,6 +27,7 @@#include <common.h> #include <command.h> +#include <linux/ctype.h> /* * Use puts() instead of printf() to avoid printf buffer overflow
@@ -165,7 +166,7 @@ int var_complete(int argc, char * const argv[], char last_char, int maxv, char *static char tmp_buf[512 ];int space; - space = last_char =='\0' || last_char ==' ' || last_char =='\t' ; + space = last_char =='\0' ||isblank (last_char);if (space && argc ==1 )return env_complete ("" , maxv, cmdv,sizeof (tmp_buf), tmp_buf);
@@ -206,7 +207,7 @@ static int complete_cmdv(int argc, char * const argv[], char last_char, int maxv }/* more than one arg or one but the start of the next */ -if (argc >1 || (last_char =='\0' || last_char ==' ' || last_char =='\t' )) { +if (argc >1 || (last_char =='\0' ||isblank (last_char))) { cmdtp =find_cmd (argv[0 ]);if (cmdtp ==NULL || cmdtp->complete ==NULL ) { cmdv[0 ] =NULL ;
@@ -257,7 +258,7 @@ static int make_argv(char *s, int argvsz, char *argv[])while (argc < argvsz -1 ) {/* skip any white space */ -while ((*s ==' ' ) || (*s =='\t' )) +while (isblank (*s)) ++s;if (*s =='\0' )/* end of s, no more args */
@@ -266,7 +267,7 @@ static int make_argv(char *s, int argvsz, char *argv[]) argv[argc++] = s;/* begin of argument string */ /* find end of string */ -while (*s && (*s !=' ' ) && (*s !='\t' )) +while (*s && !isblank (*s)) ++s;if (*s =='\0' )/* end of s, no more args */
common/main.c +3 -2
@@ -40,6 +40,7 @@#endif #include <post.h> +#include <linux/ctype.h> #if defined(CONFIG_SILENT_CONSOLE ) || defined(CONFIG_POST ) || defined(CONFIG_CMDLINE_EDITING )DECLARE_GLOBAL_DATA_PTR ;
@@ -1097,7 +1098,7 @@ int parse_line (char *line, char *argv[])while (nargs <CONFIG_SYS_MAXARGS ) {/* skip any white space */ -while ((*line ==' ' ) || (*line =='\t' )) +while (isblank (*line)) ++line;if (*line =='\0' ) {/* end of line, no more args */
@@ -1111,7 +1112,7 @@ int parse_line (char *line, char *argv[]) argv[nargs++] = line;/* begin of argument string */ /* find end of string */ -while (*line && (*line !=' ' ) && (*line !='\t' )) +while (*line && !isblank (*line)) ++line;if (*line =='\0' ) {/* end of line, no more args */
drivers/bios_emulator/x86emu/debug.c +4 -3
@@ -39,6 +39,7 @@#include <stdarg.h> #include <common.h> +#include <linux/ctype.h> #include "x86emu/x86emui.h" /*----------------------------- Implementation ----------------------------*/
@@ -333,7 +334,7 @@ static int x86emu_parse_line(char *s, int *ps, int *n)int cmd; *n =0 ; -while (*s ==' ' || *s =='\t' ) +while (isblank (*s)) s++; ps[*n] = *s;switch (*s) {
@@ -346,13 +347,13 @@ static int x86emu_parse_line(char *s, int *ps, int *n) }while (1 ) { -while (*s !=' ' && *s !='\t' && *s !='\n' ) +while (!isblank (*s) && *s !='\n' ) s++;if (*s =='\n' )return cmd; -while (*s ==' ' || *s =='\t' ) +while (isblank (*s)) s++; *n +=1 ;
examples/standalone/smc911x_eeprom.c +3 -2
@@ -16,6 +16,7 @@#include <common.h> #include <exports.h> +#include <linux/ctype.h> #include "../drivers/net/smc911x.h" /**
@@ -128,7 +129,7 @@ static int write_eeprom_reg(struct eth_device *dev, u8 value, u8 reg)*/ static char *skip_space (char *buf) { -while (buf[0 ] ==' ' || buf[0 ] =='\t' ) +while (isblank (buf[0 ])) ++buf;return buf; }
@@ -357,7 +358,7 @@ int smc911x_eeprom(int argc, char * const argv[])continue ;/* Only accept 1 letter commands */ -if (line[0 ] && line[1 ] && line[1 ] !=' ' && line[1 ] !='\t' ) +if (line[0 ] && line[1 ] && !isblank (line[1 ])) goto unknown_cmd;/* Now parse the command */
lib/hashtable.c +3 -1
@@ -32,6 +32,7 @@#ifdef USE_HOSTCC /* HOST build */ # include <string.h> # include <assert.h> +# include <ctype.h> # ifndef debug# ifdef DEBUG
@@ -43,6 +44,7 @@#else /* U-Boot build */ # include <common.h> # include <linux/string.h> +# include <linux/ctype.h> #endif #ifndef CONFIG_ENV_MIN_ENTRIES /* minimum number of entries */
@@ -690,7 +692,7 @@ int himport_r(struct hsearch_data *htab,ENTRY e, *rv;/* skip leading white space */ -while ((*dp ==' ' ) || (*dp =='\t' )) +while (isblank (*dp)) ++dp;/* skip comment lines */
Signature · 1 line
1.7.0.4
Wolfgang Denk
AppliedPATCH v5 6/13 Replace space and tab checks with isblank
Dear "Jason Hobbs",
Quoted 10 lines · In message <[email protected]> you…
These are various places I found that checked for conditions equivalent to isblank.
Signed-off-by Jason Hobbs <[email protected]>---
new in v4changes in v5:
- none
Quoted 7 lines
board/hymod/env.c | 9 +++++---- common/command.c | 9 +++++---- common/main.c | 5 +++-- drivers/bios_emulator/x86emu/debug.c | 7 ++++--- examples/standalone/smc911x_eeprom.c | 5 +++-- lib/hashtable.c | 4 +++- 6 files changed, 23 insertions(+), 16 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A committee is a group that keeps the minutes and loses hours.
-- Milton BerlePATCH v5 7/13 README: document standard image variables
In reply to Jason HobbsWith these documented, we can start pushing towards standardizing their use across boards.
---
new in v4
changes in v5:
- moved the doc into README alongside the other environment variables.
README | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-)
README +19 -0
@@ -3507,6 +3507,25 @@ List of environment variables (most likely not complete): Ethernet is encapsulated/received over 802.1q VLAN tagged frames. +The following image location variables contain the location of images +used in booting. The "Image" column gives the role of the image and is +not an environment variable name. The other columns are environment +variable names. "File Name" gives the name of the file on a TFTP +server, "RAM Address" gives the location in RAM the image will be +loaded to, and "Flash Location" gives the image's address in NOR +flash or offset in NAND flash. + +*Note* - these variables don't have to be defined for all boards, some +boards currenlty use other variables for these purposes, and some +boards use these variables for other purposes. + +Image File Name RAM Address Flash Location +----- --------- ----------- -------------- +u-boot u-boot u-boot_addr_r u-boot_addr +Linux kernel bootfile kernel_addr_r kernel_addr +device tree blob fdtfile fdt_addr_r fdt_addr +ramdisk ramdiskfile ramdisk_addr_r ramdisk_addr + The following environment variables may be used and automatically updated by the network boot commands ("bootp" and "rarpboot"), depending the information provided by your boot server:
Signature · 1 line
1.7.0.4
Wolfgang Denk
AppliedPATCH v5 7/13 README: document standard image variables
Dear "Jason Hobbs",
Quoted 19 lines · In message <[email protected]> you…
With these documented, we can start pushing towards standardizing their use across boards.
Signed-off-by Jason Hobbs <[email protected]>Cc Mike Frysinger <[email protected]>---
new in v4changes in v5:
- moved the doc into README alongside the other environment variables.README | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-)README +0
-0
README List of environment variables (most likely not complete): · line 3508
Quoted 2 lines
README +0
-0@@ -3507,6 +3507,25 @@ List of environment variables (most likely not complete): Ethernet is encapsulated/received over 802.1q VLAN tagged frames.
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de No one wants war. -- Kirk, "Errand of Mercy", stardate 3201.7
PATCH v5 8/13 lib: add uuid_str_to_bin for use with bootp and PXE uuid
In reply to Jason Hobbs---
changes for v2:
- Move uuid_str_to_bin's prototype from uuid. to common.h
- Place uuid.o make rule in sorted order and conditionalize
changes for v3:
- check for NULL pointers in uuid conversion function
changes for v4:
- add a UUID string validator
changes in v5:
- none
include/common.h | 4 ++ lib/Makefile | 1 + lib/uuid.c | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 90 insertions(+), 0 deletions(-) create mode 100644 lib/uuid.c
include/common.h +4 -0
@@ -656,6 +656,10 @@ int strcmp_compar(const void *, const void *);/* lib/time.c */ void udelay (unsigned long ); +/* lib/uuid.c */ +void uuid_str_to_bin (const char *uuid,unsigned char *out); +int uuid_str_valid (const char *uuid); +/* lib/vsprintf.c */ ulong simple_strtoul (const char *cp,char **endp,unsigned int base);int strict_strtoul (const char *cp,unsigned int base,unsigned long *res);
lib/Makefile +1 -0
@@ -55,6 +55,7 @@ COBJS-y += ctype.o COBJS-y += div64.o COBJS-y += string.o COBJS-y += time.o +COBJS-$(CONFIG_BOOTP_PXE) += uuid.o COBJS-y += vsprintf.o COBJS := $(COBJS-y)
lib/uuid.c new file +85 -0
85 lines not on this page · raw message
Signature · 1 line
1.7.0.4
Wolfgang Denk
AppliedPATCH v5 8/13 lib: add uuid_str_to_bin for use with bootp and PXE uuid
Dear "Jason Hobbs",
Quoted 12 lines · In message <[email protected]> you…
Signed-off-by Jason Hobbs <[email protected]>---
changes for v2:
- Move uuid_str_to_bin's prototype from uuid. tocommon.h
- Place uuid.o make rule in sorted order and conditionalizechanges for v3:
- check for NULL pointers in uuid conversion functionchanges for v4:
- add a UUID string validator
Quoted 8 lines
changes in v5:
- noneinclude/common.h | 4 ++ lib/Makefile | 1 + lib/uuid.c | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 90 insertions(+), 0 deletions(-) create mode 100644 lib/uuid.c
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de The ideal situation is to have massive computing power right at home. Something that dims the streetlights and shrinks the picture on the neighbours' TVs when you boot it up.
PATCH v5 9/13 Add pxe command
In reply to Jason HobbsAdd pxe command, which is intended to mimic PXELINUX functionality. 'pxe get' uses tftp to retrieve a file based on UUID, MAC address or IP address. 'pxe boot' interprets the contents of PXELINUX config like file to boot using a specific initrd, kernel and kernel command line.
This patch also adds a README.pxe file - see it for more details on the pxe command.
---
changes in v2:
- call abortboot directly instead of via a wrapper
- change the license to GPLv2+
- cleanup brace usage in multiline statements, conditionals
- allow bootfile to not exist, or to be a standalone filename
- try to clarify what's going on with get_relfile
- try cfg paths one by one instead of building an array
- refactor getenv/printfs to a new from_env function
- use the new generic menu code instead of that being integrated
- drop the ifdef from do_tftp in common.h
- use a clearer comment wrt to localcmd dup
- default to no timeout
changes in v3:
- use GPLv2+ license for the readme
- parse and create menu in separate steps
- adapt to menu interface changes
changes in v4:
- rename pxecfg to pxe
- expose run_command2 externally when using pxe
- add more comments to common/cmd_pxe.c
- format_mac_pxe's outbuf is now allocated in its caller
- get_bootfile_path now takes bootfile_path from caller
- drop a redundant file not found message
- make printf messages more informative
- use sizeof(struct blah) instead of sizeof(*p)
- use memset to initialize some structs per wd's request
- use isblank to check for non EOL whitespace
- switch to standard subcommand handling
- fix regression where ctrl+c didn't return to command line
- check for filesize missing after a tftp get
- only call do_bootm with argc == 4 if fdtaddr != NULL (thanks Ricardo Salveti)
- use lowercase hex in formatted MAC string (thanks Lo?c Minier)
- prefix MAC strings with "01-" to indicate Ethernet hwtype (thanks Lo?c Minier)
- switch to the standard environment variables
- switch from simple to strict strtoul where possible
changes in v5:
- convert another simple_strtoul to strict
common/Makefile | 1 + common/cmd_pxe.c | 1355 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/main.c | 2 + doc/README.pxe | 240 ++++++++++ include/common.h | 6 + 5 files changed, 1604 insertions(+), 0 deletions(-) create mode 100644 common/cmd_pxe.c create mode 100644 doc/README.pxe
common/Makefile +1 -0
@@ -135,6 +135,7 @@ COBJS-$(CONFIG_CMD_PCI) += cmd_pci.o endif COBJS-y += cmd_pcmcia.o COBJS-$(CONFIG_CMD_PORTIO) += cmd_portio.o +COBJS-$(CONFIG_CMD_PXE) += cmd_pxe.o COBJS-$(CONFIG_CMD_REGINFO) += cmd_reginfo.o COBJS-$(CONFIG_CMD_REISER) += cmd_reiser.o COBJS-$(CONFIG_CMD_SATA) += cmd_sata.o
common/cmd_pxe.c new file +1355 -0
1,355 lines not on this page · raw message
common/main.c +2 -0
@@ -269,7 +269,9 @@ int abortboot(int bootdelay)/* * Return 0 on success, or != 0 on error. */ +#ifndef CONFIG_CMD_PXE static inline +#endifint run_command2 (const char *cmd,int flag) {#ifndef CONFIG_SYS_HUSH_PARSER
doc/README.pxe new file +240 -0
240 lines not on this page · raw message
include/common.h +6 -0
@@ -234,6 +234,9 @@ int print_buffer (ulong addr, void* data, uint width, uint count, uint linelen);/* common/main.c */ void main_loop (void );int run_command (const char *cmd,int flag); +#ifdef CONFIG_CMD_PXE +int run_command2 (const char *cmd,int flag); +#endif int readline (const char *const prompt);int readline_into_buffer (const char *const prompt,char * buffer);int parse_line (char *,char *[]);
@@ -264,6 +267,9 @@ extern ulong load_addr; /* Default Load Address *//* common/cmd_doc.c */ void doc_probe (unsigned long physadr); +/* common/cmd_net.c */ +int do_tftpb (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]); +/* common/cmd_nvedit.c */ int env_init (void );void env_relocate (void );
Signature · 1 line
1.7.0.4
Wolfgang Denk
AppliedPATCH v5 9/13 Add pxe command
Dear "Jason Hobbs",
Quoted 53 lines · In message <[email protected]> you…
Add pxe command, which is intended to mimic PXELINUX functionality. 'pxe get' uses tftp to retrieve a file based on UUID, MAC address or IP address. 'pxe boot' interprets the contents of PXELINUX config like file to boot using a specific initrd, kernel and kernel command line.
This patch also adds a README.pxe file - see it for more details on the pxe command.
Signed-off-by Jason Hobbs <[email protected]>---
changes in v2:
- call abortboot directly instead of via a wrapper
- change the license to GPLv2+
- cleanup brace usage in multiline statements, conditionals
- allow bootfile to not exist, or to be a standalone filename
- try to clarify what's going on withget_relfile
- try cfg paths one by one instead of building an array
- refactor getenv/printfs to a newfrom_envfunction
- use the new generic menu code instead of that being integrated
- drop the ifdef fromdo_tftpincommon.h
- use a clearer comment wrt to localcmd dup
- default to no timeoutchanges in v3:
- use GPLv2+ license for the readme
- parse and create menu in separate steps
- adapt to menu interface changeschanges in v4:
- rename pxecfg to pxe
- exposerun_command2externally when using pxe
- add more comments tocommon/cmd_pxe.c
- format_mac_pxe's outbuf is now allocated in its caller
-get_bootfile_pathnow takesbootfile_pathfrom caller
- drop a redundant file not found message
- make printf messages more informative
- use sizeof(struct blah) instead ofsizeof(*p)
- use memset to initialize some structs per wd's request
- use isblank to check for non EOL whitespace
- switch to standard subcommand handling
- fix regression where ctrl+c didn't return to command line
- check for filesize missing after a tftp get
- only calldo_bootmwith argc == 4 if fdtaddr != NULL (thanks Ricardo Salveti)
- use lowercase hex in formatted MAC string (thanks Lo??c Minier)
- prefix MAC strings with "01-" to indicate Ethernet hwtype (thanks Lo??c Minier)
- switch to the standard environment variables
- switch from simple to strict strtoul where possiblechanges in v5:
- convert anothersimple_strtoulto strict
Quoted 8 lines
common/Makefile | 1 + common/cmd_pxe.c | 1355 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/main.c | 2 + doc/README.pxe | 240 ++++++++++ include/common.h | 6 + 5 files changed, 1604 insertions(+), 0 deletions(-) create mode 100644 common/cmd_pxe.c create mode 100644 doc/README.pxe
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de I think animal testing is a terrible idea; they get all nervous and give the wrong answers.
PATCH v5 10/13 net: bootp: add PXE/RFC 4578 DHCP options support
In reply to Jason HobbsThese options are required to be present in RFC 4578 compliant DHCP requests. They give more information to DHCP servers to allow serving different DHCP responses to different systems based on client architecture, client capabilities, UUID, or vendor.
---
changes for v2:
- Use common.h to get uuid_str_to_bin prototype
changes for v4:
- Ensure pxeuuid contains a valid UUID string
changes for v5:
- none
net/bootp.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 40 insertions(+), 0 deletions(-)
net/bootp.c +40 -0
@@ -370,6 +370,11 @@ static int DhcpExtended (u8 * e, int message_type, IPaddr_t ServerID, IPaddr_t R {u8 *start = e;u8 *cnt; +#if defined(CONFIG_BOOTP_PXE ) +char *uuid; +size_t vci_strlen; +u16 clientarch; +#endif #if defined(CONFIG_BOOTP_VENDOREX )u8 *x;
@@ -424,6 +429,41 @@ static int DhcpExtended (u8 * e, int message_type, IPaddr_t ServerID, IPaddr_t R }#endif +#if defined(CONFIG_BOOTP_PXE ) + clientarch =CONFIG_BOOTP_PXE_CLIENTARCH ; + *e++ =93 ;/* Client System Architecture */ + *e++ =2 ; + *e++ = (clientarch >>8 ) &0xff ; + *e++ = clientarch &0xff ; + + *e++ =94 ;/* Client Network Interface Identifier */ + *e++ =3 ; + *e++ =1 ;/* type field for UNDI */ + *e++ =0 ;/* major revision */ + *e++ =0 ;/* minor revision */ + + uuid =getenv ("pxeuuid" ); + +if (uuid) { +if (uuid_str_valid (uuid)) { + *e++ =97 ;/* Client Machine Identifier */ + *e++ =17 ; + *e++ =0 ;/* type 0 - UUID */ + +uuid_str_to_bin (uuid, e); + e +=16 ; + }else { +printf ("Invalid pxeuuid: %s\n" , uuid); + } + } + + *e++ =60 ;/* Vendor Class Identifier */ + vci_strlen =strlen (CONFIG_BOOTP_VCI_STRING ); + *e++ = vci_strlen; +memcpy (e,CONFIG_BOOTP_VCI_STRING , vci_strlen); + e += vci_strlen; +#endif +#if defined(CONFIG_BOOTP_VENDOREX )if ((x =dhcp_vendorex_prep (e)))return x - start;
Signature · 1 line
1.7.0.4
Wolfgang Denk
AppliedPATCH v5 10/13 net: bootp: add PXE/RFC 4578 DHCP options support
Dear "Jason Hobbs",
Quoted 10 lines · In message <[email protected]> you…
These options are required to be present in RFC 4578 compliant DHCP requests. They give more information to DHCP servers to allow serving different DHCP responses to different systems based on client architecture, client capabilities, UUID, or vendor.
Signed-off-by Jason Hobbs <[email protected]>---
changes for v2:
- Usecommon.hto getuuid_str_to_binprototype
Quoted 8 lines
changes for v4:
- Ensure pxeuuid contains a valid UUID stringchanges for v5:
- nonenet/bootp.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 40 insertions(+), 0 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 7 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de WARNING: This Product Attracts Every Other Piece of Matter in the Universe, Including the Products of Other Manufacturers, with a Force Proportional to the Product of the Masses and Inversely Proportional to the Distance Between Them.
PATCH v5 11/13 Convert ca9x4_ct_vxp to standard env variables
In reply to Jason Hobbs---
new in v4
changes for v5:
- none
include/configs/ca9x4_ct_vxp.h | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-)
include/configs/ca9x4_ct_vxp.h +6 -6
@@ -129,10 +129,10 @@#define CONFIG_BOOTCOMMAND "run bootflash;"#define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x80008000\0" \ - "initrd=0x61000000\0" \ - "kerneladdr=0x44100000\0" \ - "initrdaddr=0x44800000\0" \ - "maxinitrd=0x1800000\0" \ + "ramdisk_addr_r=0x61000000\0" \ + "kernel_addr=0x44100000\0" \ + "ramdisk_addr=0x44800000\0" \ + "maxramdisk=0x1800000\0" \ "console=ttyAMA0,38400n8\0" \ "dram=1024M\0" \ "root=/dev/sda1 rw\0" \
@@ -142,8 +142,8 @@"mem=${dram} mtdparts=${mtd} mmci.fmax=190000 " \"devtmpfs.mount=0 vmalloc=256M\0" \"bootflash=run flashargs; " \ -"cp ${initrdaddr} ${initrd} ${maxinitrd}; " \ -"bootm ${kerneladdr} ${initrd}\0" +"cp ${ramdisk_addr} ${ramdisk_addr_r} ${maxramdisk}; " \ +"bootm ${kernel_addr} ${ramdisk_addr_r}\0" /* FLASH and environment organization */#define PHYS_FLASH_SIZE 0x04000000/* 64MB */
Signature · 1 line
1.7.0.4
PATCH v5 11/13 Convert ca9x4_ct_vxp to standard env variables
Quoted 2 lines · Jason Hobbs
Signed-off-by Jason Hobbs <[email protected]>Cc Matt Waddel <[email protected]>
Quoted 39 lines
---
new in v4changes for v5:
- noneinclude/configs/ca9x4_ct_vxp.h | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-)include/configs/ca9x4_ct_vxp.h +6
-6@@ -129,10 +129,10 @@#define CONFIG_BOOTCOMMAND "run bootflash;"#define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x80008000\0" \ - "initrd=0x61000000\0" \ - "kerneladdr=0x44100000\0" \ - "initrdaddr=0x44800000\0" \ - "maxinitrd=0x1800000\0" \ + "ramdisk_addr_r=0x61000000\0" \ + "kernel_addr=0x44100000\0" \ + "ramdisk_addr=0x44800000\0" \ + "maxramdisk=0x1800000\0" \ "console=ttyAMA0,38400n8\0" \ "dram=1024M\0" \ "root=/dev/sda1 rw\0" \@@ -142,8 +142,8 @@"mem=${dram} mtdparts=${mtd} mmci.fmax=190000 " \"devtmpfs.mount=0 vmalloc=256M\0" \"bootflash=run flashargs; " \ -"cp ${initrdaddr} ${initrd} ${maxinitrd}; " \ -"bootm ${kerneladdr} ${initrd}\0" +"cp ${ramdisk_addr} ${ramdisk_addr_r} ${maxramdisk}; " \ +"bootm ${kernel_addr} ${ramdisk_addr_r}\0" /* FLASH and environment organization */#define PHYS_FLASH_SIZE 0x04000000/* 64MB */
Wolfgang Denk
AppliedPATCH v5 11/13 Convert ca9x4_ct_vxp to standard env variables
In reply to Jason HobbsDear "Jason Hobbs",
Quoted 10 lines · In message <[email protected]> you…
Signed-off-by Jason Hobbs <[email protected]>Cc Matt Waddel <[email protected]>---
new in v4changes for v5:
- noneinclude/configs/ca9x4_ct_vxp.h | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The C-shell doesn't parse. It adhoculates.
- Casper.Dik at Holland.Sun.COM in <[email protected]>PATCH v5 12/13 arm: ca9x4_ct_vxp: enable pxe command support
In reply to Jason Hobbs---
changes in v2:
- use CONFIG_MENU to enable building the menu for pxecfg use
changes in v4:
- use CONFIG_CMD_PXE instead of CONFIG_CMD_PXECFG
- update to standard environment variables
changes for v5:
- none
include/configs/ca9x4_ct_vxp.h | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
include/configs/ca9x4_ct_vxp.h +4 -0
@@ -70,6 +70,8 @@/* Command line configuration */ #define CONFIG_CMD_BDI #define CONFIG_CMD_DHCP +#define CONFIG_CMD_PXE +#define CONFIG_MENU #define CONFIG_CMD_ELF #define CONFIG_CMD_ENV #define CONFIG_CMD_FLASH
@@ -133,6 +135,8 @@"kernel_addr=0x44100000\0" \"ramdisk_addr=0x44800000\0" \"maxramdisk=0x1800000\0" \ +"pxefile_addr_r=0x88000000\0" \ +"kernel_addr_r=0x80008000\0" \"console=ttyAMA0,38400n8\0" \"dram=1024M\0" \"root=/dev/sda1 rw\0" \
Signature · 1 line
1.7.0.4
PATCH v5 12/13 arm: ca9x4_ct_vxp: enable pxe command support
Quoted 2 lines · Jason Hobbs
Signed-off-by Jason Hobbs <[email protected]>Cc Matt Waddel <[email protected]>
Quoted 36 lines
---
changes in v2:
- useCONFIG_MENUto enable building the menu for pxecfg usechanges in v4:
- useCONFIG_CMD_PXEinstead ofCONFIG_CMD_PXECFG
- update to standard environment variableschanges for v5:
- noneinclude/configs/ca9x4_ct_vxp.h | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)include/configs/ca9x4_ct_vxp.h +4
-0@@ -70,6 +70,8 @@/* Command line configuration */ #define CONFIG_CMD_BDI #define CONFIG_CMD_DHCP +#define CONFIG_CMD_PXE +#define CONFIG_MENU #define CONFIG_CMD_ELF #define CONFIG_CMD_ENV #define CONFIG_CMD_FLASH @@ -133,6 +135,8 @@"kernel_addr=0x44100000\0" \"ramdisk_addr=0x44800000\0" \"maxramdisk=0x1800000\0" \ +"pxefile_addr_r=0x88000000\0" \ +"kernel_addr_r=0x80008000\0" \"console=ttyAMA0,38400n8\0" \"dram=1024M\0" \"root=/dev/sda1 rw\0" \
Wolfgang Denk
AppliedPATCH v5 12/13 arm: ca9x4_ct_vxp: enable pxe command support
In reply to Jason HobbsDear "Jason Hobbs",
Quoted 10 lines · In message <[email protected]> you…
Signed-off-by Jason Hobbs <[email protected]>Cc Matt Waddel <[email protected]>---
changes in v2:
- useCONFIG_MENUto enable building the menu for pxecfg usechanges in v4:
- useCONFIG_CMD_PXEinstead ofCONFIG_CMD_PXECFG
- update to standard environment variables
Quoted 5 lines
changes for v5:
- noneinclude/configs/ca9x4_ct_vxp.h | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Voodoo Programming: Things programmers do that they know shouldn't work but they try anyway, and which sometimes actually work, such as recompiling everything. - Karl Lehenbauer
PATCH v5 13/13 arm: ca9x4_ct_vxp: enable PXE BOOTP options support
In reply to Jason Hobbs---
changes for v2:
- add armv7 architecture to VCI string
changes for v4:
- combine the PXE bootp options with the other bootp options
changes for v5:
- none
include/configs/ca9x4_ct_vxp.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
include/configs/ca9x4_ct_vxp.h +3 -0
@@ -98,6 +98,9 @@#define CONFIG_BOOTP_BOOTPATH #define CONFIG_BOOTP_GATEWAY #define CONFIG_BOOTP_HOSTNAME +#define CONFIG_BOOTP_PXE +#define CONFIG_BOOTP_PXE_CLIENTARCH 0x100 +#define CONFIG_BOOTP_VCI_STRING "U-boot.armv7.ca9x4_ct_vxp"/* Miscellaneous configurable options */ #undef CONFIG_SYS_CLKS_IN_HZ
Signature · 1 line
1.7.0.4
PATCH v5 13/13 arm: ca9x4_ct_vxp: enable PXE BOOTP options support
Quoted 2 lines · Jason Hobbs
Signed-off-by Jason Hobbs <[email protected]>Cc Matt Waddel <[email protected]>
Quoted 27 lines
---
changes for v2:
- add armv7 architecture to VCI stringchanges for v4:
- combine the PXE bootp options with the other bootp optionschanges for v5:
- noneinclude/configs/ca9x4_ct_vxp.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)include/configs/ca9x4_ct_vxp.h +3
-0@@ -98,6 +98,9 @@#define CONFIG_BOOTP_BOOTPATH #define CONFIG_BOOTP_GATEWAY #define CONFIG_BOOTP_HOSTNAME +#define CONFIG_BOOTP_PXE +#define CONFIG_BOOTP_PXE_CLIENTARCH 0x100 +#define CONFIG_BOOTP_VCI_STRING "U-boot.armv7.ca9x4_ct_vxp"/* Miscellaneous configurable options */ #undef CONFIG_SYS_CLKS_IN_HZ
Wolfgang Denk
AppliedPATCH v5 13/13 arm: ca9x4_ct_vxp: enable PXE BOOTP options support
In reply to Jason HobbsDear "Jason Hobbs",
Quoted 6 lines · In message <[email protected]> you…
Signed-off-by Jason Hobbs <[email protected]>Cc Matt Waddel <[email protected]>---
changes for v2:
- add armv7 architecture to VCI string
Quoted 8 lines
changes for v4:
- combine the PXE bootp options with the other bootp optionschanges for v5:
- noneinclude/configs/ca9x4_ct_vxp.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de A list is only as strong as its weakest link. -- Don Knuth
v5 cover Add PXE support
In reply to Jason HobbsHi Wolfgang,
Quoted 3 lines · Jason Hobbs
This patch series adds PXE booting support to U-boot. It adds aseries of DHCP options to allow U-boot DHCP requests to be compliant with RFC 4578, and a set of commands to provide PXELINUX like behavior.
Have you had a chance to review this version of the patch series?
I believe this version addresses all of the comments I've received to this point. Please let me know if there are additional changes you want before these patches are pulled into mainline.
Jason