[U-Boot] Building uImage with multiple load addresses

Hi,
When trying to build imx_v4_v5_defconfig, or mx3_defconfig, or mx5_defconfig on a 3.2-rc6 kernel I get:
Kernel: arch/arm/boot/Image is ready Kernel: arch/arm/boot/zImage is ready multiple load addresses: 0x80008000 0x80008000 0x10008000 This is incompatible with uImages Specify LOADADDR on the commandline to build an uImage make[1]: *** [arch/arm/boot/uImage] Error 1 make: *** [uImage] Error 2
I started a thread at the ARM kernel list: http://marc.info/?l=linux-arm-kernel&m=132343317014712&w=2
,but I think the U-boot list is the more appropriate one to discuss this kind of issue.
So what is the correct way to build a uImage for i.MX now?
Do I need to do any changes to mkimage?
Thanks,
Fabio Estevam

On Wed, Dec 21, 2011 at 7:24 PM, Fabio Estevam festevam@gmail.com wrote:
Hi,
When trying to build imx_v4_v5_defconfig, or mx3_defconfig, or mx5_defconfig on a 3.2-rc6 kernel I get:
Kernel: arch/arm/boot/Image is ready Kernel: arch/arm/boot/zImage is ready multiple load addresses: 0x80008000 0x80008000 0x10008000 This is incompatible with uImages Specify LOADADDR on the commandline to build an uImage make[1]: *** [arch/arm/boot/uImage] Error 1 make: *** [uImage] Error 2
I started a thread at the ARM kernel list: http://marc.info/?l=linux-arm-kernel&m=132343317014712&w=2
,but I think the U-boot list is the more appropriate one to discuss this kind of issue.
So what is the correct way to build a uImage for i.MX now?
Do I need to do any changes to mkimage?
Ok, this is the method I can think of:
Let's say I want build a kernel for mx53:
make (This will produce a zImage)
make uImage LOADADDR=0x70008000
The LOADADDR can be retrieved from: arch/arm/mach-imx/Makefile.boot or arch/arm/mach-mx5/Makefile.boot
Is this the recommended approach or is there any other suggestion to make this easier?
Regards,
Fabio Estevam

On 12/21/2011 03:20 PM, Fabio Estevam wrote:
On Wed, Dec 21, 2011 at 7:24 PM, Fabio Estevam festevam@gmail.com wrote:
Hi,
When trying to build imx_v4_v5_defconfig, or mx3_defconfig, or mx5_defconfig on a 3.2-rc6 kernel I get: ... multiple load addresses: 0x80008000 0x80008000 0x10008000 This is incompatible with uImages ... Do I need to do any changes to mkimage? ...
I'd suggest using "mkimage -t kernel_noload" instead of "mkimage -t kernel". That way, you don't have to specify an load/entry address; the kernel will be executed wherever you happen to load it in memory, which should work fine for an ARM zImage at least.
This feature was introduced pretty recently in mainline U-Boot though, so you'll need to build your own new U-boot and mkimage tool.

On 12/21/2011 03:20 PM, Fabio Estevam wrote:
On Wed, Dec 21, 2011 at 7:24 PM, Fabio Estevam festevam@gmail.com wrote:
Hi,
When trying to build imx_v4_v5_defconfig, or mx3_defconfig, or mx5_defconfig on a 3.2-rc6 kernel I get: ... multiple load addresses: 0x80008000 0x80008000 0x10008000 This is incompatible with uImages ... Do I need to do any changes to mkimage? ...
I'd suggest using "mkimage -t kernel_noload" instead of "mkimage -t kernel". That way, you don't have to specify an load/entry address; the kernel will be executed wherever you happen to load it in memory, which should work fine for an ARM zImage at least.
This feature was introduced pretty recently in mainline U-Boot though, so you'll need to build your own new U-boot and mkimage tool.
I think this is fine. And I agree to use this approach. Stephen, I won't be able to finish the u-boot/zImage support any soon, exams started for me now.
M

