Re: [U-Boot] [PATCH V2] add README.distro file

2015-01-23 Thread Rob Herring
On Mon, Jan 12, 2015 at 11:57 AM, Ian Campbell i...@hellion.org.uk wrote:
 On Mon, 2015-01-12 at 10:34 -0700, Stephen Warren wrote:
 On 01/11/2015 11:15 AM, Tom Rini wrote:
  On Sun, Jan 11, 2015 at 10:54:03AM -0700, Stephen Warren wrote:
  On 01/11/2015 02:45 AM, Ian Campbell wrote:
  On Sun, 2014-12-28 at 09:26 +, Ian Campbell wrote:
  +boot_scripts:
  +
  +  The name of U-Boot style boot.scr files that $bootcmd searches for.
  +
  +  Example: boot.scr.uimg boot.scr
  +
  +  (Typically we expect extlinux.conf to be used, but execution of 
  boot.scr is
  +  maintained for backwards-compatibility.)
 
  I'm slightly concerned by the implied deprecation of the boot.scr method
  here, since at least Debian uses boot.scr exclusively and not the
  extlinux stuff. Will boot.scr be maintained going forward or are there
  plans to eventually remove it?
 
  Can someone confirm that there is no long term plan to drop boot.scr
  support?
 
  extlinux.conf *is* the standard Linux boot process that
  config_distro_bootcmd.h enables. boot.scr is *not*. The whole point is
  to introduce a new simple standard that works the same everywhere (for
  Linux: across boards, across distros, across bootloaders).
 
  Well, the only problem I see with this statement is that, uh, do we have
  buy-in from Debian?

 Well, there was some discussion about standard boot setups on the
 cross-distro mailing list. I believe someone from Debian is at least
 familiar with Dennis's proposal to use extlinux.conf as the standard.
 There was certainly no definitive agreement in those discussions though

 I hadn't appreciated that that this proposal was so heavily geared
 towards the extlinux.conf aspect, as opposed to standardising a bunch of
 useful env variables, which is what I thought it was mainly doing.

 That said, I don't think there's much choice but to standardize on
 /something/ other than boot.scr. boot.scr really isn't scalable for
 generic distros (as opposed to board-specific BSPs):

 * boot.scr works differently on different boards, since the set of
 environment variables and U-Boot commands/features available to the
 script are different. This leads to extremely complex boot.scr
 implementations that distros each have to maintain.

 A side effect (which I actually thought was part of the purpose until
 now) of config_distro_bootcmd.h was to standardize these variables.
 Debian now ships a common boot.scr which should work on any
 config_distro_bootcmd-enabled system.

 I suppose we could fix this by standardizing the boot.scr execution
 environment; providing a consistent set of variables indicating where to
 load kernel/DTB/..., the board name (to auto-generate DTB filename),
 etc. However, standardizing this is more complex that standardizing on
 extlinux.conf

 AFAICT you've already done it ;-)

  and still doesn't solve:

 * boot.scr doesn't work across different bootloaders. There's no reason
 generic distros should know anything much about bootloaders, other than
 how to generate a config file so the bootloader knows which
 kernel/initrd/DTB binaries to load.

 The distro needs to know enough about the bootloader to know it speaks
 extlinux.conf, which means in practice it needs to know if it is u-boot
 or not.

 From Debian's PoV the usual default bootloader is grub, which is pretty
 much a no-go on top of u-boot in practice.

 So whether it's extlinux.conf or boot.scr we have to treat things
 specially at the distro level and have some firmware awareness, and
 boot.scr is there and working today.

 * boot.scr must be generated (to boot.scr.uimg) using
 bootloader-specific tools, rather than extlinux.conf, grub.conf, ... all
 just need the generation of a text file.

 Debian already has the tooling (and has for years) to reproduce boot.scr
 automatically on upgrades of various relevant components, the user never
 needs to see the mkimage stuff (that tooling also handles various legacy
 non-config_distro_bootcmd systems, so it's going to have to remain for
 the time being either way).

 Currently the extlinux.conf generating stuff is tied to the x86 syslinux
 packages, it could be reworked and pulled out into arch indep packages,
 but there doesn't seem to be all that much benefit compared with what we
 have now which is working fairly well for us (not to imply that it's
 perfect).

I had a patch for syslinux doing just this sometime back. My mistake
was giving it to Canonical to do something with. I could dig this up.
It is pretty straightforward moving of files into the syslinux-common
package. There were also some settings controlling generating the menu
files needed on the target rootfs to get it to work with u-boot's
limited syslinux. It wasn't something we could work-around or add
support for in u-boot IIRC.

