as we do not need to probe them and they have no driver or bus attached
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
edev->init is called at eth_register time unconditionally and is supposed
to initialize the ethernet hardware. Since it's called unconditionally
this could be done by the driver without having an additional hook.
Some drivers need their initialization done earlier since they also register
a mdiobus which does hardware accesses on registration time.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
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 available
for boot sequence as example
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
This will allow to only update a var if recive a valid data.
This is need for hostname.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
This 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.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
The old tftp suppoer has been replaced with filesystem based tftp
support, so remove the old code.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Adapt phylib from linux
switch all the driver to it
reimplement mii bus
This will allow to have
- phy drivers
- to only connect the phy at then opening of the device
- if the phy is not ready or not up fail on open
Same behaviour as in linux and will allow to share code and simplify porting.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
The FSF address has changed in the past. Instead of updating it
each time the address changes, just drop it completely treewide.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Currently, the timeout when waiting for packages is smaller than the
timeout communicated to the TFTP server for retransmitting. Make sure we
wait at least for two retransmissions before giving up.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reduce confusion by making clear six bytes are passed,
not a string.
Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
resolv() uses getenv_ip() which in turn calls resolv(). Fix
this inifinite loop by not using getenv_ip directly.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The following patch serie improve the complete support
by adding a complete framework to aalow commands complete support.
The add also car complete support for eval and setting and executable
file support
This also include an update of the stringlist API to support asprintf
API
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iQIcBAABAgAGBQJPnohsAAoJEOrjwV5ZMRf2qeIQAIC7WrIao0mB2pIB+51MqeU+
sof7GLxUl0MWXFFc3OFEHDcY5grC867mBmB9+uDG1mvcxa/bUpw+jMRMrki5j4Kg
mjaHQ2UCvDjMHqQi7ISc/WTyJb09mtduFIceP0EftAmG8Mb5n9XOMaKwL9r/UQHB
ps9MijnI/QeFqbrmBZcuaCp59QsPvipYw8NMJITBu2VvWrpKTIox33qPfNATDuEV
SzMoLwz+uD7W7dEAM/A1uFdo4K5fLyZruDVGQoQ8CRS+zW3E6rr/EakpN5mhr/66
dVZYO1xWppBaefIJQ1RD6bvwlFvesuuvQmMtDxsCsp07fyBolEWfFzblrwdkbueY
NPwWExV5nzbRdAKKSyhU/nHiQ2edOQQZtHDAbnM4zh5e6lK7YLrzVklzT4Dfhzn0
GRdnjCmiQiaZdmAEHe8wte2nr3Lc01fTsj/EFVA+LYP3a9by1iG2Zn3/ChieVcN4
R+o/2lMBdhxsTszcmwMOemdqVPlt/0VmEXrKGtjTIZEViuQyyhY8ZtEaf4C0zeln
Jf60t0ZvkehAJc0Lo4UOygjzvErqcKoHMk7utAjP+bi1KcMgF3Q+HmtCnJJs2FHw
c40FZj1WcLPStEiS1way7miBakxOy2zPumKi1OXx+140L25C1nvQPYu8ilOZHEyU
opNlo+wQ8h5sG/054kYL
=rYfw
-----END PGP SIGNATURE-----
Merge tag 'complete_update_support' of git://git.jcrosoft.org/barebox into next
improve complete support
The following patch serie improve the complete support
by adding a complete framework to allow commands complete support.
The add also car complete support for eval and setting and executable
file support
This also include an update of the stringlist API to support asprintf
API
The dhcp command starts with an unitialized start time. The start
time is often long in the past which results in an immediate timeout
and resend of the dhcp packet. Fix this by initializing the start time
correctly.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Was missing in net_init and net_new.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
'nameserver' and 'domainname' should be globally available variables
specific to networking. Register a 'net' device to store these variables.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
DHCP option 224 to 254 are for private use, so use one.
Export it via env dhcp_oftree_file.
E.g. the ISC dhcp server can be configured with
| option oftree-path code 224 = string
| class "at91sam9x5ek" {
| match if substring (option vendor-class-identifier,0,20) = "barebox-at91sam9x5ek";
|
| filename "/tftpboot/atmel/at91sam9x5/sam9x5ek/zImage";
| option tftp-server-name "192.168.200.98";
| option root-path "192.168.200.98:/opt/work/buildroot/build/sam9x5/target";
| option oftree-path "/tftpboot/atmel/at91sam9x5/sam9x5ek/sam9g25ek/dtb";
| }
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Introduce getenv_ip_dns to be able to do not do the resolv when using it in
resolv for the nameserver (Do not loop).
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
For net boot setups it is useful to submit boot params like server or
bootfile over dhcp. To distinguish diffrent type of OS running on the same hardware,
a custom vendor id can be sent in dhcp discover/request messages.
E.g. the ISC dhcp server can be configured with
| option client-uuid code 97 = { unsigned integer 8, string };
| class "at91sam9x5ek" {
| match if substring (option vendor-class-identifier,0,20) = "barebox-at91sam9x5ek";
|
| filename "/tftpboot/atmel/at91sam9x5/sam9x5ek/zImage";
| if substring (option dhcp-client-identifier,0,7) = "ser2net" {
| filename "/tftpboot/atmel/at91sam9x5/sam9x5ek/zImage-ser2net";
| }
| if substring (option client-uuid,0,7) = "test" {
| filename "/tftpboot/atmel/at91sam9x5/sam9x5ek/zImage-ser2net";
| }
| if substring (option user-class,0,4) = "toto" {
| filename "/tftpboot/atmel/at91sam9x5/sam9x5ek/zImage-toto";
| }
| option tftp-server-name "192.168.200.98";
| option option-150 192.168.200.98;
| next-server 192.168.200.98;
| option root-path "192.168.200.98:/opt/work/buildroot/build/sam9x5/target";
| }
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
For net boot setups it is useful to submit boot params like server or
bootfile over dhcp. To distinguish diffrent type of OS running on the same hardware,
a custom client uuid can be sent in dhcp discover/request messages.
E.g. the ISC dhcp server can be configured with
| option client-uuid code 97 = { unsigned integer 8, string };
| class "at91sam9x5ek" {
| match if substring (option vendor-class-identifier,0,20) = "barebox-at91sam9x5ek";
|
| filename "/tftpboot/atmel/at91sam9x5/sam9x5ek/zImage";
| if substring (option dhcp-client-identifier,0,7) = "ser2net" {
| filename "/tftpboot/atmel/at91sam9x5/sam9x5ek/zImage-ser2net";
| }
| if substring (option client-uuid,0,7) = "test" {
| filename "/tftpboot/atmel/at91sam9x5/sam9x5ek/zImage-ser2net";
| }
| option tftp-server-name "192.168.200.98";
| option option-150 192.168.200.98;
| next-server 192.168.200.98;
| option root-path "192.168.200.98:/opt/work/buildroot/build/sam9x5/target";
| }
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
For net boot setups it is useful to submit boot params like server or
bootfile over dhcp. To distinguish diffrent type of OS running on the same hardware,
a custom client id can be sent in dhcp discover/request messages.
E.g. the ISC dhcp server can be configured with
| class "at91sam9x5ek" {
| match if substring (option vendor-class-identifier,0,20) = "barebox-at91sam9x5ek";
|
| filename "/tftpboot/atmel/at91sam9x5/sam9x5ek/zImage";
| if substring (option dhcp-client-identifier,0,7) = "ser2net" {
| filename "/tftpboot/atmel/at91sam9x5/sam9x5ek/zImage-ser2net";
| }
| option tftp-server-name "192.168.200.98";
| option option-150 192.168.200.98;
| next-server 192.168.200.98;
| option root-path "192.168.200.98:/opt/work/buildroot/build/sam9x5/target";
| }
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>