<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/common/cmd_pxe.c, branch v2014.10</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>pxe: Ensure we don't overflow bootargs</title>
<updated>2014-10-10T13:44:21+00:00</updated>
<author>
<name>Ian Campbell</name>
<email>ian.campbell@citrix.com</email>
</author>
<published>2014-10-03T13:29:01+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=64a0c24726530696bf0c2cdaa75d171d957a7ee0'/>
<id>64a0c24726530696bf0c2cdaa75d171d957a7ee0</id>
<content type='text'>
On a couple of platforms I've tripped over long PXE append lines overflowing
this array, due to having CONFIG_SYS_CBSIZE == 256. When doing preseeded Debian
installs it's pretty trivial to exceed that.

Since the symptom can be a silent hang or a crash add a check. Of course the
affected boards would also need an increased CBSIZE to actually work.

Note that due to the printing of the final bootargs string CONFIG_SYS_PBSIZE
also needs to be sufficiently large.

Signed-off-by: Ian Campbell &lt;ian.campbell@citrix.com&gt;
[trini: Use %zd not %d in printf for all args]
Signed-off-by: Tom Rini &lt;trini@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On a couple of platforms I've tripped over long PXE append lines overflowing
this array, due to having CONFIG_SYS_CBSIZE == 256. When doing preseeded Debian
installs it's pretty trivial to exceed that.

Since the symptom can be a silent hang or a crash add a check. Of course the
affected boards would also need an increased CBSIZE to actually work.

Note that due to the printing of the final bootargs string CONFIG_SYS_PBSIZE
also needs to be sufficiently large.

Signed-off-by: Ian Campbell &lt;ian.campbell@citrix.com&gt;
[trini: Use %zd not %d in printf for all args]
Signed-off-by: Tom Rini &lt;trini@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pxe: Allow use of environment variables in append string</title>
<updated>2014-08-21T16:01:13+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2014-08-06T07:37:39+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b1ba62d4ae970a2da00371670a2c909f139d0f80'/>
<id>b1ba62d4ae970a2da00371670a2c909f139d0f80</id>
<content type='text'>
Use cli_simple_process_macros, so that environment
variables (e.g. ${console}) can be used in append strings.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use cli_simple_process_macros, so that environment
variables (e.g. ${console}) can be used in append strings.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pxe: detect image format before calling bootm/bootz</title>
<updated>2014-08-09T15:19:01+00:00</updated>
<author>
<name>Bryan Wu</name>
<email>cooloney@gmail.com</email>
</author>
<published>2014-08-01T00:39:59+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1fb7d0e61996971757876228ceed74c3a401ffea'/>
<id>1fb7d0e61996971757876228ceed74c3a401ffea</id>
<content type='text'>
Trying bootm for zImage will print out several error message which
is not necessary for this case. So detect image format firstly, only
try bootm for legacy and FIT format image then try bootz for others.

This patch needs new function genimg_get_kernel_addr().

Signed-off-by: Bryan Wu &lt;pengw@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Trying bootm for zImage will print out several error message which
is not necessary for this case. So detect image format firstly, only
try bootm for legacy and FIT format image then try bootz for others.

This patch needs new function genimg_get_kernel_addr().

Signed-off-by: Bryan Wu &lt;pengw@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pxe: clear Bootfile before returning</title>
<updated>2014-08-09T15:17:02+00:00</updated>
<author>
<name>Stephen Warren</name>
<email>swarren@nvidia.com</email>
</author>
<published>2014-07-23T00:06:46+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ded2e20ef281e5ff7921fbb3b74113ea33e8e309'/>
<id>ded2e20ef281e5ff7921fbb3b74113ea33e8e309</id>
<content type='text'>
When "pxe boot" downloads the initrd/kernel/DTB, netboot_common() saves
the downloaded filename to global variable BootFile. If the boot
operation is aborted, this global state is not cleared. If "dhcp" is
executed later without any arguments, BootFile is not cleared, and when
the DHCP response is received, BootpCopyNetParams() writes the value into
environment variable bootfile.

This causes the following scenario:

* Boot script executes dhcp; pxe get; pxe boot

* User CTRL-C's the PXE menu, which causes the first menu item to be
  booted, which causes some file to be downloaded.

  (This boot-on-CTRL-C behaviour is arguably a bug too, but it's a
  separate bug and the bug this patch fixes would still exist if the user
  simply waited to press CTRL-C until "pxe boot" started downloading
  files)

* User CTRL-C's the file downloads, but the filename is still written to
  the bootfile environment variable.

* User re-runs the boot command, which in my case executes "dhcp; pxe get;
  pxe boot" again, and "dhcp" picks up the saved bootfile environment
  variable and proceeds to download a file that it shouldn't.

To solve this, modify the implementation of "pxe get" to clear BootFile
if the whole boot operation fails, which avoids this whole mess.