Rob
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V2] add README.distro file

2015-01-12 Thread Sjoerd Simons
On Mon, 2015-01-12 at 17:57 +, Ian Campbell wrote:
 On Mon, 2015-01-12 at 10:34 -0700, Stephen Warren wrote:

  * boot.scr must be generated (to boot.scr.uimg) using 
  bootloader-specific tools, rather than extlinux.conf, grub.conf, ... all 
  just need the generation of a text file.
 
 Debian already has the tooling (and has for years) to reproduce boot.scr
 automatically on upgrades of various relevant components, the user never
 needs to see the mkimage stuff (that tooling also handles various legacy
 non-config_distro_bootcmd systems, so it's going to have to remain for
 the time being either way).
 
 Currently the extlinux.conf generating stuff is tied to the x86 syslinux
 packages, it could be reworked and pulled out into arch indep packages,
 but there doesn't seem to be all that much benefit compared with what we
 have now which is working fairly well for us (not to imply that it's
 perfect).

One big downside of the boot.scr as generated by flash-kernel in Debian
is that it doesn't have a menu, which extlinux can provide currently.
Thus with extlinux we could provide a more similar experience to what
folks get on x86 with e.g. Grub, iotw select provide menu options to
boot previous kernels or single user mode etc.

I do hope to get to experimenting a bit with this for the boards, i care
about soon. My patchset that was in discussion there was actually some
pre-work for those things ;). It would be nice if, in the end,
flash-kernel wouldn't be needed for boards with modern u-boot and
follwing the distro_boot_cmds, but I'm not actually involved with
Debians u-boot package so not my call :)


-- 
Sjoerd Simons sjoerd.sim...@collabora.co.uk
Collabora Ltd.


smime.p7s
Description: S/MIME cryptographic signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V2] add README.distro file

2015-01-12 Thread Dennis Gilmore
On Mon, 12 Jan 2015 20:57:29 +0100
Sjoerd Simons sjoerd.sim...@collabora.co.uk wrote:

 On Mon, 2015-01-12 at 17:57 +, Ian Campbell wrote:
  On Mon, 2015-01-12 at 10:34 -0700, Stephen Warren wrote:
 
   * boot.scr must be generated (to boot.scr.uimg) using 
   bootloader-specific tools, rather than extlinux.conf,
   grub.conf, ... all just need the generation of a text file.
  
  Debian already has the tooling (and has for years) to reproduce
  boot.scr automatically on upgrades of various relevant components,
  the user never needs to see the mkimage stuff (that tooling also
  handles various legacy non-config_distro_bootcmd systems, so it's
  going to have to remain for the time being either way).
  
  Currently the extlinux.conf generating stuff is tied to the x86
  syslinux packages, it could be reworked and pulled out into arch
  indep packages, but there doesn't seem to be all that much benefit
  compared with what we have now which is working fairly well for us
  (not to imply that it's perfect).
 
 One big downside of the boot.scr as generated by flash-kernel in
 Debian is that it doesn't have a menu, which extlinux can provide
 currently. Thus with extlinux we could provide a more similar
 experience to what folks get on x86 with e.g. Grub, iotw select
 provide menu options to boot previous kernels or single user mode etc.
 
 I do hope to get to experimenting a bit with this for the boards, i
 care about soon. My patchset that was in discussion there was
 actually some pre-work for those things ;). It would be nice if, in
 the end, flash-kernel wouldn't be needed for boards with modern
 u-boot and follwing the distro_boot_cmds, but I'm not actually
 involved with Debians u-boot package so not my call :)

I am carrying some patches in Fedora that were written by someone from
debian porting a board to use the generic options, though it was
incomplete and was missing variables for pxe booting to work. while we
get a menu and you can choose older kernels currently there is no way
to edit things dynamically. this is a feature I want to add. make it
easy to append boot arguments etc. there seems to at least be interest
in the debian camp. to what extent that interest goes I am not sure.

I will cover how things are in Fedora.  It is still not perfect but
is getting better every release. grubby updates extlinux.conf on kernel
install/update/removal etc the exact same code is used on x86 and arm.
we have a extlinux-bootloader package on arm that provides the
framework needed that comes with syslinux-extlinux. anaconda writes out
extlinux.conf on install. I have some scripting work to do to update it
and add the fdtdir entry to extlinux.conf on install. the anaconda code
to deal with extlinux.conf is shared between x86 and arm.
appliance-creator which is the tool we use to make disk images writes
out correct extlinux.conf files for both x86 and arm

