All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthias Brugger <mbrugger@suse.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Booting from network
Date: Tue, 16 Apr 2019 12:10:16 +0200	[thread overview]
Message-ID: <03c7b5c3-57bb-0ddb-7883-b423a9d8c700@suse.com> (raw)
In-Reply-To: <4b000239-99ce-a91b-427e-7b0ee3076699@gmail.com>



On 07/04/2019 10:51, Simon Goldschmidt wrote:
> Am 07.04.2019 um 01:22 schrieb Chris Packham:
>> On Sun, 7 Apr 2019, 9:03 AM U.Mutlu, <for-gmane@mutluit.com> wrote:
>>
>>> I'm booting over the network (GbE) from a tftp server.
>>> It works, but is IMHO very slow.
>>> Is there a faster method for booting over the net?
>>>
>>
>> TFTP is about as good as your going to get in u-boot right now.
> 
> There were some patches for wget on the list (implementing TCP, HTTP and wget
> command), but I don't think they were in a state to be accepted, so yes, TFTP is
> pretty much the only option here.
> 

Many years ago I used NFS to boot kernel + dtb. Not sure if that will be faster,
but it is an alternative :)

Regards,
Matthias

>>
>> Because TFTP sends a block at a time waiting for an ack between blocks it's
>> not going to be as fast as something that runs over TCP and benefits from
>> buffering.
> 
> Depending on what stability you need: I saw some TFTP servers (the one included
> in www.dhcpserver.de, for example) in the past that sent out some packets in
> advance (before waiting for the client's ACK). That improves speed pretty well,
> but the downside is that retransmission handling is pretty much broken. For my
> purposes (no transmission problems on the local net), this is still a good
> enough solution to get higher transmission speed. I wouldn't want to use this in
> a production setup though...
> 
> Regards,
> Simon
> 
>>
>> One tunable you might get some use out of is $tftpblocksize, this will
>> increase the number of bytes per block. Try setting this to around 1400
>> keeping the overall Ethernet frame under 1518.
>>
>> boot.cmd:
>>> dhcp 0x49000000
>>> tftpboot 0x46000000 192.168.1.201:uImage
>>> tftpboot 0x49000000 192.168.1.201:u-boot.dtb
>>> setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootwait panic=10
>>> rootfstype=ext4 rw ${extra}
>>> bootm 0x46000000 - 0x49000000
>>>
>>> Btw, in the above script, can I safely replace the addresses
>>> with ${kloadaddr} and ${fdtaddr} ?
>>> I wonder where these variables get set or obtained from.
>>> (I saw these variables somewhere on the net, but there was no
>>> initialisation,
>>> so I assumed it must be something internal/intrinsic, right?)
>>>
>>
>> To my knowledge the only intrinsics are $loadaddr, $fileaddr and $filesize.
>> The latter two are set after a successful load. However plenty of boards
>> have $fdtaddr etc in their default environment so you might have acces to
>> those depending on your board.
>>
>> And: though my board can output via HDMI, I've no monitor attached,
>>> and a serial cable (TTY to USB) I don't have at the moment.
>>> Is there another method to get the u-boot output (or log) to be sent to a
>>> remote host/log?
>>>
>>
>> I've never used in personally but CONFIG_NET_CONSOLE exists, I believe its
>> only good for output.
>>
>> I'd still recommend getting a serial cable if your going to be playing with
>> u-boot becasue at some point you'll do something that stops your board from
>> booting.
>> _______________________________________________
>> U-Boot mailing list
>> U-Boot at lists.denx.de
>> https://lists.denx.de/listinfo/u-boot
>>
> 
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot

  reply	other threads:[~2019-04-16 10:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-06 21:02 [U-Boot] Booting from network U.Mutlu
2019-04-06 23:22 ` Chris Packham
2019-04-07  8:51   ` Simon Goldschmidt
2019-04-16 10:10     ` Matthias Brugger [this message]
2019-04-07 16:59   ` U.Mutlu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=03c7b5c3-57bb-0ddb-7883-b423a9d8c700@suse.com \
    --to=mbrugger@suse.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.