An alternative would be to modify netboot_common() such that the no-
arguments case explicitly clears the global variable BootFile. However,
that would prevent the following command sequences from working:

$ dhcp filename # downloads "filename"
$ dhcp          # downloads $bootfile, i.e. "filename"

or:
$ setenv bootfile filename
$ dhcp          # downloads $bootfile, i.e. "filename"

... and I assume someone relies on U-Boot working that way.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When "pxe boot" downloads the initrd/kernel/DTB, netboot_common() saves
the downloaded filename to global variable BootFile. If the boot
operation is aborted, this global state is not cleared. If "dhcp" is
executed later without any arguments, BootFile is not cleared, and when
the DHCP response is received, BootpCopyNetParams() writes the value into
environment variable bootfile.

This causes the following scenario:

* Boot script executes dhcp; pxe get; pxe boot

* User CTRL-C's the PXE menu, which causes the first menu item to be
  booted, which causes some file to be downloaded.

  (This boot-on-CTRL-C behaviour is arguably a bug too, but it's a
  separate bug and the bug this patch fixes would still exist if the user
  simply waited to press CTRL-C until "pxe boot" started downloading
  files)

* User CTRL-C's the file downloads, but the filename is still written to
  the bootfile environment variable.

* User re-runs the boot command, which in my case executes "dhcp; pxe get;
  pxe boot" again, and "dhcp" picks up the saved bootfile environment
  variable and proceeds to download a file that it shouldn't.

To solve this, modify the implementation of "pxe get" to clear BootFile
if the whole boot operation fails, which avoids this whole mess.

An alternative would be to modify netboot_common() such that the no-
arguments case explicitly clears the global variable BootFile. However,
that would prevent the following command sequences from working:

$ dhcp filename # downloads "filename"
$ dhcp          # downloads $bootfile, i.e. "filename"

or:
$ setenv bootfile filename
$ dhcp          # downloads $bootfile, i.e. "filename"

... and I assume someone relies on U-Boot working that way.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Acked-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>common: commands: make commands static</title>
<updated>2014-07-18T21:53:23+00:00</updated>
<author>
<name>Jeroen Hofstee</name>
<email>jeroen@myspectrum.nl</email>
</author>
<published>2014-06-22T22:22:08+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0e350f81e1ca7d103fd9685725f9c4b0d9e80632'/>
<id>0e350f81e1ca7d103fd9685725f9c4b0d9e80632</id>
<content type='text'>
Since most commands are not public, make them static. This
prevents warnings that no common prototype is available.

Signed-off-by: Jeroen Hofstee &lt;jeroen@myspectrum.nl&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since most commands are not public, make them static. This
prevents warnings that no common prototype is available.

Signed-off-by: Jeroen Hofstee &lt;jeroen@myspectrum.nl&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'master' of git://git.denx.de/u-boot-arm</title>
<updated>2014-02-26T21:49:58+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@ti.com</email>
</author>
<published>2014-02-26T21:49:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=eeb72e67619b98d2502fe634a3a5d9953de92ad0'/>
<id>eeb72e67619b98d2502fe634a3a5d9953de92ad0</id>
<content type='text'>
Conflicts:
	arch/arm/cpu/armv7/config.mk
	board/ti/am43xx/mux.c
	include/configs/am43xx_evm.h

Signed-off-by: Tom Rini &lt;trini@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conflicts:
	arch/arm/cpu/armv7/config.mk
	board/ti/am43xx/mux.c
	include/configs/am43xx_evm.h

Signed-off-by: Tom Rini &lt;trini@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pxe: prepend fdtdir to DTB name irrespective of source</title>
<updated>2014-02-21T16:06:13+00:00</updated>
<author>
<name>Stephen Warren</name>
<email>swarren@nvidia.com</email>
</author>
<published>2014-02-12T21:30:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e22361af0758c7ebbff6fe375f805bc3697ce30f'/>
<id>e22361af0758c7ebbff6fe375f805bc3697ce30f</id>
<content type='text'>
The directory name from an fdtdir directive in a PXE config file should
always be pre-pended to the DTB filename; it shouldn't matter whether
the DTB filename came from the $fdtfile environment variable, or whether
it was constructed dynamically from ${soc}-${board}.dtb. Fix the code to
always prepend the directory name.

Reported-by: Dennis Gilmore &lt;dennis@ausil.us&gt;
Fixes: c61d94d86035 ("pxe: implement fdtdir extlinux.conf tag")
Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Reviewed-by: Dennis Gilmore &lt;dennis@ausil.us&gt;
Tested-by: Dennis Gilmore &lt;dennis@ausil.us&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The directory name from an fdtdir directive in a PXE config file should
always be pre-pended to the DTB filename; it shouldn't matter whether
the DTB filename came from the $fdtfile environment variable, or whether
it was constructed dynamically from ${soc}-${board}.dtb. Fix the code to
always prepend the directory name.

Reported-by: Dennis Gilmore &lt;dennis@ausil.us&gt;
Fixes: c61d94d86035 ("pxe: implement fdtdir extlinux.conf tag")
Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Reviewed-by: Dennis Gilmore &lt;dennis@ausil.us&gt;
Tested-by: Dennis Gilmore &lt;dennis@ausil.us&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pxe: allow compilation when !defined(CONFIG_CMD_NET)</title>
<updated>2014-02-21T14:30:05+00:00</updated>
<author>
<name>Stephen Warren</name>
<email>swarren@wwwdotorg.org</email>
</author>
<published>2014-02-06T03:49:20+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b81fdb04868e21693f5dfe9242ff6f49fcfe5a93'/>
<id>b81fdb04868e21693f5dfe9242ff6f49fcfe5a93</id>
<content type='text'>
pxe.c provides both the "pxe" command which relies on a network, and the
"sysboot" command which doesn't. Fix the file to compile when network
support isn't enabled. This is useful e.g. on the Raspberry Pi which has
no network support yet, but will soon support the sysboot command.

Signed-off-by: Stephen Warren &lt;swarren@wwwdotorg.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
pxe.c provides both the "pxe" command which relies on a network, and the
"sysboot" command which doesn't. Fix the file to compile when network
support isn't enabled. This is useful e.g. on the Raspberry Pi which has
no network support yet, but will soon support the sysboot command.

Signed-off-by: Stephen Warren &lt;swarren@wwwdotorg.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cmd_pxe.c add any option for filesystem with sysboot uses generic load</title>
<updated>2014-02-04T22:29:36+00:00</updated>
<author>
<name>Dennis Gilmore</name>
<email>dennis@ausil.us</email>
</author>
<published>2014-02-04T11:25:46+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6d1a3e5fa1fcaad98a6c7f29a6b1ffa091472178'/>
<id>6d1a3e5fa1fcaad98a6c7f29a6b1ffa091472178</id>
<content type='text'>
Signed-off-by: Dennis Gilmore &lt;dennis@ausil.us&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Dennis Gilmore &lt;dennis@ausil.us&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pxe: implement fdtdir extlinux.conf tag</title>
<updated>2014-02-04T16:51:18+00:00</updated>
<author>
<name>Stephen Warren</name>
<email>swarren@nvidia.com</email>
</author>
<published>2014-01-28T21:50:10+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c61d94d86035ab2165aedf208b8f3c768b277a3d'/>
<id>c61d94d86035ab2165aedf208b8f3c768b277a3d</id>
<content type='text'>
People who write (or scripts that auto-generate) extlinux.conf don't
want to know about HW-specific information such as FDT filenames. Create
a new extlinux.conf tag "fdtdir" that specifies only the directory where
FDT files are located, and defer all knowledge of the filename to U-Boot.
The algorithm implemented is:

==========
if $fdt_addr_r is set:
  if "fdt" tag was specified in extlinux.conf:
    load the FDT from the filename in the tag
  else if "fdtdir" tag was specified in extlinux.conf:
    if "fdtfile" is set in the environment:
      load the FDT from filename in "$fdtfile"
    else:
      load the FDT from some automatically generated filename

if no FDT file was loaded, and $fdtaddr is set:
  # This indicates an FDT packaged with firmware
  use the FDT at $fdtaddr
==========

A small part of an example /boot/extlinux.conf might be:

==========
LABEL primary
        LINUX zImage
        FDTDIR ./

LABEL failsafe
        LINUX bkp/zImage
        FDTDIR bkp/
==========

... with /boot/tegra20-seaboard.dtb or /boot/bkp/tegra20-seaboard.dtb
being loaded by the sysboot/pxe code.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
People who write (or scripts that auto-generate) extlinux.conf don't
want to know about HW-specific information such as FDT filenames. Create
a new extlinux.conf tag "fdtdir" that specifies only the directory where
FDT files are located, and defer all knowledge of the filename to U-Boot.
The algorithm implemented is:

==========
if $fdt_addr_r is set:
  if "fdt" tag was specified in extlinux.conf:
    load the FDT from the filename in the tag
  else if "fdtdir" tag was specified in extlinux.conf:
    if "fdtfile" is set in the environment:
      load the FDT from filename in "$fdtfile"
    else:
      load the FDT from some automatically generated filename

if no FDT file was loaded, and $fdtaddr is set:
  # This indicates an FDT packaged with firmware
  use the FDT at $fdtaddr
==========

A small part of an example /boot/extlinux.conf might be:

==========
LABEL primary
        LINUX zImage
        FDTDIR ./

LABEL failsafe
        LINUX bkp/zImage
        FDTDIR bkp/
==========

... with /boot/tegra20-seaboard.dtb or /boot/bkp/tegra20-seaboard.dtb
being loaded by the sysboot/pxe code.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
