dhcp: update to globalvar
cover dhcp: update to globalvar
HI,
this pull is a split of the bootp work as I may have not time to finish it those days
please pull
The following changes since commit 4271879e3b82e2e4d52a46f7c4ef01461a786b5e:
fsl TSEC: register map boundary (2012-09-11 10:06:09 +0200)
are available in the git repository at:
git://git.jcrosoft.org/barebox.git tags/dhcp
for you to fetch changes up to 97d80440a8f8c992ebc2153cd27fa8e6c929cfcd:
defaultenv-2: eth0 add default global.dhcp.vendor_id (2012-09-12 22:22:49 +0800)
----------------------------------------------------------------
dhcp: update to globalvar
So we can specify vendor_id, user_class, etc... in defaultenv-2
defaultenv: enable glovalvar support
This will allow to do not have 2 set of var for defaultenv and the new defaultenv-2.
----------------------------------------------------------------
Jean-Christophe PLAGNIOL-VILLARD (7):
globalbar: add inline when not enabled
defaultenv: enable glovalvar support
defaultenv: switch hostname to global.hostname
dhcp: switch to global var support
dhcp: add copy_only_if_valid support
dhcp: add retries limit support
defaultenv-2: eth0 add default global.dhcp.vendor_id
arch/arm/boards/at91rm9200ek/env/config | 2 +- arch/arm/boards/at91sam9260ek/env/config | 4 ++-- arch/arm/boards/at91sam9261ek/env/config | 4 ++-- arch/arm/boards/at91sam9263ek/env/config | 2 +- arch/arm/boards/at91sam9m10g45ek/env/config | 2 +- arch/arm/boards/at91sam9x5ek/env/config | 2 +- arch/arm/boards/eukrea_cpuimx25/env/config | 12 +++++------ arch/arm/boards/eukrea_cpuimx35/env/config | 12 +++++------ arch/arm/boards/eukrea_cpuimx51/env/config | 12 +++++------ arch/arm/boards/freescale-mx28-evk/env/config | 10 ++++----- arch/arm/boards/freescale-mx35-3-stack/env/config | 12 +++++------ arch/arm/boards/freescale-mx53-loco/env/config | 14 ++++++------- arch/arm/boards/freescale-mx53-smd/env/config | 12 +++++------ arch/arm/boards/friendlyarm-mini2440/env/config | 12 +++++------ arch/arm/boards/guf-cupid/env/config | 12 +++++------ arch/arm/boards/guf-neso/env/config | 12 +++++------ arch/arm/boards/karo-tx25/env/config | 12 +++++------ arch/arm/boards/karo-tx28/env/config | 12 +++++------ arch/arm/boards/panda/env/config | 10 ++++----- arch/arm/boards/pcm027/env/config | 12 +++++------ arch/arm/boards/pcm037/env/config | 12 +++++------ arch/arm/boards/pcm043/env/config | 12 +++++------ arch/arm/boards/pcm049/env/config | 12 +++++------ arch/arm/boards/phycard-a-l1/env/config | 16 +++++++------- arch/arm/boards/phycard-a-xl2/env/config | 12 +++++------ arch/arm/boards/phycard-i.MX27/env/config | 12 +++++------ arch/arm/boards/qil-a9260/env/config | 2 +- arch/arm/boards/scb9328/env/config | 12 +++++------ arch/arm/boards/tny-a926x/env/config | 6 +++--- arch/arm/boards/usb-a926x/env/config | 6 +++--- common/Kconfig | 1 + defaultenv-2/base/network/eth0 | 1 + defaultenv/bin/boot | 12 +++++------ defaultenv/bin/init | 2 ++ defaultenv/config | 18 ++++++++-------- include/globalvar.h | 20 ++++++++++++++++++ net/dhcp.c | 163 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------- 37 files changed, 320 insertions(+), 181 deletions(-)
Best Regards,
J.
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
PATCH 2/7 defaultenv: enable glovalvar support
In reply to Jean-Christophe PLAGNIOL-VILLARDThis will allow to do not have 2 set of var for defaultenv and the new defaultenv-2.
--- common/Kconfig | 1 + defaultenv/bin/init | 2 ++ 2 files changed, 3 insertions(+)
common/Kconfig +1 -0
@@ -575,6 +575,7 @@ config DEFAULT_ENVIRONMENT_GENERIC select CMD_CRC select CMD_CRC_CMP select CMD_AUTOMOUNT if HAVE_DEFAULT_ENVIRONMENT_NEW + select CMD_GLOBAL prompt "Default environment generic" help With this option barebox will use the generic default
defaultenv/bin/init +2 -0
@@ -3,6 +3,8 @@ PATH=/env/bin export PATH +global hostname + . /env/config if [ -e /dev/nor0 -a -n "$nor_parts" ]; then addpart /dev/nor0 $nor_parts
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 1/7 globalbar: add inline when not enabled
In reply to Jean-Christophe PLAGNIOL-VILLARD--- include/globalvar.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
include/globalvar.h +20 -0
@@ -1,6 +1,7 @@#ifndef __GLOBALVAR_H#define __GLOBALVAR_H +#ifdef CONFIG_GLOBALVAR int globalvar_add_simple (const char *name); int globalvar_add(const char *name,
@@ -8,5 +9,24 @@ int globalvar_add(const char *name,const char *(*get)(struct device_d *,struct param_d *p), unsigned long flags);char *globalvar_get_match (const char *match,const char *seperator); +#else +static inline int globalvar_add_simple (const char *name) +{ +return 0 ; +} + +static inline int globalvar_add (const char *name, +int (*set)(struct device_d *dev,struct param_d *p,const char *val), +const char *(*get)(struct device_d *,struct param_d *p), +unsigned long flags) +{ +return 0 ; +} + +static inline char *globalvar_get_match (const char *match,const char *seperator) +{ +return NULL ; +} +#endif #endif /* __GLOBALVAR_H */
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 6/7 dhcp: add retries limit support
via -r opt, global.dhcp.retries or dhcp_retries
set the priority order;
This will allow to do not stay infinite loop if no dhcp availlable for boot sequence as example
--- net/dhcp.c | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-)
net/dhcp.c +31 -2
@@ -700,13 +700,26 @@ static int dhcp_global_init(void) }late_initcall (dhcp_global_init); +static void dhcp_getenv_int (const char *name,int *i) +{ +const char * str =getenv (name); + +if (!str) +return ; + + *i =simple_strtoul (str,NULL ,10 ); +} +static int do_dhcp (int argc,char *argv[]) {int ret, opt; +int retries =-1 ;dhcp_reset_env (); -while ((opt =getopt (argc, argv,"H:v:c:u:U:" )) >0 ) { +dhcp_getenv_int ("global.dhcp.retries" , &retries); + +while ((opt =getopt (argc, argv,"H:v:c:u:U:r:" )) >0 ) {switch (opt) {case 'H' :dhcp_set_param_data (DHCP_HOSTNAME , optarg);
@@ -723,9 +736,17 @@ static int do_dhcp(int argc, char *argv[])case 'U' :dhcp_set_param_data (DHCP_USER_CLASS , optarg);break ; +case 'r' : + retries =simple_strtoul (optarg,NULL ,10 ); +break ; } } +if (!retries) { +printf ("retries is set to zero, set it to -1\n" ); + retries =-1 ; + } + dhcp_con =net_udp_new (0xffffffff ,PORT_BOOTPS , dhcp_handler,NULL );if (IS_ERR (dhcp_con)) { ret =PTR_ERR (dhcp_con);
@@ -746,11 +767,17 @@ static int do_dhcp(int argc, char *argv[])while (dhcp_state !=BOUND ) {if (ctrlc ())break ; +if (!retries) { + ret =ETIMEDOUT ; + goto out1; + }net_poll ();if (is_timeout (dhcp_start,3 *SECOND )) { dhcp_start =get_time_ns ();printf ("T " ); ret =bootp_request (); +/* no need to check if retries > 0 as we check if != 0 */ + retries--;if (ret) goto out1; }
@@ -785,7 +812,8 @@ BAREBOX_CMD_HELP_OPT ("-u <client_uuid>",BAREBOX_CMD_HELP_OPT ("-U <user_class>" ,"DHCP User class (code 77) submitted in DHCP requests. It can\n" "be used in the DHCP server's configuration to select options\n" -"(e.g. bootfile or server) which are valid for barebox clients only.\n" ); +"(e.g. bootfile or server) which are valid for barebox clients only.\n") +BAREBOX_CMD_HELP_OPT ("-r <retry>" ,"retry limi\n" );BAREBOX_CMD_HELP_END BAREBOX_CMD_START (dhcp )
@@ -804,3 +832,4 @@ BAREBOX_MAGICVAR_NAMED(global_dhcp_client_id, global.dhcp.client_id, "cliend idBAREBOX_MAGICVAR_NAMED (global_dhcp_user_class, global.dhcp.user_class,"user class to send to the DHCP server" );BAREBOX_MAGICVAR_NAMED (global_dhcp_tftp_server_name, global.dhcp.tftp_server_name,"TFTP server Name returned from DHCP request" );BAREBOX_MAGICVAR_NAMED (global_dhcp_oftree_file, global.dhcp.oftree_file,"OF tree returned from DHCP request (option 224)" ); +BAREBOX_MAGICVAR_NAMED (global_dhcp_retries, global.dhcp.retries,"retry limit" );
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 5/7 dhcp: add copy_only_if_valid support
In reply to Jean-Christophe PLAGNIOL-VILLARDThis will allow to only update a var if recive a valid data. This is need for hostname.
--- net/dhcp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
net/dhcp.c +6 -1
@@ -110,6 +110,7 @@ struct dhcp_opt {unsigned char option;/* request automatically the option when creating the DHCP request */ bool optional; +bool copy_only_if_valid;const char *barebox_var_name;const char *barebox_dhcp_global;void (*handle)(struct dhcp_opt *opt,unsigned char *data,int tlen);
@@ -153,6 +154,9 @@ static void env_str_handle(struct dhcp_opt *opt, unsigned char *popt, int optlenmemcpy (tmp, popt, optlen); tmp[optlen] =0 ; +if (opt->copy_only_if_valid && !strlen (tmp)) +return ; +if (opt->barebox_var_name)setenv (opt->barebox_var_name, tmp);if (opt->barebox_dhcp_global)
@@ -208,6 +212,7 @@ struct dhcp_opt dhcp_options[] = { .barebox_var_name = "net.nameserver", }, { .option = 12, + .copy_only_if_valid = 1, .handle = env_str_handle, .barebox_var_name = "global.hostname", }, {
@@ -647,7 +652,7 @@ static void dhcp_reset_env(void)for (i =0 ; i <ARRAY_SIZE (dhcp_options); i++) { opt = &dhcp_options[i]; -if (!opt->barebox_var_name) +if (!opt->barebox_var_name || opt->copy_only_if_valid)continue ;setenv (opt->barebox_var_name,"" );
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 4/7 dhcp: switch to global var support
In reply to Jean-Christophe PLAGNIOL-VILLARDThis way you can specify as previously set the dhcp parameter via global.dhcp.xxx and get the result via global.dhcp.xxx
This is need for the defaultenv-2 to add the bootp suppport. Use it on defaultenv too to have only one set of var.
--- arch/arm/boards/at91rm9200ek/env/config | 2 +- arch/arm/boards/at91sam9260ek/env/config | 4 +- arch/arm/boards/at91sam9261ek/env/config | 4 +- arch/arm/boards/at91sam9263ek/env/config | 2 +- arch/arm/boards/at91sam9m10g45ek/env/config | 2 +- arch/arm/boards/at91sam9x5ek/env/config | 2 +- arch/arm/boards/freescale-mx53-loco/env/config | 2 +- arch/arm/boards/qil-a9260/env/config | 2 +- arch/arm/boards/tny-a926x/env/config | 6 +- arch/arm/boards/usb-a926x/env/config | 6 +- defaultenv/bin/boot | 12 +-- defaultenv/config | 2 +- net/dhcp.c | 119 ++++++++++++++++++++---- 13 files changed, 123 insertions(+), 42 deletions(-)
arch/arm/boards/at91rm9200ek/env/config +1 -1
@@ -3,7 +3,7 @@ # use 'dhcp' to do dhcp in barebox and in kernel # use 'none' if you want to skip kernel ip autoconfiguration ip=dhcp-barebox -dhcp_vendor_id=barebox-at91rm9200ek +global.dhcp.vendor_id=barebox-at91rm9200ek # or set your networking parameters here #eth0.ipaddr=a.b.c.d
arch/arm/boards/at91sam9260ek/env/config +2 -2
@@ -6,9 +6,9 @@ ip=dhcp-barebox if [ x$armlinux_architecture = x1099 ] then - dhcp_vendor_id=barebox-at91sam9260ek + global.dhcp.vendor_id=barebox-at91sam9260ek else - dhcp_vendor_id=barebox-at91sam9g20ek + global.dhcp.vendor_id=barebox-at91sam9g20ek fi # or set your networking parameters here
arch/arm/boards/at91sam9261ek/env/config +2 -2
@@ -6,9 +6,9 @@ ip=dhcp-barebox if [ x$armlinux_architecture = x848 ] then - dhcp_vendor_id=barebox-at91sam9261ek + global.dhcp.vendor_id=barebox-at91sam9261ek else - dhcp_vendor_id=barebox-at91sam9g10ek + global.dhcp.vendor_id=barebox-at91sam9g10ek fi # or set your networking parameters here
arch/arm/boards/at91sam9263ek/env/config +1 -1
@@ -3,7 +3,7 @@ # use 'dhcp' to do dhcp in barebox and in kernel # use 'none' if you want to skip kernel ip autoconfiguration ip=dhcp-barebox -dhcp_vendor_id=barebox-at91sam9263ek +global.dhcp.vendor_id=barebox-at91sam9263ek # or set your networking parameters here #eth0.ipaddr=a.b.c.d
arch/arm/boards/at91sam9m10g45ek/env/config +1 -1
@@ -3,7 +3,7 @@ # use 'dhcp' to do dhcp in barebox and in kernel # use 'none' if you want to skip kernel ip autoconfiguration ip=dhcp-barebox -dhcp_vendor_id=barebox-at91sam9m10g45ek +global.dhcp.vendor_id=barebox-at91sam9m10g45ek # or set your networking parameters here #eth0.ipaddr=a.b.c.d
arch/arm/boards/at91sam9x5ek/env/config +1 -1
@@ -3,7 +3,7 @@ # use 'dhcp' to do dhcp in barebox and in kernel # use 'none' if you want to skip kernel ip autoconfiguration ip=dhcp-barebox -dhcp_vendor_id=barebox-at91sam9x5ek +global.dhcp.vendor_id=barebox-at91sam9x5ek # or set your networking parameters here #eth0.ipaddr=a.b.c.d
arch/arm/boards/freescale-mx53-loco/env/config +1 -1
@@ -7,7 +7,7 @@ user= # use 'dhcp' to do dhcp in barebox and in kernel # use 'none' if you want to skip kernel ip autoconfiguration ip=dhcp -dhcp_vendor_id=barebox-mx53-loco +global.dhcp.vendor_id=barebox-mx53-loco # or set your networking parameters here #eth0.ipaddr=a.b.c.d
arch/arm/boards/qil-a9260/env/config +1 -1
@@ -3,7 +3,7 @@ # use 'dhcp' to do dhcp in barebox and in kernel # use 'none' if you want to skip kernel ip autoconfiguration ip=dhcp-barebox -dhcp_vendor_id=barebox-qil-a9260 +global.dhcp.vendor_id=barebox-qil-a9260 # or set your networking parameters here #eth0.ipaddr=a.b.c.d
arch/arm/boards/tny-a926x/env/config +3 -3
@@ -3,9 +3,9 @@ # use 'dhcp' to do dhcp in barebox and in kernel # use 'none' if you want to skip kernel ip autoconfiguration ip=dhcp-barebox -[ x$armlinux_architecture = x2058 ] && dhcp_vendor_id=barebox-tny-a9260 -[ x$armlinux_architecture = x2059 ] && dhcp_vendor_id=barebox-tny-a9g20 -[ x$armlinux_architecture = x2140 ] && dhcp_vendor_id=barebox-tny-a9263 +[ x$armlinux_architecture = x2058 ] && global.dhcp.vendor_id=barebox-tny-a9260 +[ x$armlinux_architecture = x2059 ] && global.dhcp.vendor_id=barebox-tny-a9g20 +[ x$armlinux_architecture = x2140 ] && global.dhcp.vendor_id=barebox-tny-a9263 # or set your networking parameters here #eth0.ipaddr=a.b.c.d
arch/arm/boards/usb-a926x/env/config +3 -3
@@ -3,9 +3,9 @@ # use 'dhcp' to do dhcp in barebox and in kernel # use 'none' if you want to skip kernel ip autoconfiguration ip=dhcp-barebox -[ x$armlinux_architecture = x1709 ] && dhcp_vendor_id=barebox-usb-a9260 -[ x$armlinux_architecture = x1710 ] && dhcp_vendor_id=barebox-usb-a9263 -[ x$armlinux_architecture = x1841 ] && dhcp_vendor_id=barebox-usb-a9g20 +[ x$armlinux_architecture = x1709 ] && global.dhcp.vendor_id=barebox-usb-a9260 +[ x$armlinux_architecture = x1710 ] && global.dhcp.vendor_id=barebox-usb-a9263 +[ x$armlinux_architecture = x1841 ] && global.dhcp.vendor_id=barebox-usb-a9g20 # or set your networking parameters here #eth0.ipaddr=a.b.c.d
defaultenv/bin/boot +6 -6
@@ -44,14 +44,14 @@ fi if [ x$ip = xdhcp -o x$ip = "xdhcp-barebox" ]; then if [ x$kernel_loc = xnfs -o x$kernel_loc = xtftp ]; then dhcp - if [ x$rootpath != x ]; then - nfsroot=$rootpath + if [ x${global.dhcp.rootpath} != x ]; then + nfsroot=${global.dhcp.rootpath} fi - if [ x$bootfile != x ]; then - kernelimage=$bootfile + if [ x${global.dhcp.bootfile} != x ]; then + kernelimage=${global.dhcp.bootfile} fi - if [ x$dhcp_oftree_file != x ]; then - oftreeimage=$dhcp_oftree_file + if [ x$global.dhcp.oftree_file} != x ]; then + oftreeimage=${global.dhcp_oftree_file} fi fi fi
defaultenv/config +1 -1
@@ -11,7 +11,7 @@ fi # use 'dhcp' to do dhcp in barebox and in kernel # use 'none' if you want to skip kernel ip autoconfiguration ip=dhcp -dhcp_vendor_id=barebox +global.dhcp.vendor_id=barebox # or set your networking parameters here #eth0.ipaddr=a.b.c.d
net/dhcp.c +100 -19
207 lines not on this page · raw message
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 7/7 defaultenv-2: eth0 add default global.dhcp.vendor_id
In reply to Jean-Christophe PLAGNIOL-VILLARD--- defaultenv-2/base/network/eth0 | 1 + 1 file changed, 1 insertion(+)
defaultenv-2/base/network/eth0 +1 -0
@@ -2,6 +2,7 @@ # ip setting (static/dhcp) ip=dhcp +global.dhcp.vendor_id=barebox-${global.hostname} # static setup used if ip=static ipaddr=
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 3/7 defaultenv: switch hostname to global.hostname
In reply to Jean-Christophe PLAGNIOL-VILLARDUdpate dhcp with it too.
--- arch/arm/boards/eukrea_cpuimx25/env/config | 12 ++++++------ arch/arm/boards/eukrea_cpuimx35/env/config | 12 ++++++------ arch/arm/boards/eukrea_cpuimx51/env/config | 12 ++++++------ arch/arm/boards/freescale-mx28-evk/env/config | 10 +++++----- arch/arm/boards/freescale-mx35-3-stack/env/config | 12 ++++++------ arch/arm/boards/freescale-mx53-loco/env/config | 12 ++++++------ arch/arm/boards/freescale-mx53-smd/env/config | 12 ++++++------ arch/arm/boards/friendlyarm-mini2440/env/config | 12 ++++++------ arch/arm/boards/guf-cupid/env/config | 12 ++++++------ arch/arm/boards/guf-neso/env/config | 12 ++++++------ arch/arm/boards/karo-tx25/env/config | 12 ++++++------ arch/arm/boards/karo-tx28/env/config | 12 ++++++------ arch/arm/boards/panda/env/config | 10 +++++----- arch/arm/boards/pcm027/env/config | 12 ++++++------ arch/arm/boards/pcm037/env/config | 12 ++++++------ arch/arm/boards/pcm043/env/config | 12 ++++++------ arch/arm/boards/pcm049/env/config | 12 ++++++------ arch/arm/boards/phycard-a-l1/env/config | 16 ++++++++-------- arch/arm/boards/phycard-a-xl2/env/config | 12 ++++++------ arch/arm/boards/phycard-i.MX27/env/config | 12 ++++++------ arch/arm/boards/scb9328/env/config | 12 ++++++------ defaultenv/config | 16 ++++++++-------- net/dhcp.c | 4 ++-- 23 files changed, 136 insertions(+), 136 deletions(-)
arch/arm/boards/eukrea_cpuimx25/env/config +6 -6
@@ -24,16 +24,16 @@ rootfs_loc=nand # rootfs rootfs_type=ubifs -rootfsimage=$hostname/rootfs.$rootfs_type +rootfsimage=${global.hostname}/rootfs.$rootfs_type # kernel -kernelimage=$hostname/uImage-${hostname}.bin +kernelimage=${global.hostname}/uImage-${global.hostname}.bin # barebox and it's env -bareboximage=$hostname/barebox-${hostname}.bin -bareboxenvimage=$hostname/bareboxenv-${hostname}.bin +bareboximage=${global.hostname}/barebox-${global.hostname}.bin +bareboxenvimage=${global.hostname}/bareboxenv-${global.hostname}.bin -nfsroot="$eth0.serverip:/srv/nfs/$hostname" +nfsroot="$eth0.serverip:/srv/nfs/${global.hostname}" autoboot_timeout=1
@@ -42,7 +42,7 @@ bootargs="console=ttymxc0,115200 otg_mode=$otg_mode video=imxfb:$video" nand_parts="256k(barebox)ro,128k(bareboxenv),3M(kernel),-(root)" rootfs_mtdblock_nand=3 nand_device="mxc_nand" -ubiroot="$hostname-rootfs" +ubiroot="${global.hostname}-rootfs" device_type="nand" # set a fancy prompt (if support is compiled in)
arch/arm/boards/eukrea_cpuimx35/env/config +6 -6
@@ -24,16 +24,16 @@ rootfs_loc=nand # rootfs rootfs_type=ubifs -rootfsimage=$hostname/rootfs.$rootfs_type +rootfsimage=${global.hostname}/rootfs.$rootfs_type # kernel -kernelimage=$hostname/uImage-${hostname}.bin +kernelimage=${global.hostname}/uImage-${global.hostname}.bin # barebox and it's env -bareboximage=$hostname/barebox-${hostname}.bin -bareboxenvimage=$hostname/bareboxenv-${hostname}.bin +bareboximage=${global.hostname}/barebox-${global.hostname}.bin +bareboxenvimage=${global.hostname}/bareboxenv-${global.hostname}.bin -nfsroot="$eth0.serverip:/srv/nfs/$hostname" +nfsroot="$eth0.serverip:/srv/nfs/${global.hostname}" autoboot_timeout=1
@@ -42,7 +42,7 @@ bootargs="console=ttymxc0,115200 otg_mode=$otg_mode video=mx3fb:$video" nand_parts="256k(barebox)ro,128k(bareboxenv),3M(kernel),-(root)" rootfs_mtdblock_nand=3 nand_device="mxc_nand" -ubiroot="$hostname-rootfs" +ubiroot="${global.hostname}-rootfs" device_type="nand" # set a fancy prompt (if support is compiled in)
arch/arm/boards/eukrea_cpuimx51/env/config +6 -6
@@ -27,16 +27,16 @@ rootfs_loc=nand # rootfs rootfs_type=ubifs -rootfsimage=$hostname/rootfs.$rootfs_type +rootfsimage=${global.hostname}/rootfs.$rootfs_type # kernel -kernelimage=$hostname/uImage-${hostname}.bin +kernelimage=${global.hostname}/uImage-${global.hostname}.bin # barebox and it's env -bareboximage=$hostname/barebox-${hostname}.bin -bareboxenvimage=$hostname/bareboxenv-${hostname}.bin +bareboximage=${global.hostname}/barebox-${global.hostname}.bin +bareboxenvimage=${global.hostname}/bareboxenv-${global.hostname}.bin -nfsroot="$eth0.serverip:/srv/nfs/$hostname" +nfsroot="$eth0.serverip:/srv/nfs/${global.hostname}" autoboot_timeout=1
@@ -45,7 +45,7 @@ bootargs="console=ttymxc0,115200 otg_mode=$otg_mode video=$video screen_type=$sc nand_parts="256k(barebox)ro,128k(bareboxenv),3M(kernel),-(root)" rootfs_mtdblock_nand=3 nand_device="mxc_nand" -ubiroot="$hostname-rootfs" +ubiroot="${global.hostname}-rootfs" device_type="nand" # set a fancy prompt (if support is compiled in)
arch/arm/boards/freescale-mx28-evk/env/config +5 -5
@@ -24,21 +24,21 @@ rootfs_loc=net rootfs_type=ext2 # where is the rootfs in case of 'rootfs_loc=disk' (linux name) rootfs_part_linux_dev=mmcblk0p4 -rootfsimage=rootfs-${hostname}.$rootfs_type +rootfsimage=rootfs-${global.hostname}.$rootfs_type # where is the kernel image in case of 'kernel_loc=disk' kernel_part=disk0.2 -kernelimage=zImage-$hostname -bareboximage=barebox-${hostname}.bin -bareboxenvimage=barebox-${hostname}.bin +kernelimage=zImage-${global.hostname} +bareboximage=barebox-${global.hostname}.bin +bareboxenvimage=barebox-${global.hostname}.bin if [ -n $user ]; then bareboximage="$user"-"$bareboximage" bareboxenvimage="$user"-"$bareboxenvimage" kernelimage="$user"-"$kernelimage" rootfsimage="$user"-"$rootfsimage" - nfsroot="/home/$user/nfsroot/$hostname" + nfsroot="/home/$user/nfsroot/${global.hostname}" else nfsroot="/path/to/nfs/root" fi
arch/arm/boards/freescale-mx35-3-stack/env/config +6 -6
@@ -21,16 +21,16 @@ rootfs_loc=net # can be either 'jffs2' or 'ubifs' rootfs_type=ubifs -rootfsimage=root-$hostname.$rootfs_type +rootfsimage=root-${global.hostname}.$rootfs_type -kernelimage=zImage-$hostname -#kernelimage=uImage-$hostname -#kernelimage=Image-$hostname -#kernelimage=Image-$hostname.lzo +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo if [ -n $user ]; then kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/$hostname" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" rootfsimage="$user"-"$rootfsimage" else nfsroot="$eth0.serverip:/path/to/nfs/root"
arch/arm/boards/freescale-mx53-loco/env/config +6 -6
@@ -22,16 +22,16 @@ rootfs_loc=net # can be either 'jffs2' or 'ubifs' rootfs_type=ubifs -rootfsimage=root-$hostname.$rootfs_type +rootfsimage=root-${global.hostname}.$rootfs_type -kernelimage=zImage-$hostname -#kernelimage=uImage-$hostname -#kernelimage=Image-$hostname -#kernelimage=Image-$hostname.lzo +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo if [ -n $user ]; then kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/$hostname" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" rootfsimage="$user"-"$rootfsimage" else nfsroot="$eth0.serverip:/path/to/nfs/root"
arch/arm/boards/freescale-mx53-smd/env/config +6 -6
@@ -21,16 +21,16 @@ rootfs_loc=net # can be either 'jffs2' or 'ubifs' rootfs_type=ubifs -rootfsimage=root-$hostname.$rootfs_type +rootfsimage=root-${global.hostname}.$rootfs_type -kernelimage=zImage-$hostname -#kernelimage=uImage-$hostname -#kernelimage=Image-$hostname -#kernelimage=Image-$hostname.lzo +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo if [ -n $user ]; then kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/$hostname" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" rootfsimage="$user"-"$rootfsimage" else nfsroot="$eth0.serverip:/path/to/nfs/root"
arch/arm/boards/friendlyarm-mini2440/env/config +6 -6
@@ -21,16 +21,16 @@ rootfs_loc=net # can be either 'jffs2' or 'ubifs' rootfs_type=ubifs -rootfsimage=root-${hostname}.${rootfs_type} +rootfsimage=root-${global.hostname}.${rootfs_type} -kernelimage=zImage-${hostname} -#kernelimage=uImage-$hostname -#kernelimage=Image-$hostname -#kernelimage=Image-$hostname.lzo +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo if [ -n $user ]; then kernelimage="${user}"-"${kernelimage}" - nfsroot="${eth0.serverip}:/home/${user}/nfsroot/${hostname}" + nfsroot="${eth0.serverip}:/home/${user}/nfsroot/${global.hostname}" rootfsimage="${user}"-"${rootfsimage}" else nfsroot="${eth0.serverip}:/path/to/nfs/root"
arch/arm/boards/guf-cupid/env/config +6 -6
@@ -21,16 +21,16 @@ rootfs_loc=net # can be either 'jffs2' or 'ubifs' rootfs_type=ubifs -rootfsimage=root-$hostname.$rootfs_type +rootfsimage=root-${global.hostname}.$rootfs_type -kernelimage=zImage-$hostname -#kernelimage=uImage-$hostname -#kernelimage=Image-$hostname -#kernelimage=Image-$hostname.lzo +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo if [ -n $user ]; then kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/$hostname" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" rootfsimage="$user"-"$rootfsimage" else nfsroot="$eth0.serverip:/path/to/nfs/root"
arch/arm/boards/guf-neso/env/config +6 -6
@@ -21,16 +21,16 @@ rootfs_loc=net # can be either 'jffs2' or 'ubifs' rootfs_type=ubifs -rootfsimage=root-$hostname.$rootfs_type +rootfsimage=root-${global.hostname}.$rootfs_type -kernelimage=zImage-$hostname -#kernelimage=uImage-$hostname -#kernelimage=Image-$hostname -#kernelimage=Image-$hostname.lzo +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo if [ -n $user ]; then kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/$hostname" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" rootfsimage="$user"-"$rootfsimage" else nfsroot="$eth0.serverip:/path/to/nfs/root"
arch/arm/boards/karo-tx25/env/config +6 -6
@@ -21,16 +21,16 @@ rootfs_loc=net # can be either 'jffs2' or 'ubifs' rootfs_type=ubifs -rootfsimage=root-$hostname.$rootfs_type +rootfsimage=root-${global.hostname}.$rootfs_type -kernelimage=zImage-$hostname -#kernelimage=uImage-$hostname -#kernelimage=Image-$hostname -#kernelimage=Image-$hostname.lzo +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo if [ -n $user ]; then kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/$hostname" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" rootfsimage="$user"-"$rootfsimage" else nfsroot="$eth0.serverip:/path/to/nfs/root"
arch/arm/boards/karo-tx28/env/config +6 -6
@@ -22,16 +22,16 @@ rootfs_loc=net # can be either 'jffs2' or 'ubifs' rootfs_type=ubifs -rootfsimage=root-$hostname.$rootfs_type +rootfsimage=root-${global.hostname}.$rootfs_type -kernelimage=zImage-$hostname -#kernelimage=uImage-$hostname -#kernelimage=Image-$hostname -#kernelimage=Image-$hostname.lzo +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo if [ -n $user ]; then kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/$hostname" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" rootfsimage="$user"-"$rootfsimage" else nfsroot="$eth0.serverip:/path/to/nfs/root"
arch/arm/boards/panda/env/config +5 -5
@@ -18,14 +18,14 @@ kernel_loc=tftp # can be either 'net', 'nor', 'nand' or 'initrd' rootfs_loc=net -kernelimage=zImage-$hostname -#kernelimage=uImage-$hostname -#kernelimage=Image-$hostname -#kernelimage=Image-${hostname}.lzo +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo if [ -n $user ]; then kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/$hostname" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" rootfsimage="$user"-"$rootfsimage" else nfsroot="$eth0.serverip:/path/to/nfs/root"
arch/arm/boards/pcm027/env/config +6 -6
@@ -21,16 +21,16 @@ rootfs_loc=net # can be either 'jffs2' or 'ubifs' rootfs_type=ubifs -rootfsimage=root-$hostname.$rootfs_type +rootfsimage=root-${global.hostname}.$rootfs_type -kernelimage=zImage-$hostname -#kernelimage=uImage-$hostname -#kernelimage=Image-$hostname -#kernelimage=Image-$hostname.lzo +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo if [ -n $user ]; then kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/$hostname" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" rootfsimage="$user"-"$rootfsimage" else nfsroot="$eth0.serverip:/path/to/nfs/root"
arch/arm/boards/pcm037/env/config +6 -6
@@ -21,16 +21,16 @@ rootfs_loc=net # can be either 'jffs2' or 'ubifs' rootfs_type=ubifs -rootfsimage=root-$hostname.$rootfs_type +rootfsimage=root-${global.hostname}.$rootfs_type -kernelimage=zImage-$hostname -#kernelimage=uImage-$hostname -#kernelimage=Image-$hostname -#kernelimage=Image-$hostname.lzo +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo if [ -n $user ]; then kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/$hostname" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" rootfsimage="$user"-"$rootfsimage" else nfsroot="$eth0.serverip:/path/to/nfs/root"
arch/arm/boards/pcm043/env/config +6 -6
@@ -21,16 +21,16 @@ rootfs_loc=net # can be either 'jffs2' or 'ubifs' rootfs_type=ubifs -rootfsimage=root-$hostname.$rootfs_type +rootfsimage=root-${global.hostname}.$rootfs_type -kernelimage=zImage-$hostname -#kernelimage=uImage-$hostname -#kernelimage=Image-$hostname -#kernelimage=Image-$hostname.lzo +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo if [ -n $user ]; then kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/$hostname" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" rootfsimage="$user"-"$rootfsimage" else nfsroot="$eth0.serverip:/path/to/nfs/root"
arch/arm/boards/pcm049/env/config +6 -6
@@ -21,16 +21,16 @@ rootfs_loc=net # can be either 'jffs2' or 'ubifs' rootfs_type=ubifs -rootfsimage=root-${hostname}.$rootfs_type +rootfsimage=root-${global.hostname}.$rootfs_type -kernelimage=zImage-$hostname -#kernelimage=uImage-$hostname -#kernelimage=Image-$hostname -#kernelimage=Image-${hostname}.lzo +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo if [ -n $user ]; then kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/$hostname" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" rootfsimage="$user"-"$rootfsimage" else nfsroot="$eth0.serverip:/path/to/nfs/root"
arch/arm/boards/phycard-a-l1/env/config +8 -8
@@ -26,26 +26,26 @@ rootfs_loc=nand rootfs_type=jffs2 # where is the rootfs in case of 'rootfs_loc=disk' (linux name) rootfs_part_linux_dev=mmcblk0p4 -rootfsimage=rootfs-${hostname}.$rootfs_type +rootfsimage=rootfs-${global.hostname}.$rootfs_type # where is the kernel image in case of 'kernel_loc=disk' kernel_part=disk0.2 # The image type of the kernel. Can be uimage, zimage, raw or raw_lzo -#kernelimage=zImage-$hostname -kernelimage=uImage-$hostname -#kernelimage=Image-$hostname -#kernelimage=Image-$hostname.lzo +#kernelimage=zImage-${global.hostname} +kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo -bareboximage=barebox-${hostname}.bin -bareboxenvimage=barebox-${hostname}.bin +bareboximage=barebox-${global.hostname}.bin +bareboxenvimage=barebox-${global.hostname}.bin if [ -n $user ]; then bareboximage="$user"-"$bareboximage" bareboxenvimage="$user"-"$bareboxenvimage" kernelimage="$user"-"$kernelimage" rootfsimage="$user"-"$rootfsimage" - nfsroot="/home/$user/nfsroot/$hostname" + nfsroot="/home/$user/nfsroot/${global.hostname}" else nfsroot="/path/to/nfs/root" fi
arch/arm/boards/phycard-a-xl2/env/config +6 -6
@@ -20,16 +20,16 @@ rootfs_loc=net # can be either 'jffs2' or 'ubifs' rootfs_type=ubifs -rootfsimage=root-${hostname}.$rootfs_type +rootfsimage=root-${global.hostname}.$rootfs_type -kernelimage=zImage-$hostname -#kernelimage=uImage-$hostname -#kernelimage=Image-$hostname -#kernelimage=Image-${hostname}.lzo +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo if [ -n $user ]; then kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/$hostname" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" rootfsimage="$user"-"$rootfsimage" else nfsroot="$eth0.serverip:/path/to/nfs/root"
arch/arm/boards/phycard-i.MX27/env/config +6 -6
@@ -21,16 +21,16 @@ rootfs_loc=net # can be either 'jffs2' or 'ubifs' rootfs_type=ubifs -rootfsimage=root-$hostname.$rootfs_type +rootfsimage=root-${global.hostname}.$rootfs_type -kernelimage=zImage-$hostname -#kernelimage=uImage-$hostname -#kernelimage=Image-$hostname -#kernelimage=Image-$hostname.lzo +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo if [ -n $user ]; then kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/$hostname" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" rootfsimage="$user"-"$rootfsimage" else nfsroot="$eth0.serverip:/path/to/nfs/root"
arch/arm/boards/scb9328/env/config +6 -6
@@ -21,16 +21,16 @@ rootfs_loc=net # can be either 'jffs2' or 'ubifs' rootfs_type=ubifs -rootfsimage=root-$hostname.$rootfs_type +rootfsimage=root-${global.hostname}.$rootfs_type -kernelimage=zImage-$hostname -#kernelimage=uImage-$hostname -#kernelimage=Image-$hostname -#kernelimage=Image-$hostname.lzo +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo if [ -n $user ]; then kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/$hostname" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" rootfsimage="$user"-"$rootfsimage" else nfsroot="$eth0.serverip:/path/to/nfs/root"
defaultenv/config +8 -8
@@ -31,25 +31,25 @@ oftree_loc=tftp rootfs_type=ubifs # where is the rootfs in case of 'rootfs_loc=disk' (linux name) rootfs_part_linux_dev=mmcblk0p4 -rootfsimage=rootfs-${hostname}.$rootfs_type +rootfsimage=rootfs-${global.hostname}.$rootfs_type # where is the kernel image in case of 'kernel_loc=disk' kernel_part=disk0.2 -kernelimage=zImage-$hostname -#kernelimage=uImage-$hostname -#kernelimage=Image-$hostname -#kernelimage=Image-$hostname.lzo +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo -bareboximage=barebox-${hostname}.bin -bareboxenvimage=barebox-${hostname}.bin +bareboximage=barebox-${global.hostname}.bin +bareboxenvimage=barebox-${global.hostname}.bin if [ -n $user ]; then bareboximage="$user"-"$bareboximage" bareboxenvimage="$user"-"$bareboxenvimage" kernelimage="$user"-"$kernelimage" rootfsimage="$user"-"$rootfsimage" - nfsroot="/home/$user/nfsroot/$hostname" + nfsroot="/home/$user/nfsroot/${global.hostname}" else nfsroot="/path/to/nfs/root" fi
net/dhcp.c +2 -2
@@ -175,7 +175,7 @@ struct dhcp_opt dhcp_options[] = { }, { .option = 12, .handle = env_str_handle, - .barebox_var_name = "hostname", + .barebox_var_name = "global.hostname", }, { .option = 15, .handle = env_str_handle,
@@ -248,7 +248,7 @@ struct dhcp_param dhcp_params[] = { { .option = DHCP_HOSTNAME, .handle = dhcp_set_string_options, - .barebox_var_name = "hostname", + .barebox_var_name = "global.hostname", }, { .option = DHCP_VENDOR_ID, .handle = dhcp_set_string_options,
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
maintainerRe: [PATCH 1/7] globalbar: add inline when not enabled
In reply to Jean-Christophe PLAGNIOL-VILLARDFor the third time now:
Subject: s/globalbar/globalvar/
Sascha
Quoted 51 lines · Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>--- include/globalvar.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)include/globalvar.h +20
-0@@ -1,6 +1,7 @@#ifndef __GLOBALVAR_H#define __GLOBALVAR_H +#ifdef CONFIG_GLOBALVAR int globalvar_add_simple (const char *name); int globalvar_add(const char *name,@@ -8,5 +9,24 @@ int globalvar_add(const char *name,const char *(*get)(struct device_d *,struct param_d *p), unsigned long flags);char *globalvar_get_match (const char *match,const char *seperator); +#else +static inline int globalvar_add_simple (const char *name) +{ +return 0 ; +} + +static inline int globalvar_add (const char *name, +int (*set)(struct device_d *dev,struct param_d *p,const char *val), +const char *(*get)(struct device_d *,struct param_d *p), +unsigned long flags) +{ +return 0 ; +} + +static inline char *globalvar_get_match (const char *match,const char *seperator) +{ +return NULL ; +} +#endif #endif /* __GLOBALVAR_H */ Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 1/7] globalbar: add inline when not enabled
Quoted 3 lines · Sascha Hauer
For the third time now:
Subject: s/globalbar/globalvar/
tiredchery-pick the wrong one
tag updated
Best Regards,
J.
Quoted 50 lines
Sascha
Quoted 46 lines · Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>--- include/globalvar.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)include/globalvar.h +20
-0@@ -1,6 +1,7 @@#ifndef __GLOBALVAR_H#define __GLOBALVAR_H +#ifdef CONFIG_GLOBALVAR int globalvar_add_simple (const char *name); int globalvar_add(const char *name,@@ -8,5 +9,24 @@ int globalvar_add(const char *name,const char *(*get)(struct device_d *,struct param_d *p), unsigned long flags);char *globalvar_get_match (const char *match,const char *seperator); +#else +static inline int globalvar_add_simple (const char *name) +{ +return 0 ; +} + +static inline int globalvar_add (const char *name, +int (*set)(struct device_d *dev,struct param_d *p,const char *val), +const char *(*get)(struct device_d *,struct param_d *p), +unsigned long flags) +{ +return 0 ; +} + +static inline char *globalvar_get_match (const char *match,const char *seperator) +{ +return NULL ; +} +#endif #endif /* __GLOBALVAR_H */ Signature · 1 line
1.7.10.4
Quoted 11 lines
Quoted 5 lines
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/bareboxSignature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
maintainerRe: [PATCH 3/7] defaultenv: switch hostname to global.hostname
In reply to Jean-Christophe PLAGNIOL-VILLARDarch/arm/boards/eukrea_cpuimx25/env/config rootfs_loc=nand · line 27
Quoted 11 lines · Jean-Christophe PLAGNIOL-VILLARD
arch/arm/boards/eukrea_cpuimx25/env/config +1
-1@@ -24,16 +24,16 @@ rootfs_loc=nand # rootfs rootfs_type=ubifs -rootfsimage=$hostname/rootfs.$rootfs_type +rootfsimage=${global.hostname}/rootfs.$rootfs_type
This fixes all cases where global.hostname is read, but not where it's set, i.e.
hostname=eukrea-cpuimx25
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 3/7] defaultenv: switch hostname to global.hostname
Quoted 16 lines · Sascha Hauer
arch/arm/boards/eukrea_cpuimx25/env/config rootfs_loc=nand · line 27
Quoted 11 lines · Jean-Christophe PLAGNIOL-VILLARD
arch/arm/boards/eukrea_cpuimx25/env/config +1
-1@@ -24,16 +24,16 @@ rootfs_loc=nand # rootfs rootfs_type=ubifs -rootfsimage=$hostname/rootfs.$rootfs_type +rootfsimage=${global.hostname}/rootfs.$rootfs_typeThis fixes all cases where global.hostname is read, but not where it's set, i.e.
Quoted 1 line
hostname=eukrea-cpuimx25
normally I drop hostname to global.hostname
Best Regards,
J.
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 3/7] defaultenv: switch hostname to global.hostname
In reply to Sascha HauerQuoted 16 lines · Sascha Hauer
arch/arm/boards/eukrea_cpuimx25/env/config rootfs_loc=nand · line 27
Quoted 11 lines · Jean-Christophe PLAGNIOL-VILLARD
arch/arm/boards/eukrea_cpuimx25/env/config +1
-1@@ -24,16 +24,16 @@ rootfs_loc=nand # rootfs rootfs_type=ubifs -rootfsimage=$hostname/rootfs.$rootfs_type +rootfsimage=${global.hostname}/rootfs.$rootfs_typeThis fixes all cases where global.hostname is read, but not where it's set, i.e.
Quoted 1 line
hostname=eukrea-cpuimx25
yeap found it I send the v2
Best Regards,
J.
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
PATCH v2 3/7 defaultenv: switch hostname to global.hostname
In reply to Jean-Christophe PLAGNIOL-VILLARDUdpate dhcp with it too.
---
tag updated
arch/arm/boards/chumby_falconwing/env/config | 2 +- arch/arm/boards/eukrea_cpuimx25/env/config | 14 +++++++------- arch/arm/boards/eukrea_cpuimx35/env/config | 14 +++++++------- arch/arm/boards/eukrea_cpuimx51/env/config | 14 +++++++------- arch/arm/boards/freescale-mx28-evk/env/config | 12 ++++++------ arch/arm/boards/freescale-mx35-3-stack/env/config | 14 +++++++------- arch/arm/boards/freescale-mx53-loco/env/config | 14 +++++++------- arch/arm/boards/freescale-mx53-smd/env/config | 14 +++++++------- arch/arm/boards/friendlyarm-mini2440/env/config | 14 +++++++------- arch/arm/boards/guf-cupid/env/config | 14 +++++++------- arch/arm/boards/guf-neso/env/config | 14 +++++++------- arch/arm/boards/karo-tx25/env/config | 14 +++++++------- arch/arm/boards/karo-tx28/env/config | 14 +++++++------- arch/arm/boards/panda/env/config | 12 ++++++------ arch/arm/boards/pcm027/env/config | 14 +++++++------- arch/arm/boards/pcm037/env/config | 14 +++++++------- arch/arm/boards/pcm043/env/config | 14 +++++++------- arch/arm/boards/pcm049/env/config | 14 +++++++------- arch/arm/boards/phycard-a-l1/env/config | 18 +++++++++--------- arch/arm/boards/phycard-a-xl2/env/config | 14 +++++++------- arch/arm/boards/phycard-i.MX27/env/config | 14 +++++++------- arch/arm/boards/scb9328/env/config | 14 +++++++------- defaultenv/config | 16 ++++++++-------- net/dhcp.c | 4 ++-- 24 files changed, 158 insertions(+), 158 deletions(-)
arch/arm/boards/chumby_falconwing/env/config +1 -1
@@ -1,6 +1,6 @@ #!/bin/sh -hostname=falconwing +global.hostname=falconwing # use 'dhcp' to do dhcp in barebox and in kernel # use 'none' if you want to skip kernel ip autoconfiguration
arch/arm/boards/eukrea_cpuimx25/env/config +7 -7
@@ -5,7 +5,7 @@ otg_mode="device" # video : can be CMO-QVGA, URT-WVGA, DVI-VGA or DVI-SVGA video="CMO-QVGA" -hostname=eukrea-cpuimx25 +global.hostname=eukrea-cpuimx25 # use 'dhcp' to do dhcp in barebox and in kernel # use 'none' if you want to skip kernel ip autoconfiguration
@@ -24,16 +24,16 @@ rootfs_loc=nand # rootfs rootfs_type=ubifs -rootfsimage=$hostname/rootfs.$rootfs_type +rootfsimage=${global.hostname}/rootfs.$rootfs_type # kernel -kernelimage=$hostname/uImage-${hostname}.bin +kernelimage=${global.hostname}/uImage-${global.hostname}.bin # barebox and it's env -bareboximage=$hostname/barebox-${hostname}.bin -bareboxenvimage=$hostname/bareboxenv-${hostname}.bin +bareboximage=${global.hostname}/barebox-${global.hostname}.bin +bareboxenvimage=${global.hostname}/bareboxenv-${global.hostname}.bin -nfsroot="$eth0.serverip:/srv/nfs/$hostname" +nfsroot="$eth0.serverip:/srv/nfs/${global.hostname}" autoboot_timeout=1
@@ -42,7 +42,7 @@ bootargs="console=ttymxc0,115200 otg_mode=$otg_mode video=imxfb:$video" nand_parts="256k(barebox)ro,128k(bareboxenv),3M(kernel),-(root)" rootfs_mtdblock_nand=3 nand_device="mxc_nand" -ubiroot="$hostname-rootfs" +ubiroot="${global.hostname}-rootfs" device_type="nand" # set a fancy prompt (if support is compiled in)
arch/arm/boards/eukrea_cpuimx35/env/config +7 -7
@@ -5,7 +5,7 @@ otg_mode="device" # video : can be CMO-QVGA, URT-WVGA, DVI-VGA or DVI-SVGA video="CMO-QVGA" -hostname=eukrea-cpuimx35 +global.hostname=eukrea-cpuimx35 # use 'dhcp' to do dhcp in barebox and in kernel # use 'none' if you want to skip kernel ip autoconfiguration
@@ -24,16 +24,16 @@ rootfs_loc=nand # rootfs rootfs_type=ubifs -rootfsimage=$hostname/rootfs.$rootfs_type +rootfsimage=${global.hostname}/rootfs.$rootfs_type # kernel -kernelimage=$hostname/uImage-${hostname}.bin +kernelimage=${global.hostname}/uImage-${global.hostname}.bin # barebox and it's env -bareboximage=$hostname/barebox-${hostname}.bin -bareboxenvimage=$hostname/bareboxenv-${hostname}.bin +bareboximage=${global.hostname}/barebox-${global.hostname}.bin +bareboxenvimage=${global.hostname}/bareboxenv-${global.hostname}.bin -nfsroot="$eth0.serverip:/srv/nfs/$hostname" +nfsroot="$eth0.serverip:/srv/nfs/${global.hostname}" autoboot_timeout=1
@@ -42,7 +42,7 @@ bootargs="console=ttymxc0,115200 otg_mode=$otg_mode video=mx3fb:$video" nand_parts="256k(barebox)ro,128k(bareboxenv),3M(kernel),-(root)" rootfs_mtdblock_nand=3 nand_device="mxc_nand" -ubiroot="$hostname-rootfs" +ubiroot="${global.hostname}-rootfs" device_type="nand" # set a fancy prompt (if support is compiled in)
arch/arm/boards/eukrea_cpuimx51/env/config +7 -7
@@ -8,7 +8,7 @@ video="CMO-QVGA" # screen type : can be 'tft' or 'dvi' screen_type="tft" -hostname=eukrea-cpuimx51 +global.hostname=eukrea-cpuimx51 # use 'dhcp' to do dhcp in barebox and in kernel # use 'none' if you want to skip kernel ip autoconfiguration
@@ -27,16 +27,16 @@ rootfs_loc=nand # rootfs rootfs_type=ubifs -rootfsimage=$hostname/rootfs.$rootfs_type +rootfsimage=${global.hostname}/rootfs.$rootfs_type # kernel -kernelimage=$hostname/uImage-${hostname}.bin +kernelimage=${global.hostname}/uImage-${global.hostname}.bin # barebox and it's env -bareboximage=$hostname/barebox-${hostname}.bin -bareboxenvimage=$hostname/bareboxenv-${hostname}.bin +bareboximage=${global.hostname}/barebox-${global.hostname}.bin +bareboxenvimage=${global.hostname}/bareboxenv-${global.hostname}.bin -nfsroot="$eth0.serverip:/srv/nfs/$hostname" +nfsroot="$eth0.serverip:/srv/nfs/${global.hostname}" autoboot_timeout=1
@@ -45,7 +45,7 @@ bootargs="console=ttymxc0,115200 otg_mode=$otg_mode video=$video screen_type=$sc nand_parts="256k(barebox)ro,128k(bareboxenv),3M(kernel),-(root)" rootfs_mtdblock_nand=3 nand_device="mxc_nand" -ubiroot="$hostname-rootfs" +ubiroot="${global.hostname}-rootfs" device_type="nand" # set a fancy prompt (if support is compiled in)
arch/arm/boards/freescale-mx28-evk/env/config +6 -6
@@ -1,6 +1,6 @@ #!/bin/sh -hostname=mx28-evk +global.hostname=mx28-evk #user= # use 'dhcp' to do dhcp in barebox and in kernel
@@ -24,21 +24,21 @@ rootfs_loc=net rootfs_type=ext2 # where is the rootfs in case of 'rootfs_loc=disk' (linux name) rootfs_part_linux_dev=mmcblk0p4 -rootfsimage=rootfs-${hostname}.$rootfs_type +rootfsimage=rootfs-${global.hostname}.$rootfs_type # where is the kernel image in case of 'kernel_loc=disk' kernel_part=disk0.2 -kernelimage=zImage-$hostname -bareboximage=barebox-${hostname}.bin -bareboxenvimage=barebox-${hostname}.bin +kernelimage=zImage-${global.hostname} +bareboximage=barebox-${global.hostname}.bin +bareboxenvimage=barebox-${global.hostname}.bin if [ -n $user ]; then bareboximage="$user"-"$bareboximage" bareboxenvimage="$user"-"$bareboxenvimage" kernelimage="$user"-"$kernelimage" rootfsimage="$user"-"$rootfsimage" - nfsroot="/home/$user/nfsroot/$hostname" + nfsroot="/home/$user/nfsroot/${global.hostname}" else nfsroot="/path/to/nfs/root" fi
arch/arm/boards/freescale-mx35-3-stack/env/config +7 -7
@@ -1,6 +1,6 @@ #!/bin/sh -hostname=mx35-3stack +global.hostname=mx35-3stack eth0.serverip= user=
@@ -21,16 +21,16 @@ rootfs_loc=net # can be either 'jffs2' or 'ubifs' rootfs_type=ubifs -rootfsimage=root-$hostname.$rootfs_type +rootfsimage=root-${global.hostname}.$rootfs_type -kernelimage=zImage-$hostname -#kernelimage=uImage-$hostname -#kernelimage=Image-$hostname -#kernelimage=Image-$hostname.lzo +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo if [ -n $user ]; then kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/$hostname" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" rootfsimage="$user"-"$rootfsimage" else nfsroot="$eth0.serverip:/path/to/nfs/root"
arch/arm/boards/freescale-mx53-loco/env/config +7 -7
@@ -1,6 +1,6 @@ #!/bin/sh -hostname=loco +global.hostname=loco eth0.serverip= user=
@@ -22,16 +22,16 @@ rootfs_loc=net # can be either 'jffs2' or 'ubifs' rootfs_type=ubifs -rootfsimage=root-$hostname.$rootfs_type +rootfsimage=root-${global.hostname}.$rootfs_type -kernelimage=zImage-$hostname -#kernelimage=uImage-$hostname -#kernelimage=Image-$hostname -#kernelimage=Image-$hostname.lzo +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo if [ -n $user ]; then kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/$hostname" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" rootfsimage="$user"-"$rootfsimage" else nfsroot="$eth0.serverip:/path/to/nfs/root"
arch/arm/boards/freescale-mx53-smd/env/config +7 -7
@@ -1,6 +1,6 @@ #!/bin/sh -hostname=loco +global.hostname=loco eth0.serverip= user=
@@ -21,16 +21,16 @@ rootfs_loc=net # can be either 'jffs2' or 'ubifs' rootfs_type=ubifs -rootfsimage=root-$hostname.$rootfs_type +rootfsimage=root-${global.hostname}.$rootfs_type -kernelimage=zImage-$hostname -#kernelimage=uImage-$hostname -#kernelimage=Image-$hostname -#kernelimage=Image-$hostname.lzo +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo if [ -n $user ]; then kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/$hostname" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" rootfsimage="$user"-"$rootfsimage" else nfsroot="$eth0.serverip:/path/to/nfs/root"
arch/arm/boards/friendlyarm-mini2440/env/config +7 -7
@@ -1,6 +1,6 @@ #!/bin/sh -hostname=mini2440 +global.hostname=mini2440 eth0.serverip= user=
@@ -21,16 +21,16 @@ rootfs_loc=net # can be either 'jffs2' or 'ubifs' rootfs_type=ubifs -rootfsimage=root-${hostname}.${rootfs_type} +rootfsimage=root-${global.hostname}.${rootfs_type} -kernelimage=zImage-${hostname} -#kernelimage=uImage-$hostname -#kernelimage=Image-$hostname -#kernelimage=Image-$hostname.lzo +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo if [ -n $user ]; then kernelimage="${user}"-"${kernelimage}" - nfsroot="${eth0.serverip}:/home/${user}/nfsroot/${hostname}" + nfsroot="${eth0.serverip}:/home/${user}/nfsroot/${global.hostname}" rootfsimage="${user}"-"${rootfsimage}" else nfsroot="${eth0.serverip}:/path/to/nfs/root"
arch/arm/boards/guf-cupid/env/config +7 -7
@@ -1,6 +1,6 @@ #!/bin/sh -hostname=cupid +global.hostname=cupid eth0.serverip= user=
@@ -21,16 +21,16 @@ rootfs_loc=net # can be either 'jffs2' or 'ubifs' rootfs_type=ubifs -rootfsimage=root-$hostname.$rootfs_type +rootfsimage=root-${global.hostname}.$rootfs_type -kernelimage=zImage-$hostname -#kernelimage=uImage-$hostname -#kernelimage=Image-$hostname -#kernelimage=Image-$hostname.lzo +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo if [ -n $user ]; then kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/$hostname" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" rootfsimage="$user"-"$rootfsimage" else nfsroot="$eth0.serverip:/path/to/nfs/root"
arch/arm/boards/guf-neso/env/config +7 -7
@@ -1,6 +1,6 @@ #!/bin/sh -hostname=guf-neso +global.hostname=guf-neso eth0.serverip= user=
@@ -21,16 +21,16 @@ rootfs_loc=net # can be either 'jffs2' or 'ubifs' rootfs_type=ubifs -rootfsimage=root-$hostname.$rootfs_type +rootfsimage=root-${global.hostname}.$rootfs_type -kernelimage=zImage-$hostname -#kernelimage=uImage-$hostname -#kernelimage=Image-$hostname -#kernelimage=Image-$hostname.lzo +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo if [ -n $user ]; then kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/$hostname" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" rootfsimage="$user"-"$rootfsimage" else nfsroot="$eth0.serverip:/path/to/nfs/root"
arch/arm/boards/karo-tx25/env/config +7 -7
@@ -1,5 +1,5 @@ -hostname=tx25 +global.hostname=tx25 baseboard=tx28stk5 user=
@@ -21,16 +21,16 @@ rootfs_loc=net # can be either 'jffs2' or 'ubifs' rootfs_type=ubifs -rootfsimage=root-$hostname.$rootfs_type +rootfsimage=root-${global.hostname}.$rootfs_type -kernelimage=zImage-$hostname -#kernelimage=uImage-$hostname -#kernelimage=Image-$hostname -#kernelimage=Image-$hostname.lzo +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo if [ -n $user ]; then kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/$hostname" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" rootfsimage="$user"-"$rootfsimage" else nfsroot="$eth0.serverip:/path/to/nfs/root"
arch/arm/boards/karo-tx28/env/config +7 -7
@@ -1,7 +1,7 @@ # # -hostname=tx28 +global.hostname=tx28 baseboard=tx28stk5 # use 'dhcp' to do dhcp in barebox and in kernel
@@ -22,16 +22,16 @@ rootfs_loc=net # can be either 'jffs2' or 'ubifs' rootfs_type=ubifs -rootfsimage=root-$hostname.$rootfs_type +rootfsimage=root-${global.hostname}.$rootfs_type -kernelimage=zImage-$hostname -#kernelimage=uImage-$hostname -#kernelimage=Image-$hostname -#kernelimage=Image-$hostname.lzo +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo if [ -n $user ]; then kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/$hostname" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" rootfsimage="$user"-"$rootfsimage" else nfsroot="$eth0.serverip:/path/to/nfs/root"
arch/arm/boards/panda/env/config +6 -6
@@ -1,6 +1,6 @@ #!/bin/sh -hostname=panda +global.hostname=panda user= # use 'dhcp' to do dhcp in barebox and in kernel
@@ -18,14 +18,14 @@ kernel_loc=tftp # can be either 'net', 'nor', 'nand' or 'initrd' rootfs_loc=net -kernelimage=zImage-$hostname -#kernelimage=uImage-$hostname -#kernelimage=Image-$hostname -#kernelimage=Image-${hostname}.lzo +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo if [ -n $user ]; then kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/$hostname" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" rootfsimage="$user"-"$rootfsimage" else nfsroot="$eth0.serverip:/path/to/nfs/root"
arch/arm/boards/pcm027/env/config +7 -7
@@ -1,6 +1,6 @@ #!/bin/sh -hostname=pcm027 +global.hostname=pcm027 eth0.serverip= user=
@@ -21,16 +21,16 @@ rootfs_loc=net # can be either 'jffs2' or 'ubifs' rootfs_type=ubifs -rootfsimage=root-$hostname.$rootfs_type +rootfsimage=root-${global.hostname}.$rootfs_type -kernelimage=zImage-$hostname -#kernelimage=uImage-$hostname -#kernelimage=Image-$hostname -#kernelimage=Image-$hostname.lzo +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo if [ -n $user ]; then kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/$hostname" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" rootfsimage="$user"-"$rootfsimage" else nfsroot="$eth0.serverip:/path/to/nfs/root"
arch/arm/boards/pcm037/env/config +7 -7
@@ -1,6 +1,6 @@ #!/bin/sh -hostname=pcm037 +global.hostname=pcm037 eth0.serverip= user=
@@ -21,16 +21,16 @@ rootfs_loc=net # can be either 'jffs2' or 'ubifs' rootfs_type=ubifs -rootfsimage=root-$hostname.$rootfs_type +rootfsimage=root-${global.hostname}.$rootfs_type -kernelimage=zImage-$hostname -#kernelimage=uImage-$hostname -#kernelimage=Image-$hostname -#kernelimage=Image-$hostname.lzo +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo if [ -n $user ]; then kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/$hostname" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" rootfsimage="$user"-"$rootfsimage" else nfsroot="$eth0.serverip:/path/to/nfs/root"
arch/arm/boards/pcm043/env/config +7 -7
@@ -1,6 +1,6 @@ #!/bin/sh -hostname=pcm043 +global.hostname=pcm043 eth0.serverip= user=
@@ -21,16 +21,16 @@ rootfs_loc=net # can be either 'jffs2' or 'ubifs' rootfs_type=ubifs -rootfsimage=root-$hostname.$rootfs_type +rootfsimage=root-${global.hostname}.$rootfs_type -kernelimage=zImage-$hostname -#kernelimage=uImage-$hostname -#kernelimage=Image-$hostname -#kernelimage=Image-$hostname.lzo +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo if [ -n $user ]; then kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/$hostname" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" rootfsimage="$user"-"$rootfsimage" else nfsroot="$eth0.serverip:/path/to/nfs/root"
arch/arm/boards/pcm049/env/config +7 -7
@@ -1,6 +1,6 @@ #!/bin/sh -hostname=pcm049 +global.hostname=pcm049 eth0.serverip= user=
@@ -21,16 +21,16 @@ rootfs_loc=net # can be either 'jffs2' or 'ubifs' rootfs_type=ubifs -rootfsimage=root-${hostname}.$rootfs_type +rootfsimage=root-${global.hostname}.$rootfs_type -kernelimage=zImage-$hostname -#kernelimage=uImage-$hostname -#kernelimage=Image-$hostname -#kernelimage=Image-${hostname}.lzo +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo if [ -n $user ]; then kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/$hostname" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" rootfsimage="$user"-"$rootfsimage" else nfsroot="$eth0.serverip:/path/to/nfs/root"
arch/arm/boards/phycard-a-l1/env/config +9 -9
@@ -1,6 +1,6 @@ #!/bin/sh -hostname=pcaal1 +global.hostname=pcaal1 #user= # Enter MAC address here if not retrieved automatically
@@ -26,26 +26,26 @@ rootfs_loc=nand rootfs_type=jffs2 # where is the rootfs in case of 'rootfs_loc=disk' (linux name) rootfs_part_linux_dev=mmcblk0p4 -rootfsimage=rootfs-${hostname}.$rootfs_type +rootfsimage=rootfs-${global.hostname}.$rootfs_type # where is the kernel image in case of 'kernel_loc=disk' kernel_part=disk0.2 # The image type of the kernel. Can be uimage, zimage, raw or raw_lzo -#kernelimage=zImage-$hostname -kernelimage=uImage-$hostname -#kernelimage=Image-$hostname -#kernelimage=Image-$hostname.lzo +#kernelimage=zImage-${global.hostname} +kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo -bareboximage=barebox-${hostname}.bin -bareboxenvimage=barebox-${hostname}.bin +bareboximage=barebox-${global.hostname}.bin +bareboxenvimage=barebox-${global.hostname}.bin if [ -n $user ]; then bareboximage="$user"-"$bareboximage" bareboxenvimage="$user"-"$bareboxenvimage" kernelimage="$user"-"$kernelimage" rootfsimage="$user"-"$rootfsimage" - nfsroot="/home/$user/nfsroot/$hostname" + nfsroot="/home/$user/nfsroot/${global.hostname}" else nfsroot="/path/to/nfs/root" fi
arch/arm/boards/phycard-a-xl2/env/config +7 -7
@@ -1,6 +1,6 @@ #!/bin/sh -hostname=pcaaxl2 +global.hostname=pcaaxl2 user= # use 'dhcp' to do dhcp in barebox and in kernel
@@ -20,16 +20,16 @@ rootfs_loc=net # can be either 'jffs2' or 'ubifs' rootfs_type=ubifs -rootfsimage=root-${hostname}.$rootfs_type +rootfsimage=root-${global.hostname}.$rootfs_type -kernelimage=zImage-$hostname -#kernelimage=uImage-$hostname -#kernelimage=Image-$hostname -#kernelimage=Image-${hostname}.lzo +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo if [ -n $user ]; then kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/$hostname" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" rootfsimage="$user"-"$rootfsimage" else nfsroot="$eth0.serverip:/path/to/nfs/root"
arch/arm/boards/phycard-i.MX27/env/config +7 -7
@@ -1,6 +1,6 @@ #!/bin/sh -hostname=pca100 +global.hostname=pca100 eth0.serverip= user=
@@ -21,16 +21,16 @@ rootfs_loc=net # can be either 'jffs2' or 'ubifs' rootfs_type=ubifs -rootfsimage=root-$hostname.$rootfs_type +rootfsimage=root-${global.hostname}.$rootfs_type -kernelimage=zImage-$hostname -#kernelimage=uImage-$hostname -#kernelimage=Image-$hostname -#kernelimage=Image-$hostname.lzo +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo if [ -n $user ]; then kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/$hostname" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" rootfsimage="$user"-"$rootfsimage" else nfsroot="$eth0.serverip:/path/to/nfs/root"
arch/arm/boards/scb9328/env/config +7 -7
@@ -1,6 +1,6 @@ #!/bin/sh -hostname=scb9328 +global.hostname=scb9328 eth0.serverip= user=
@@ -21,16 +21,16 @@ rootfs_loc=net # can be either 'jffs2' or 'ubifs' rootfs_type=ubifs -rootfsimage=root-$hostname.$rootfs_type +rootfsimage=root-${global.hostname}.$rootfs_type -kernelimage=zImage-$hostname -#kernelimage=uImage-$hostname -#kernelimage=Image-$hostname -#kernelimage=Image-$hostname.lzo +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo if [ -n $user ]; then kernelimage="$user"-"$kernelimage" - nfsroot="$eth0.serverip:/home/$user/nfsroot/$hostname" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" rootfsimage="$user"-"$rootfsimage" else nfsroot="$eth0.serverip:/path/to/nfs/root"
defaultenv/config +8 -8
@@ -31,25 +31,25 @@ oftree_loc=tftp rootfs_type=ubifs # where is the rootfs in case of 'rootfs_loc=disk' (linux name) rootfs_part_linux_dev=mmcblk0p4 -rootfsimage=rootfs-${hostname}.$rootfs_type +rootfsimage=rootfs-${global.hostname}.$rootfs_type # where is the kernel image in case of 'kernel_loc=disk' kernel_part=disk0.2 -kernelimage=zImage-$hostname -#kernelimage=uImage-$hostname -#kernelimage=Image-$hostname -#kernelimage=Image-$hostname.lzo +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo -bareboximage=barebox-${hostname}.bin -bareboxenvimage=barebox-${hostname}.bin +bareboximage=barebox-${global.hostname}.bin +bareboxenvimage=barebox-${global.hostname}.bin if [ -n $user ]; then bareboximage="$user"-"$bareboximage" bareboxenvimage="$user"-"$bareboxenvimage" kernelimage="$user"-"$kernelimage" rootfsimage="$user"-"$rootfsimage" - nfsroot="/home/$user/nfsroot/$hostname" + nfsroot="/home/$user/nfsroot/${global.hostname}" else nfsroot="/path/to/nfs/root" fi
net/dhcp.c +2 -2
@@ -175,7 +175,7 @@ struct dhcp_opt dhcp_options[] = { }, { .option = 12, .handle = env_str_handle, - .barebox_var_name = "hostname", + .barebox_var_name = "global.hostname", }, { .option = 15, .handle = env_str_handle,
@@ -248,7 +248,7 @@ struct dhcp_param dhcp_params[] = { { .option = DHCP_HOSTNAME, .handle = dhcp_set_string_options, - .barebox_var_name = "hostname", + .barebox_var_name = "global.hostname", }, { .option = DHCP_VENDOR_ID, .handle = dhcp_set_string_options,
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
maintainerRe: [PATCH 6/7] dhcp: add retries limit support
In reply to Jean-Christophe PLAGNIOL-VILLARDQuoted 5 lines · Jean-Christophe PLAGNIOL-VILLARD
via -r opt, global.dhcp.retries or
dhcp_retriesset the priority order;
This will allow to do not stay infinite loop if no dhcp availlable
s/availlable/available/
net/dhcp.c static int do_dhcp(int argc, char *argv[]) · line 771
Quoted 6 lines
net/dhcp.c +2
-0@@ -746,11 +767,17 @@ static int do_dhcp(int argc, char *argv[])while (dhcp_state !=BOUND ) {if (ctrlc ())break ; +if (!retries) { + ret =ETIMEDOUT ;
-ETIMEDOUT
BTW currently we have in most commands:
return ret ? 1 : 0;
This is because the shell interpreted negative values as 'exit'. hush does not do this anymore, so now we can think about a path to just return negative error codes from the commands.
net/dhcp.c BAREBOX_CMD_HELP_OPT ("-u <client_uuid>", · line 816
Quoted 7 lines
net/dhcp.c +2
-1@@ -785,7 +812,8 @@ BAREBOX_CMD_HELP_OPT ("-u <client_uuid>",BAREBOX_CMD_HELP_OPT ("-U <user_class>" ,"DHCP User class (code 77) submitted in DHCP requests. It can\n" "be used in the DHCP server's configuration to select options\n" -"(e.g. bootfile or server) which are valid for barebox clients only.\n" ); +"(e.g. bootfile or server) which are valid for barebox clients only.\n") +BAREBOX_CMD_HELP_OPT ("-r <retry>" ,"retry limi\n" );
s/limi/limit/
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 6/7] dhcp: add retries limit support
Quoted 18 lines · Sascha Hauer
Quoted 5 lines · Jean-Christophe PLAGNIOL-VILLARD
via -r opt, global.dhcp.retries or
dhcp_retriesset the priority order;
This will allow to do not stay infinite loop if no dhcp availlable
s/availlable/available/
net/dhcp.c static int do_dhcp(int argc, char *argv[]) · line 771
Quoted 6 lines
net/dhcp.c +2
-0@@ -746,11 +767,17 @@ static int do_dhcp(int argc, char *argv[])while (dhcp_state !=BOUND ) {if (ctrlc ())break ; +if (!retries) { + ret =ETIMEDOUT ;
-ETIMEDOUT
Quoted 7 lines
BTW currently we have in most commands:
return ret ? 1 : 0;This is because the shell interpreted negative values as 'exit'. hush does not do this anymore, so now we can think about a path to just return negative error codes from the commands.
yeah so we can drop few bytes too
Best Regards,
J.
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 6/7] dhcp: add retries limit support
In reply to Sascha HauerQuoted 27 lines · Sascha Hauer
Quoted 5 lines · Jean-Christophe PLAGNIOL-VILLARD
via -r opt, global.dhcp.retries or
dhcp_retriesset the priority order;
This will allow to do not stay infinite loop if no dhcp availlable
s/availlable/available/
net/dhcp.c static int do_dhcp(int argc, char *argv[]) · line 771
Quoted 6 lines
net/dhcp.c +2
-0@@ -746,11 +767,17 @@ static int do_dhcp(int argc, char *argv[])while (dhcp_state !=BOUND ) {if (ctrlc ())break ; +if (!retries) { + ret =ETIMEDOUT ;
-ETIMEDOUTBTW currently we have in most commands:
return ret ? 1 : 0;This is because the shell interpreted negative values as 'exit'. hush does not do this anymore, so now we can think about a path to just return negative error codes from the commands.
Quoted 9 lines
net/dhcp.c BAREBOX_CMD_HELP_OPT ("-u <client_uuid>", · line 816
Quoted 7 lines
net/dhcp.c +2
-1@@ -785,7 +812,8 @@ BAREBOX_CMD_HELP_OPT ("-u <client_uuid>",BAREBOX_CMD_HELP_OPT ("-U <user_class>" ,"DHCP User class (code 77) submitted in DHCP requests. It can\n" "be used in the DHCP server's configuration to select options\n" -"(e.g. bootfile or server) which are valid for barebox clients only.\n" ); +"(e.g. bootfile or server) which are valid for barebox clients only.\n") +BAREBOX_CMD_HELP_OPT ("-r <retry>" ,"retry limi\n" );s/limi/limit/
what do you think to put something else than infinite loop by default
I thinnk 20 is enough
Best Regards,
J.
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
maintainerRe: [PATCH 6/7] dhcp: add retries limit support
Quoted 37 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 27 lines · Sascha Hauer
Quoted 5 lines · Jean-Christophe PLAGNIOL-VILLARD
via -r opt, global.dhcp.retries or
dhcp_retriesset the priority order;
This will allow to do not stay infinite loop if no dhcp availlable
s/availlable/available/
net/dhcp.c static int do_dhcp(int argc, char *argv[]) · line 771
Quoted 6 lines
net/dhcp.c +2
-0@@ -746,11 +767,17 @@ static int do_dhcp(int argc, char *argv[])while (dhcp_state !=BOUND ) {if (ctrlc ())break ; +if (!retries) { + ret =ETIMEDOUT ;
-ETIMEDOUTBTW currently we have in most commands:
return ret ? 1 : 0;This is because the shell interpreted negative values as 'exit'. hush does not do this anymore, so now we can think about a path to just return negative error codes from the commands.
Quoted 9 lines
net/dhcp.c BAREBOX_CMD_HELP_OPT ("-u <client_uuid>", · line 816
Quoted 7 lines
net/dhcp.c +2
-1@@ -785,7 +812,8 @@ BAREBOX_CMD_HELP_OPT ("-u <client_uuid>",BAREBOX_CMD_HELP_OPT ("-U <user_class>" ,"DHCP User class (code 77) submitted in DHCP requests. It can\n" "be used in the DHCP server's configuration to select options\n" -"(e.g. bootfile or server) which are valid for barebox clients only.\n" ); +"(e.g. bootfile or server) which are valid for barebox clients only.\n") +BAREBOX_CMD_HELP_OPT ("-r <retry>" ,"retry limi\n" );s/limi/limit/
Quoted 3 lines
what do you think to put something else than infinite loop by default
I thinnk 20 is enough
Yes, ok, maybe even less. How long does one retry take?
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 6/7] dhcp: add retries limit support
Quoted 38 lines · Sascha Hauer
Quoted 37 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 36 lines · Sascha Hauer
Quoted 5 lines · Jean-Christophe PLAGNIOL-VILLARD
via -r opt, global.dhcp.retries or
dhcp_retriesset the priority order;
This will allow to do not stay infinite loop if no dhcp availlable
s/availlable/available/
net/dhcp.c static int do_dhcp(int argc, char *argv[]) · line 771
Quoted 6 lines
net/dhcp.c +2
-0@@ -746,11 +767,17 @@ static int do_dhcp(int argc, char *argv[])while (dhcp_state !=BOUND ) {if (ctrlc ())break ; +if (!retries) { + ret =ETIMEDOUT ;
-ETIMEDOUTBTW currently we have in most commands:
return ret ? 1 : 0;This is because the shell interpreted negative values as 'exit'. hush does not do this anymore, so now we can think about a path to just return negative error codes from the commands.
net/dhcp.c BAREBOX_CMD_HELP_OPT ("-u <client_uuid>", · line 816
Quoted 7 lines
net/dhcp.c +2
-1@@ -785,7 +812,8 @@ BAREBOX_CMD_HELP_OPT ("-u <client_uuid>",BAREBOX_CMD_HELP_OPT ("-U <user_class>" ,"DHCP User class (code 77) submitted in DHCP requests. It can\n" "be used in the DHCP server's configuration to select options\n" -"(e.g. bootfile or server) which are valid for barebox clients only.\n" ); +"(e.g. bootfile or server) which are valid for barebox clients only.\n") +BAREBOX_CMD_HELP_OPT ("-r <retry>" ,"retry limi\n" );s/limi/limit/
Quoted 5 lines
Quoted 3 lines
what do you think to put something else than infinite loop by default
I thinnk 20 is enough
Yes, ok, maybe even less. How long does one retry take?
3s each
so 20 it's 60s
Best Regards,
J.
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox