On 05.07.14 11:42, Josua Mayer wrote:
Am 03.07.2014 16:11, schrieb Alexander Graf:
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. I personally dont like if(empty) do_something. Thats not verbose enough to me, instead checking for "calculate", or as an alternative "auto" seems appropriate to me since its much more descriptive and less magical.
Fair enough. Either way it's an improvement :). Alex -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org