cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Explorer
Explorer
1,726 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
Highlighted
Voyager
Voyager
1,707 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
Highlighted
Explorer
Explorer
1,697 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
Highlighted
Voyager
Voyager
1,695 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
Highlighted
Explorer
Explorer
1,684 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
Highlighted
Voyager
Voyager
1,676 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
Highlighted
Explorer
Explorer
1,670 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
Highlighted
Voyager
Voyager
1,668 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
Highlighted
Moderator
Moderator
1,647 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
Highlighted
Voyager
Voyager
1,638 Views
Registered: ‎09-14-2016

@sandeepg

 

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

 

Problem solved.

 

Cheers,

Trigger

0 Kudos
Highlighted
Explorer
Explorer
1,524 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