On 21/12/2011 23:20, Fabio Estevam wrote:
Ok, this is the method I can think of:
Let's say I want build a kernel for mx53:
make (This will produce a zImage)
make uImage LOADADDR=0x70008000
Exactly, I do the same.
The LOADADDR can be retrieved from: arch/arm/mach-imx/Makefile.boot or arch/arm/mach-mx5/Makefile.boot
Is this the recommended approach or is there any other suggestion to make this easier?
I am not aware of another way.
Regards, Stefano Babic

Dear Stefano Babic,
In message 4EF2EFF1.1030406@denx.de you wrote:
make uImage LOADADDR=0x70008000
Exactly, I do the same.
Before, you wrote you were using 0x80008000 ...
Best regards,
Wolfgang Denk

On 22/12/2011 10:02, Wolfgang Denk wrote:
Dear Stefano Babic,
In message 4EF2EFF1.1030406@denx.de you wrote:
make uImage LOADADDR=0x70008000
Exactly, I do the same.
Before, you wrote you were using 0x80008000 ...
No, I don't: I wrote that I am using 0x80008000 for MX3. Fabio wrote the example for MX53, and the value is correct (0x70008000). And for MX51 we have another one (on the MX51 the RAM starts at address 0x90000000).
There is no a general load address for all IMX SOCs.
Best regards, Stefano Babic

Dear Stefano Babic,
In message 4EF2F5DC.8010703@denx.de you wrote:
make uImage LOADADDR=0x70008000
Exactly, I do the same.
Before, you wrote you were using 0x80008000 ...
No, I don't: I wrote that I am using 0x80008000 for MX3. Fabio wrote the example for MX53, and the value is correct (0x70008000). And for MX51 we have another one (on the MX51 the RAM starts at address 0x90000000).
There is no a general load address for all IMX SOCs.
I'm aware of this. But this was what Fabio quoted from the Linux messages:
Kernel: arch/arm/boot/Image is ready Kernel: arch/arm/boot/zImage is ready multiple load addresses: 0x80008000 0x80008000 0x10008000
This does not list 0x70008000 as an option (instead it lists 0x80008000 twice?). So is this a bug in / deficiency of the Linux kernel?
Best regards,
Wolfgang Denk

Hi Wolfgang,
On Thu, Dec 22, 2011 at 10:04 AM, Wolfgang Denk wd@denx.de wrote:
I'm aware of this. But this was what Fabio quoted from the Linux messages:
Kernel: arch/arm/boot/Image is ready Kernel: arch/arm/boot/zImage is ready multiple load addresses: 0x80008000 0x80008000 0x10008000
This does not list 0x70008000 as an option (instead it lists 0x80008000 twice?). So is this a bug in / deficiency of the Linux kernel?
Sorry for the confusion.
The list shown above is for the mx3_defconfig target and that's why it does not show 0x70008000.
Currently the mx3_defconfig target can build a kernel for the following processors: SOC_IMX31 , SOC_IMX35 and SOC_IMX6Q
,and their load addresses are according to arch/arm/mach-imx/Makefile.boot are:
0x80008000 0x80008000 0x10008000 , which matches the list shown above.
The load addresses for MX53 is 0x70008000 as Stefano mentioned, and can be confirmed at: arch/arm/mach-mx5/Makefile.boot.
Regards,
Fabio Estevam

On 21/12/2011 22:24, Fabio Estevam wrote:
Hi,
When trying to build imx_v4_v5_defconfig, or mx3_defconfig, or mx5_defconfig on a 3.2-rc6 kernel I get:
Kernel: arch/arm/boot/Image is ready Kernel: arch/arm/boot/zImage is ready multiple load addresses: 0x80008000 0x80008000 0x10008000 This is incompatible with uImages Specify LOADADDR on the commandline to build an uImage make[1]: *** [arch/arm/boot/uImage] Error 1 make: *** [uImage] Error 2
I started a thread at the ARM kernel list: http://marc.info/?l=linux-arm-kernel&m=132343317014712&w=2
,but I think the U-boot list is the more appropriate one to discuss this kind of issue.
So what is the correct way to build a uImage for i.MX now?
Well, I build setting LOADADDR=0x80008000 before make (I think your example is for MX3).
Stefano
participants (5)
-
Fabio Estevam
-
Marek Vasut
-
Stefano Babic
-
Stephen Warren
-
Wolfgang Denk