Changes between Version 3 and Version 4 of uboot


Ignore:
Timestamp:
04/18/2024 12:42:03 AM (7 months ago)
Author:
Tim Harvey
Comment:

added documentation and examples for dhcp/dns/tftpboot/nfs/wget

Legend:

Unmodified
Added
Removed
Modified
  • uboot

    v3 v4  
    428428 * {{{filesize}}} - gets set to the size of data transferred
    429429 * {{{netretry}}} - when set to 'no' each network operation will either success or fail without retrying. When set to 'once' the operation will fail only when all available network interfaces have been tried once without success.
     430
     431
     432[=#dhcp]
     433=== DHCP
     434The {{{dhcp}}} command (if enabled) can use the DHCP protocol to configure networking.
     435
     436Examples:
     437 * use DHCP to configure networking:
     438{{{#!bash
     439u-boot=> dhcp
     440BOOTP broadcast 1
     441BOOTP broadcast 2
     442BOOTP broadcast 3
     443DHCP client bound to address 172.24.20.160 (1047 ms)
     444}}}
     445
     446A successful bind will set the following:
     447 * ipaddr
     448 * netmask
     449 * gatewayip
     450 * serverip
     451
     452The following variables affect dhcp:
     453 * autoload - if set will attempt to transfer a file from the server
     454
     455
     456[=#dns]
     457=== DNS
     458The {{{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
     460Examples:
     461 * use DNS to lookup dev.gateworks.com
     462{{{#!bash
     463u-boot=> dhcp
     464BOOTP broadcast 1
     465DHCP client bound to address 172.24.20.160 (1046 ms)
     466u-boot=> setenv dnsip 8.8.8.8
     467u-boot=> dns dev.gateworks.com
     468108.161.129.64
     469}}}
     470
     471
     472[=#tftp]
     473=== TFTP
     474The {{{tftpboot}}} command has been the primary method for transferring files from a server for many years.
     475
     476The following U-Boot environment variables (as well as the general network variables above) are used with tftp:
    430477 * {{{tftpsrcport}}} - UDP source port (if not set uses default)
    431478 * {{{tftpdstport}}} - UDP dest port (if not set uses well known port 69)
    432479 * {{{tftpblocksize}}} - if not set will use TFTP server's default block size
    433480 * {{{tftptimeout}}} - retransmission timeout for TFTP packets in ms (min value is 1000, default is 5000)
    434  * {{{dhcp}}} - Use DHCP to configure networking env
     481
     482
     483Examples:
     484 * fetch a file via TFTP to a memory address specified by loadaddr:
     485{{{#!bash
     486u-boot=> tftpboot $loadaddr 192.168.1.146:file
     487}}}
     488
     489The {{{filesize}}} variable will be set to the number of bytes transferred
     490
     491
     492[=#nfs]
     493=== NFS
     494The NFS command (if enabled) can transfer a file from an NFS server to a memory address.
     495
     496Examples:
     497 * fetch a file via NFS to a memory address specified by loadaddr:
     498{{{#!bash
     499u-boot=> nfs $loadaddr 172.24.21.238:/venice/firmware-venice-imx8mp.bin
     500}}}
     501
     502The {{{filesize}}} variable will be set to the number of bytes transferred
     503
     504[=#wget]
     505=== WGET
     506The 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
     508Examples:
     509 * fetch a file via HTTP to a memory address specified by loadaddr:
     510{{{#!bash
     511u-boot=> wget $loadaddr 172.24.21.238:/venice/firmware-venice-imx8mp.bin
     512HTTP/1.0 200 OK| | | | | | | | | | | | | | | | | | | | | |
     513Packets received 2900, Transfer Successful
     514Bytes transferred = 4194336 (400020 hex)
     515}}}
     516
     517The {{{filesize}}} variable will be set to the number of bytes transferred
     518
     519Note that only HTTP is supported.
    435520
    436521