from a end user perspective the experience is similar but not quite
exactly the same. longer term id like to use u-boots menu code to offer
up a menu to select the kernel and add editing features. But it is much
easier now to support new boards than it ever has been in the past.

Dennis
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V2] add README.distro file

2015-01-12 Thread Ian Campbell
On Mon, 2015-01-12 at 10:34 -0700, Stephen Warren wrote:
 On 01/11/2015 11:15 AM, Tom Rini wrote:
  On Sun, Jan 11, 2015 at 10:54:03AM -0700, Stephen Warren wrote:
  On 01/11/2015 02:45 AM, Ian Campbell wrote:
  On Sun, 2014-12-28 at 09:26 +, Ian Campbell wrote:
  +boot_scripts:
  +
  +  The name of U-Boot style boot.scr files that $bootcmd searches for.
  +
  +  Example: boot.scr.uimg boot.scr
  +
  +  (Typically we expect extlinux.conf to be used, but execution of 
  boot.scr is
  +  maintained for backwards-compatibility.)
 
  I'm slightly concerned by the implied deprecation of the boot.scr method
  here, since at least Debian uses boot.scr exclusively and not the
  extlinux stuff. Will boot.scr be maintained going forward or are there
  plans to eventually remove it?
 
  Can someone confirm that there is no long term plan to drop boot.scr
  support?
 
  extlinux.conf *is* the standard Linux boot process that
  config_distro_bootcmd.h enables. boot.scr is *not*. The whole point is
  to introduce a new simple standard that works the same everywhere (for
  Linux: across boards, across distros, across bootloaders).
 
  Well, the only problem I see with this statement is that, uh, do we have
  buy-in from Debian?
 
 Well, there was some discussion about standard boot setups on the 
 cross-distro mailing list. I believe someone from Debian is at least 
 familiar with Dennis's proposal to use extlinux.conf as the standard. 
 There was certainly no definitive agreement in those discussions though

I hadn't appreciated that that this proposal was so heavily geared
towards the extlinux.conf aspect, as opposed to standardising a bunch of
useful env variables, which is what I thought it was mainly doing.

 That said, I don't think there's much choice but to standardize on 
 /something/ other than boot.scr. boot.scr really isn't scalable for 
 generic distros (as opposed to board-specific BSPs):
 
 * boot.scr works differently on different boards, since the set of 
 environment variables and U-Boot commands/features available to the 
 script are different. This leads to extremely complex boot.scr 
 implementations that distros each have to maintain.

A side effect (which I actually thought was part of the purpose until
now) of config_distro_bootcmd.h was to standardize these variables.
Debian now ships a common boot.scr which should work on any
config_distro_bootcmd-enabled system.

 I suppose we could fix this by standardizing the boot.scr execution 
 environment; providing a consistent set of variables indicating where to 
 load kernel/DTB/..., the board name (to auto-generate DTB filename), 
 etc. However, standardizing this is more complex that standardizing on 
 extlinux.conf

AFAICT you've already done it ;-)

  and still doesn't solve:
 
 * boot.scr doesn't work across different bootloaders. There's no reason 
 generic distros should know anything much about bootloaders, other than 
 how to generate a config file so the bootloader knows which 
 kernel/initrd/DTB binaries to load.

The distro needs to know enough about the bootloader to know it speaks
extlinux.conf, which means in practice it needs to know if it is u-boot
or not.

From Debian's PoV the usual default bootloader is grub, which is pretty
much a no-go on top of u-boot in practice.

So whether it's extlinux.conf or boot.scr we have to treat things
specially at the distro level and have some firmware awareness, and
boot.scr is there and working today.

 * boot.scr must be generated (to boot.scr.uimg) using 
 bootloader-specific tools, rather than extlinux.conf, grub.conf, ... all 
 just need the generation of a text file.

Debian already has the tooling (and has for years) to reproduce boot.scr
automatically on upgrades of various relevant components, the user never
needs to see the mkimage stuff (that tooling also handles various legacy
non-config_distro_bootcmd systems, so it's going to have to remain for
the time being either way).

Currently the extlinux.conf generating stuff is tied to the x86 syslinux
packages, it could be reworked and pulled out into arch indep packages,
but there doesn't seem to be all that much benefit compared with what we
have now which is working fairly well for us (not to imply that it's
perfect).

Ian.

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V2] add README.distro file

