On 03.07.14 16:06, Andreas Färber wrote:
Am 03.07.2014 13:48, schrieb Alexander Graf:
A few months ago I had the idea to automatically calculate fdt- and ramdisk load addresses based on their actual sizes. On IRC agraf then suggested to just guess offsets that will always hold true, and that is what I now implemented:
The user now only has to specify kerneladdr. dtb and ramdisk will be put somewhere after that address. I assume that a kernel will be smaller than 63MB, and a device tree binary smaller than 1MB.
The calculated addresses are then the following: fdtaddr=kerneladdr+63MB ramdiskaddr=fdtaddr+1MB
I have created a submit request SR239214 implementing this automatic calculation and using it for the cubox-i. I have also attached the relevant diff so you can look at it easily.
If you approve of this automatic calculation I'd encourage you to make use of it in the future!
kind regards Josua Mayer
addrcalc.patch
Index: uboot-image-setup.in =================================================================== --- uboot-image-setup.in (revision 554bb233fa71baf7fee2c9a136072b7f) +++ uboot-image-setup.in (working copy) @@ -204,8 +204,8 @@ ;; cuboxi) kerneladdr=0x10800100 - fdtaddr=0x18000000 - ramdiskaddr=0x18100000 + fdtaddr=calculate + ramdiskaddr=calculate How about we make "calculate" the default? We can simply check whether
On 01.07.14 20:13, Josua Mayer wrote: the variable is empty then. Disagree. We should rather stop using our own values and relying on kernel_addr_r, fdt_addr_r, initrd_addr_r if available. If the environment does not provide any hints, then falling back to our own calculations is fine with me. But us constantly overruling the firmware is not good as it makes results harder to compare.
U-boot provided variables always overrule our own calculated ones, no?
Also, if you change the default and affect existing board definitions, who is going to re-test all those images?
The default for boards that use rd & fdt today is that they provide addresses ;). Alex -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org