| 430 | |
| 431 | |
| 432 | [=#dhcp] |
| 433 | === DHCP |
| 434 | The {{{dhcp}}} command (if enabled) can use the DHCP protocol to configure networking. |
| 435 | |
| 436 | Examples: |
| 437 | * use DHCP to configure networking: |
| 438 | {{{#!bash |
| 439 | u-boot=> dhcp |
| 440 | BOOTP broadcast 1 |
| 441 | BOOTP broadcast 2 |
| 442 | BOOTP broadcast 3 |
| 443 | DHCP client bound to address 172.24.20.160 (1047 ms) |
| 444 | }}} |
| 445 | |
| 446 | A successful bind will set the following: |
| 447 | * ipaddr |
| 448 | * netmask |
| 449 | * gatewayip |
| 450 | * serverip |
| 451 | |
| 452 | The following variables affect dhcp: |
| 453 | * autoload - if set will attempt to transfer a file from the server |
| 454 | |
| 455 | |
| 456 | [=#dns] |
| 457 | === DNS |
| 458 | The {{{dns}}} command (if enabled) can use the DNS protocol to perform a name to IP lookup. You must setn the 'dnsip' env variable to an accessible DNS server. |
| 459 | |
| 460 | Examples: |
| 461 | * use DNS to lookup dev.gateworks.com |
| 462 | {{{#!bash |
| 463 | u-boot=> dhcp |
| 464 | BOOTP broadcast 1 |
| 465 | DHCP client bound to address 172.24.20.160 (1046 ms) |
| 466 | u-boot=> setenv dnsip 8.8.8.8 |
| 467 | u-boot=> dns dev.gateworks.com |
| 468 | 108.161.129.64 |
| 469 | }}} |
| 470 | |
| 471 | |
| 472 | [=#tftp] |
| 473 | === TFTP |
| 474 | The {{{tftpboot}}} command has been the primary method for transferring files from a server for many years. |
| 475 | |
| 476 | The following U-Boot environment variables (as well as the general network variables above) are used with tftp: |
434 | | * {{{dhcp}}} - Use DHCP to configure networking env |
| 481 | |
| 482 | |
| 483 | Examples: |
| 484 | * fetch a file via TFTP to a memory address specified by loadaddr: |
| 485 | {{{#!bash |
| 486 | u-boot=> tftpboot $loadaddr 192.168.1.146:file |
| 487 | }}} |
| 488 | |
| 489 | The {{{filesize}}} variable will be set to the number of bytes transferred |
| 490 | |
| 491 | |
| 492 | [=#nfs] |
| 493 | === NFS |
| 494 | The NFS command (if enabled) can transfer a file from an NFS server to a memory address. |
| 495 | |
| 496 | Examples: |
| 497 | * fetch a file via NFS to a memory address specified by loadaddr: |
| 498 | {{{#!bash |
| 499 | u-boot=> nfs $loadaddr 172.24.21.238:/venice/firmware-venice-imx8mp.bin |
| 500 | }}} |
| 501 | |
| 502 | The {{{filesize}}} variable will be set to the number of bytes transferred |
| 503 | |
| 504 | [=#wget] |
| 505 | === WGET |
| 506 | The TCP protocol and {{{wget}}} command (if enabled) were added to U-Boot v2023.01 to support fetching files via HTTP however until very recently it was plagued with a couple of issues. These issues have been resolved and support has been enabled for venice U-Boot |
| 507 | |
| 508 | Examples: |
| 509 | * fetch a file via HTTP to a memory address specified by loadaddr: |
| 510 | {{{#!bash |
| 511 | u-boot=> wget $loadaddr 172.24.21.238:/venice/firmware-venice-imx8mp.bin |
| 512 | HTTP/1.0 200 OK| | | | | | | | | | | | | | | | | | | | | | |
| 513 | Packets received 2900, Transfer Successful |
| 514 | Bytes transferred = 4194336 (400020 hex) |
| 515 | }}} |
| 516 | |
| 517 | The {{{filesize}}} variable will be set to the number of bytes transferred |
| 518 | |
| 519 | Note that only HTTP is supported. |