2015-01-12 Thread Stephen Warren

On 01/11/2015 11:15 AM, Tom Rini wrote:

On Sun, Jan 11, 2015 at 10:54:03AM -0700, Stephen Warren wrote:

On 01/11/2015 02:45 AM, Ian Campbell wrote:

On Sun, 2014-12-28 at 09:26 +, Ian Campbell wrote:

+boot_scripts:
+
+  The name of U-Boot style boot.scr files that $bootcmd searches for.
+
+  Example: boot.scr.uimg boot.scr
+
+  (Typically we expect extlinux.conf to be used, but execution of boot.scr is
+  maintained for backwards-compatibility.)


I'm slightly concerned by the implied deprecation of the boot.scr method
here, since at least Debian uses boot.scr exclusively and not the
extlinux stuff. Will boot.scr be maintained going forward or are there
plans to eventually remove it?


Can someone confirm that there is no long term plan to drop boot.scr
support?


extlinux.conf *is* the standard Linux boot process that
config_distro_bootcmd.h enables. boot.scr is *not*. The whole point is
to introduce a new simple standard that works the same everywhere (for
Linux: across boards, across distros, across bootloaders).


Well, the only problem I see with this statement is that, uh, do we have
buy-in from Debian?


Well, there was some discussion about standard boot setups on the 
cross-distro mailing list. I believe someone from Debian is at least 
familiar with Dennis's proposal to use extlinux.conf as the standard. 
There was certainly no definitive agreement in those discussions though.


That said, I don't think there's much choice but to standardize on 
/something/ other than boot.scr. boot.scr really isn't scalable for 
generic distros (as opposed to board-specific BSPs):


* boot.scr works differently on different boards, since the set of 
environment variables and U-Boot commands/features available to the 
script are different. This leads to extremely complex boot.scr 
implementations that distros each have to maintain.


I suppose we could fix this by standardizing the boot.scr execution 
environment; providing a consistent set of variables indicating where to 
load kernel/DTB/..., the board name (to auto-generate DTB filename), 
etc. However, standardizing this is more complex that standardizing on 
extlinux.conf and still doesn't solve:


* boot.scr doesn't work across different bootloaders. There's no reason 
generic distros should know anything much about bootloaders, other than 
how to generate a config file so the bootloader knows which 
kernel/initrd/DTB binaries to load.


* boot.scr must be generated (to boot.scr.uimg) using 
bootloader-specific tools, rather than extlinux.conf, grub.conf, ... all 
just need the generation of a text file.

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V2] add README.distro file

2015-01-12 Thread Stephen Warren

On 01/10/2015 11:44 AM, Dennis Gilmore wrote:

On Mon, 05 Jan 2015 12:55:46 -0700
Stephen Warren swar...@wwwdotorg.org wrote:


On 12/28/2014 03:09 AM, Ian Campbell wrote:

On Mon, 2014-12-22 at 13:46 -0700, Stephen Warren wrote:

[...]
+
+The U-Boot syslinux and pxe boot commands require a number of
environment +variables be set. Default values for these variables
are often hard-coded into +CONFIG_EXTRA_ENV_SETTINGS in the
board's U-Boot configuration file, so that +the user doesn't have
to configure them. +
+fdt_addr:
+
+  Optional. If specified a dtb to boot the system must be
available at the
+  given address.
+
+fdt_addr_r:
+
+  Mandatory.


Isn't this one only mandatory if ${fdt_addr} is not given?


Yes. I guess it's mandatory for at least one of fdt_addr or
fdt_addr_r to be set, according to common/cmd_pxe.c:



fdt_addr_r is actually mandatory unless you do not support device
tree at all, which is not expected at all anymore. The reason being
that the user/distro can override the vendor supplied dtb for whatever
reason, by supplying a fdt/dtb fdtdir/dtbdir entry in extlinux.conf  in
the past at times on calxeda hardware we had to override the dtb to work
with newer kernels until we could update the systems firmware.


That's a good point. I'll revise the README again and repost a V4.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V2] add README.distro file

2015-01-12 Thread Stephen Warren

On 01/12/2015 10:57 AM, Ian Campbell wrote:

On Mon, 2015-01-12 at 10:34 -0700, Stephen Warren wrote:

On 01/11/2015 11:15 AM, Tom Rini wrote:

On Sun, Jan 11, 2015 at 10:54:03AM -0700, Stephen Warren wrote:

On 01/11/2015 02:45 AM, Ian Campbell wrote:

On Sun, 2014-12-28 at 09:26 +, Ian Campbell wrote:

