cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
moibrahim
Explorer
Explorer
2,191 Views
Registered: ‎02-08-2017

Create zImage for ZynqMP

Is it possible to compile linux kernel for Zynqmp to get zImage as a result.

Normal process is

 

make ARCH=arm64 xilinx_zynqmp_defconfig
make ARCH=arm64

 

This will result in Imag file at the output

I want to have zImage which can be obtained in any other linux build by

 

make ARCH=arm64 zImage

 

But when I run "make ARCH=arm64 zImage" for zynqMP configuration, I get error "No rule to make target zImage".

 

If it is not possible, My goal at the end to get uImage. How to get uImage then from Image then?

Any Help Please

0 Kudos
10 Replies
trigger
Voyager
Voyager
2,172 Views
Registered: ‎09-14-2016

Hi @moibrahim,

 

Simple:

 

$ sudo apt install u-boot-tools

$ mkimage -A arm -T kernel -C none -n Linux -d zImage uImage

  • -A [architecture]
  • -T [image type]
  • -C [compression type]
  • -n [image name]
  • -d [image data file]

Cheers,

Trigger

0 Kudos
moibrahim
Explorer
Explorer
2,162 Views
Registered: ‎02-08-2017

@triggerThanks for your input

But as you mentioned, You have provided zImage to mkimage utility. That is why I asked first for zImage.

 

I tried also

mkimage -n 'Kernel Image' -A arm64 -O linux -C none -T kernel -a 0x8000 -e 0x8000 -d Image uImage

But when trying to boot using bootm, I got system is freezing at "starting Kernel" as shown below bootmuImage.png

 

So I thought problem in my uImage

 

P.S., I have passed bootargs correctly to the kernel

0 Kudos
trigger
Voyager
Voyager
2,160 Views
Registered: ‎09-14-2016

@moibrahim

 

Why do you want zImage ?

 

[EDIT]: give us your cmdline

[EDIT]: Are you sure about the kernel entry point ?

 

Cheers,

Trigger

0 Kudos
moibrahim
Explorer
Explorer
2,149 Views
Registered: ‎02-08-2017

@trigger

*** Why do you want zImage ?

I wanted to find other way to get uImage, I thought may be getting it from zImage is the possible way

 

*** give us your cmdline

console=ttyPS0,115200 rw earlyprintk rootwait root=/dev/mmcblk1p2

 

*** Are you sure about the kernel entry point ?

yep, I just posted a quick screenshot and command format in my previous post (not matching I know). But in reality i provided the same address and entry point

 

0 Kudos
trigger
Voyager
Voyager
2,141 Views
Registered: ‎09-14-2016

 

@moibrahim,

 

 

1) You can build direct an uImage from kernel sources no? (like Zynq)

 

2) are you sure about ttyPS0 ?

 

3) we need more info becausei'm not sure that's the correct load address 

0 Kudos
moibrahim
Explorer
Explorer
2,135 Views
Registered: ‎02-08-2017

@trigger

 

Can you please try in your side: the following script

#! /bin/sh -e

## Cross Compiler
export CROSS_COMPILE=<<<add here path to your cross compiler >>>

git clone https://github.com/Xilinx/linux-xlnx.git

cd linux-xlnx

make ARCH=arm64 xilinx_zynqmp_defconfig

make ARCH=arm64 -j4 uImage
0 Kudos
trigger
Voyager
Voyager
2,133 Views
Registered: ‎09-14-2016

@moibrahim

 

Sorry but i cannot spend time on it today,

 

I will made a test tomorrow ;)

 

Cheers,

Trigger

0 Kudos
sandeepg
Moderator
Moderator
2,112 Views
Registered: ‎04-24-2017

You can't build zImage for ZynqMP devices. Only Image and uImage is the supported formats.

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
trigger
Voyager
Voyager
2,103 Views
Registered: ‎09-14-2016

@sandeepg

 

Thx for the info it's good to know :)

 

Problem solved.

 

Cheers,

Trigger

0 Kudos
moibrahim
Explorer
Explorer
1,989 Views
Registered: ‎02-08-2017

@sandeepg

How then to build the uImage,

is it using "make uImage" or using "mkimage"

 

P.S: I tired "make ARCH=arm64 uImage", it gives error that no rule to make target uImage

 

Thanks

0 Kudos