Alexander Graf wrote:
On 07/26/2012 01:13 AM, David Marlin wrote:
I'm not sure if this has been discussed before, but in working with
various ARM systems (Panda, Trim Slice, Highbank, etc.) I have
noticed that there is little consistency in the load addresses for
kernel, initrd, and device tree, or the commands and devices used.
While it may not be practical to always use the same physical
addresses, it seems it might be possible to set some 'standard'
U-Boot environment variables or macros to provide a more consistent
user experience when working on various boards from different vendors.
Some vendors already provide U-Boot environment variables for the
load addresses, and some for the load commands themselves, but I have
not found much consistency between them. One example is the Genesi
Efika MX (mx51), which provides:
${loadcmd}
${kerneladdr}
${ramdiskaddr}
By providing the kernel and initrd U-Boot images in a boot.scr, you
can load and boot the desired kernel with no other board specific
knowledge (specific addresses or devices).
Highbank provides some similar load address definitions, but with
different names, i.e.,
${ramdisk_addr_r}
${kernel_addr_r}
${fdt_addr_r}
Other boards provide similar features, including some (e.g.,
Trim-Slice) that 'scan' through a list of devices until a boot.scr is
found, load it, and then boot using that script, but the load
addresses are literals.
Does anyone else think it would be useful to include a 'standard' set
of such definitions in U-Boot (default) that could be used to
abstract the board/vendor specific details and provide a more
consistent user experience? If so, could this list be used to help
define such a set, and encourage its use across ARM systems and distros?
I would certainly love to see such a thing happen.
Today, we have a bunch of hacks in place. In our default boot.script,
we do the following:
printenv kerneladdr || setenv kerneladdr ${kernel_addr_r}
printenv ramdiskaddr|| setenv ramdiskaddr ${ramdisk_addr_r}
This at least gives us consistency with the genesi and "typical"
upstream u-boot variable names. However, now all boards even define a
load address. For those, we have special patches in u-boot to add them:
https://build.opensuse.org/package/view_file?file=loadaddr-defaults.patch&package=u-boot&project=openSUSE%3AFactory%3AARM&rev=d5dbc2b680e402c0d995a10d9c548a1e
It would certainly make everyone's life easier if the default script
of every target could simply provide addresses that are expected to
work usually.
Agreed, and thanks for your comments and the link to your patches.
d.marlin
========
Alex
_______________________________________________
cross-distro mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/cross-distro