+boot_scripts:
+
+  The name of U-Boot style boot.scr files that $bootcmd searches for.
+
+  Example: boot.scr.uimg boot.scr
+
+  (Typically we expect extlinux.conf to be used, but execution of boot.scr is
+  maintained for backwards-compatibility.)


I'm slightly concerned by the implied deprecation of the boot.scr method
here, since at least Debian uses boot.scr exclusively and not the
extlinux stuff. Will boot.scr be maintained going forward or are there
plans to eventually remove it?


Can someone confirm that there is no long term plan to drop boot.scr
support?


extlinux.conf *is* the standard Linux boot process that
config_distro_bootcmd.h enables. boot.scr is *not*. The whole point is
to introduce a new simple standard that works the same everywhere (for
Linux: across boards, across distros, across bootloaders).


Well, the only problem I see with this statement is that, uh, do we have
buy-in from Debian?


Well, there was some discussion about standard boot setups on the
cross-distro mailing list. I believe someone from Debian is at least
familiar with Dennis's proposal to use extlinux.conf as the standard.
There was certainly no definitive agreement in those discussions though


I hadn't appreciated that that this proposal was so heavily geared
towards the extlinux.conf aspect, as opposed to standardising a bunch of
useful env variables, which is what I thought it was mainly doing.


That said, I don't think there's much choice but to standardize on
/something/ other than boot.scr. boot.scr really isn't scalable for
generic distros (as opposed to board-specific BSPs):

* boot.scr works differently on different boards, since the set of
environment variables and U-Boot commands/features available to the
script are different. This leads to extremely complex boot.scr
implementations that distros each have to maintain.


A side effect (which I actually thought was part of the purpose until
now) of config_distro_bootcmd.h was to standardize these variables.
Debian now ships a common boot.scr which should work on any
config_distro_bootcmd-enabled system.


Oh, I didn't realize that at all.

I know that in the discussions on the cross-distro@ mailing list, there 
were arguments against standardizing on extlinux.conf. I hadn't read any 
of the replies as meaning Debian was picking up the boot.scr 
standardization work I had been doing though. Rather, since no agreement 
seemed to have been reach, I had assumed that Debian (and other distros) 
were sticking with the per-board-custom-boot.scr stuff they'd always had 
before.



I suppose we could fix this by standardizing the boot.scr execution
environment; providing a consistent set of variables indicating where to
load kernel/DTB/..., the board name (to auto-generate DTB filename),
etc. However, standardizing this is more complex that standardizing on
extlinux.conf


AFAICT you've already done it ;-)


Oh, so there's enough there to be considered complete?

I certainly was originally working towards standardizing boot.scr, so 
it's good to hear that was pretty successful.


However, since realizing that extlinux.conf was a cross-bootloader 
standard, I changed my mind and decided that was a better approach, so 
I've been looking to see that move forward.


I suppose for config_disto_bootcmd.h to be useful for non-Linux OSs too 
(which aren't supported by extlinux.conf AFAIK unless their boot 
protocol is compatible with Linux), we likely want to keep the boot.scr 
logic in config_distro_bootcmd.h fully enabled in all cases. As such, 
perhaps it does make sense to remove any reference to the boot.scr 
support config_distro_bootcmd.h as being legacy.



  and still doesn't solve:

* boot.scr doesn't work across different bootloaders. There's no reason
generic distros should know anything much about bootloaders, other than
how to generate a config file so the bootloader knows which
kernel/initrd/DTB binaries to load.


The distro needs to know enough about the bootloader to know it speaks
extlinux.conf, which means in practice it needs to know if it is u-boot
or not.


Well, at least Barebox also supports extlinux.conf IIUC. The idea is 
that if the distro assumes extlinux.conf, it shouldn't have to know 
which bootloader is installed. More x86 implies Grub, ARM implies 
extlinux.conf.



From Debian's PoV the usual default bootloader is grub, which is pretty
much a no-go on top of u-boot in practice.

So whether it's extlinux.conf or boot.scr we have to treat things
specially at the distro level and have some firmware awareness, and
boot.scr is there and working today.


* boot.scr must be generated (to boot.scr.uimg) using
bootloader-specific tools, 

Re: [U-Boot] [PATCH V2] add README.distro file

2015-01-11 Thread Ian Campbell
On Sun, 2014-12-28 at 09:26 +, Ian Campbell wrote:
  +boot_scripts:
  +
  +  The name of U-Boot style boot.scr files that $bootcmd searches for.
  +
  +  Example: boot.scr.uimg boot.scr
  +
  +  (Typically we expect extlinux.conf to be used, but execution of boot.scr 
  is
  +  maintained for backwards-compatibility.)
 
 I'm slightly concerned by the implied deprecation of the boot.scr method
 here, since at least Debian uses boot.scr exclusively and not the
 extlinux stuff. Will boot.scr be maintained going forward or are there
 plans to eventually remove it?

Can someone confirm that there is no long term plan to drop boot.scr
support?


  I hope it will remain, in which case I'd
 be happier if this parenthetical were remove or replaced with something
 like (not used in extlinux.conf mode).


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V2] add README.distro file

2015-01-11 Thread Tom Rini
On Sun, Jan 11, 2015 at 10:54:03AM -0700, Stephen Warren wrote:
 On 01/11/2015 02:45 AM, Ian Campbell wrote:
  On Sun, 2014-12-28 at 09:26 +, Ian Campbell wrote:
  +boot_scripts:
  +
  +  The name of U-Boot style boot.scr files that $bootcmd searches for.
  +
  +  Example: boot.scr.uimg boot.scr
  +
  +  (Typically we expect extlinux.conf to be used, but execution of 
  boot.scr is
  +  maintained for backwards-compatibility.)
 
  I'm slightly concerned by the implied deprecation of the boot.scr method
  here, since at least Debian uses boot.scr exclusively and not the
  extlinux stuff. Will boot.scr be maintained going forward or are there
  plans to eventually remove it?
  
  Can someone confirm that there is no long term plan to drop boot.scr
  support?
 
 extlinux.conf *is* the standard Linux boot process that
 config_distro_bootcmd.h enables. boot.scr is *not*. The whole point is
 to introduce a new simple standard that works the same everywhere (for
 Linux: across boards, across distros, across bootloaders).

Well, the only problem I see with this statement is that, uh, do we have
buy-in from Debian?

 I would expect boot.scr support to be maintained indefinitely for any
 board the currently supports it. I certainly know of no plan to remove
 any existing support for it, and am not going to make such a plan.

boot.scr is just a boot script with the appropriate legacy image
header on it.  That won't go away until U-Boot no longer supports legacy
images, and there is currently no plan to actually drop that support.

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V2] add README.distro file

2015-01-11 Thread Stephen Warren
On 01/11/2015 02:45 AM, Ian Campbell wrote:
 On Sun, 2014-12-28 at 09:26 +, Ian Campbell wrote:
 +boot_scripts:
 +
 +  The name of U-Boot style boot.scr files that $bootcmd searches for.
 +
 +  Example: boot.scr.uimg boot.scr
 +
 +  (Typically we expect extlinux.conf to be used, but execution of boot.scr 
 is
 +  maintained for backwards-compatibility.)

 I'm slightly concerned by the implied deprecation of the boot.scr method
 here, since at least Debian uses boot.scr exclusively and not the
 extlinux stuff. Will boot.scr be maintained going forward or are there
 plans to eventually remove it?
 
 Can someone confirm that there is no long term plan to drop boot.scr
 support?

extlinux.conf *is* the standard Linux boot process that
config_distro_bootcmd.h enables. boot.scr is *not*. The whole point is
to introduce a new simple standard that works the same everywhere (for
Linux: across boards, across distros, across bootloaders).

I would expect boot.scr support to be maintained indefinitely for any
board the currently supports it. I certainly know of no plan to remove
any existing support for it, and am not going to make such a plan.

When adding support for config_distro_bootcmd.h to any board that
doesn't support boot.scr already, I would not expect boards to want to
start supporting boot.scr; it's a legacy method as far as
config_distro_bootcmd.h is concerned.

(config_distro_bootcmd.h should be updated to make the boot.scr support
optional, so it doesn't get enabled unless specifically requested, when
boards add #include config_distro_bootcmd.h).

Supporting boot.scr may well be useful for a variety of non-Linux or
legacy environments, so I'm not proposing anyone rip out support for it.
Simply not add support for it if it hasn't been necessary already.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V2] add README.distro file

2015-01-10 Thread Dennis Gilmore
On Mon, 05 Jan 2015 12:55:46 -0700
Stephen Warren swar...@wwwdotorg.org wrote:

 On 12/28/2014 03:09 AM, Ian Campbell wrote:
  On Mon, 2014-12-22 at 13:46 -0700, Stephen Warren wrote:
  [...]
  +
  +The U-Boot syslinux and pxe boot commands require a number of
  environment +variables be set. Default values for these variables
  are often hard-coded into +CONFIG_EXTRA_ENV_SETTINGS in the
  board's U-Boot configuration file, so that +the user doesn't have
  to configure them. +
  +fdt_addr:
  +
  +  Optional. If specified a dtb to boot the system must be
  available at the
  +  given address.
  +
  +fdt_addr_r:
  +
  +  Mandatory.
 
  Isn't this one only mandatory if ${fdt_addr} is not given?
 
 Yes. I guess it's mandatory for at least one of fdt_addr or
 fdt_addr_r to be set, according to common/cmd_pxe.c:
fdt_addr_r is actually mandatory unless you do not support device
tree at all, which is not expected at all anymore. The reason being
that the user/distro can override the vendor supplied dtb for whatever
reason, by supplying a fdt/dtb fdtdir/dtbdir entry in extlinux.conf  in
the past at times on calxeda hardware we had to override the dtb to work
with newer kernels until we could update the systems firmware.

   * fdt usage is optional:
   * It handles the following scenarios. All scenarios are
  exclusive *
   * Scenario 1: If fdt_addr_r specified and fdt label is
  defined in
   * pxe file, retrieve fdt blob from server. Pass fdt_addr_r
  to bootm,
   * and adjust argc appropriately.
   *
   * Scenario 2: If there is an fdt_addr specified, pass it
  along to
   * bootm, and adjust argc appropriately.
   *
   * Scenario 3: fdt blob is not available.
 
 So, I'll need to reword that a little to make that clear.

going forward Scenario 3 is not a supportable option. board files are
being removed from the kernel and dtb files are needed to boot
machines. at least for Fedora we do not support any systems that do not
support devicetree. so while the code in cmd_pxe.c is written for it to
be optional it is not. having fdt_addr_r does not force the use of a
dtb as it requires the config to specify it, so you could boot a legacy
kernel just fine by omitting the definition in the config file.

Dennis
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V2] add README.distro file

2015-01-05 Thread Stephen Warren

On 12/28/2014 03:09 AM, Ian Campbell wrote:

On Mon, 2014-12-22 at 13:46 -0700, Stephen Warren wrote:

[...]
+
+The U-Boot syslinux and pxe boot commands require a number of environment
+variables be set. Default values for these variables are often hard-coded into
+CONFIG_EXTRA_ENV_SETTINGS in the board's U-Boot configuration file, so that
+the user doesn't have to configure them.
+
+fdt_addr:
+
+  Optional. If specified a dtb to boot the system must be available at the
+  given address.
+
+fdt_addr_r:
+
+  Mandatory.


Isn't this one only mandatory if ${fdt_addr} is not given?


Yes. I guess it's mandatory for at least one of fdt_addr or fdt_addr_r 
to be set, according to common/cmd_pxe.c:



 * fdt usage is optional:
 * It handles the following scenarios. All scenarios are exclusive
 *
 * Scenario 1: If fdt_addr_r specified and fdt label is defined in
 * pxe file, retrieve fdt blob from server. Pass fdt_addr_r to bootm,
 * and adjust argc appropriately.
 *
 * Scenario 2: If there is an fdt_addr specified, pass it along to
 * bootm, and adjust argc appropriately.
 *
 * Scenario 3: fdt blob is not available.


So, I'll need to reword that a little to make that clear.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V2] add README.distro file

2015-01-05 Thread Stephen Warren

On 12/28/2014 02:26 AM, Ian Campbell wrote:

On Mon, 2014-12-22 at 13:46 -0700, Stephen Warren wrote:

From: Dennis Gilmore den...@ausil.us

Add documentation on how to setup a system to use the generic distro
configs and boot commands. This spells out what is needed to make a
system conformant, but does not limit the board to only the defaults.

Signed-off-by: Dennis Gilmore den...@ausil.us
[swarren, added concept, user config, BOOT_TARGET_DEVICES sections.
edited the rest]
Signed-off-by: Stephen Warren swar...@nvidia.com


Looks good thanks. A few comments below.


+Finally, a few options that are mostly relevant only when using U-Boot-
+specific boot.scr boot configuration files are enabled This enables
+compatibility with various board configurations that existed before these
+distro default existed, and assumed boot.scr-based booting.


Missing a . in are enabled This enables, I think.


+boot_scripts:
+
+  The name of U-Boot style boot.scr files that $bootcmd searches for.
+
+  Example: boot.scr.uimg boot.scr
+
+  (Typically we expect extlinux.conf to be used, but execution of boot.scr is
+  maintained for backwards-compatibility.)


I'm slightly concerned by the implied deprecation of the boot.scr method
here, since at least Debian uses boot.scr exclusively and not the
extlinux stuff. Will boot.scr be maintained going forward or are there
plans to eventually remove it? I hope it will remain, in which case I'd
be happier if this parenthetical were remove or replaced with something
like (not used in extlinux.conf mode).


The intent here isn't really to deprecate anything but rather to 
introduce something new.


The new thing introduced here is a common way for distros to boot 
systems using extlinux.conf. The One True Way(TM) according to this 
feature is extlinux.conf:-)


However, since many boards already support boot.scr, and some (Tegra, 
RPi at least) automatically search for it in the same way this new 
feature searches for extlinux.conf, the scripts in 
config_distro_bootcmd.h fold in direct (compatibility) support for 
boot.scr too, so that boards don't have to implement that themselves and 
duplicate all the logic.


So, I don't expect anyone to remove boot.scr support. That said, I would 
hope for Debian to transition to using extlinux.conf so that when new 
boards enable it, Debian won't have to do work to update its boot.scr to 
cope with those boards.



+scan_dev_for_extlinux:
+
+  If you want to disable extlinux.conf on any disk, delete this.
+
+scan_dev_for_scripts:
+
+  If you want to disable boot.scr on any disk, delete this.


Does deleting them not result in a message about an undefined command
during boot? Would it be better to replace with some sort of null
command (e.g. : in shell, not sure what the u-boto equivalent is).


Yes, unsetting the variables does cause an error. I see I misremembered 
what I was doing here when I actually did NULL those out; the text 
should recommend setenv scan_dev_for_extlinux true, not completely 
clearing the variables.

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V2] add README.distro file

2014-12-28 Thread Ian Campbell
On Mon, 2014-12-22 at 13:46 -0700, Stephen Warren wrote:
 From: Dennis Gilmore den...@ausil.us
 
 Add documentation on how to setup a system to use the generic distro
 configs and boot commands. This spells out what is needed to make a
 system conformant, but does not limit the board to only the defaults.
 
 Signed-off-by: Dennis Gilmore den...@ausil.us
 [swarren, added concept, user config, BOOT_TARGET_DEVICES sections.
 edited the rest]
 Signed-off-by: Stephen Warren swar...@nvidia.com

Looks good thanks. A few comments below.

 +Finally, a few options that are mostly relevant only when using U-Boot-
 +specific boot.scr boot configuration files are enabled This enables
 +compatibility with various board configurations that existed before these
 +distro default existed, and assumed boot.scr-based booting.

Missing a . in are enabled This enables, I think.

 +boot_scripts:
 +
 +  The name of U-Boot style boot.scr files that $bootcmd searches for.
 +
 +  Example: boot.scr.uimg boot.scr
 +
 +  (Typically we expect extlinux.conf to be used, but execution of boot.scr is
 +  maintained for backwards-compatibility.)

I'm slightly concerned by the implied deprecation of the boot.scr method
here, since at least Debian uses boot.scr exclusively and not the
extlinux stuff. Will boot.scr be maintained going forward or are there
plans to eventually remove it? I hope it will remain, in which case I'd
be happier if this parenthetical were remove or replaced with something
like (not used in extlinux.conf mode).

 +scan_dev_for_extlinux:
 +
 +  If you want to disable extlinux.conf on any disk, delete this.
 +
 +scan_dev_for_scripts:
 +
 +  If you want to disable boot.scr on any disk, delete this.

Does deleting them not result in a message about an undefined command
during boot? Would it be better to replace with some sort of null
command (e.g. : in shell, not sure what the u-boto equivalent is).

Ian.

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V2] add README.distro file

2014-12-28 Thread Ian Campbell
On Mon, 2014-12-22 at 13:46 -0700, Stephen Warren wrote:
 [...]
 +
 +The U-Boot syslinux and pxe boot commands require a number of environment
 +variables be set. Default values for these variables are often hard-coded 
 into
 +CONFIG_EXTRA_ENV_SETTINGS in the board's U-Boot configuration file, so that
 +the user doesn't have to configure them.
 +
 +fdt_addr:
 +
 +  Optional. If specified a dtb to boot the system must be available at the
 +  given address.
 +
 +fdt_addr_r:
 +
 +  Mandatory.

Isn't this one only mandatory if ${fdt_addr} is not given?

Ian.

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot