Page 1 of 3

build parallella-linux kernel

PostPosted: Wed Aug 20, 2014 9:11 am
by claudiug
Hi all,

I'm essentially trying to build a headless 7020 kernel that has CIFS support. upon building using the git clone of parallella-linux I get at serial console:
Error: unrecognized/unsupported device tree compatible list:
[ 'xlnx,zynq-7000' ]

Available machine support:

ID (hex) NAME
00000d32 Xilinx Zynq Platform
The build was done with
make ARCH=arm CROSS_COMPILE=... mrproper
make ARCH=arm CROSS_COMPILE=... xilinx_zynq_defconfig
... enable cifs support
make ARCH=arm CROSS_COMPILE=... uImage

I am assuming that the newer gen1 7020 does not need the dts patch at ... /gitpatch/
and booting using u-boot on the SPI flash.

Maybe I'm missing something obvious. Any help is appreciated.


Re: build parallella-linux kernel

PostPosted: Wed Aug 20, 2014 3:10 pm
by bcxcube
Hi Claudiu,

Try using the parallella-linux-adi repository and the parallella_defconfig configuration from that repository.


Re: build parallella-linux kernel

PostPosted: Thu Aug 21, 2014 5:24 am
by claudiug

Thank you for the suggestions. Makes sense, seems like the other kernel has not been updated since Oct 2013. Anyway, with the adi kernel I need to specify LOADADDR=0x8000 (actually also mentioned in another thread on this forum now that I find it).

Also the dts needs to have "earlyprintk" as boot argument, otherwise kernel booting stuck at "...done, booting the kernel." Surprisingly, the dts for the working kernel does not need earlyprintk.

Nevertheless in this case I get the following error, which leads to kernel panic (I am cross compiling the kernel on a x64 machine, but I trust the tools, I've been compiling kernels for my BBB without problems).
clkc: failed to get resource
------------[ cut here ]------------
kernel BUG at drivers/clk/zynq/clkc.c:675!
Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.14.12-parallella-g6a08845 #1
task: c09a8eb0 ti: c099e000 task.ti: c099e000
PC is at zynq_clock_init+0x80/0xa8
LR is at zynq_clock_init+0x80/0xa8
pc : [<c0983fbc>] lr : [<c0983fbc>] psr: 600001d3
sp : c099ff88 ip : c09a8eb0 fp : 00000000
r10: c09a6400 r9 : ecfffd00 r8 : c0991320
r7 : ffffffff r6 : c0a04cc0 r5 : c099e000 r4 : ec816044
r3 : c09a8eb0 r2 : 00000000 r1 : c099fe98 r0 : 0000001c
Flags: nZCv IRQs off FIQs off Mode SVC_32 ISA ARM Segment kernel
Control: 18c5387d Table: 0000404a DAC: 00000015
Process swapper/0 (pid: 0, stack limit = 0xc099e240)
Stack: (0xc099ff88 to 0xc09a0000)
ff80: ec815ef4 c096eae4 c085f928 ec815f90 f0004000 c09a6410
ffa0: c098d3b8 00000001 00000001 c096e990 c098d3b8 c096aea8 00000002 c096799c
ffc0: ffffffff ffffffff c0967574 00000000 00000000 c0991320 18c5387d c09a644c
ffe0: c099131c c09aa59c 0000406a 413fc090 00000000 00008074 00000000 00000000
[<c0983fbc>] (zynq_clock_init) from [<c096e990>] (zynq_timer_init+0xc/0x1c)
[<c096e990>] (zynq_timer_init) from [<c096aea8>] (time_init+0x1c/0x30)
[<c096aea8>] (time_init) from [<c096799c>] (start_kernel+0x1fc/0x384)
[<c096799c>] (start_kernel) from [<00008074>] (0x8074)
Code: ea000003 e59f0028 e5941000 ebf46a9d (e7f001f2)
---[ end trace 3406ff24bd97382e ]---
Kernel panic - not syncing: Attempted to kill the idle task!

DTS issue? (I've tried both the dts in arch/arm/boot/dts/zynq-parallella.dts and the original dts mentioned in quickstart guide) Tried to add a reg address assignment to clkc but it fails in other ways with bad cell count). I am still using the 7020_headless bitfile in parallella-hw/fpga/bitstreams. I'm wondering if a different kernel requires a different bitfile.

If anyone has any suggestions, they would be helpful. I'll post anything I find.


Re: build parallella-linux kernel

PostPosted: Thu Aug 21, 2014 10:02 am
by 9600
@Claudiu I've just run into the very same issue. I get this when building from the xcomm_zynq (default) and stable branches, but not if I build from the bcxcube_epiphany_driver branch (which is >29,000 commits behind the other two). Looks like something has changed and I'm not sure whether it's devicetree or bitstream related (or simply that the main branch is broken right now).

In any case, building from the Epiphany driver branch should suffice for my needs (and hopefully yours!) and I expect someone else will be able to comment further on the state of the default branch.



Re: build parallella-linux kernel

PostPosted: Thu Aug 21, 2014 10:14 am
by aolofsson
Yeah..I was just about to fault. :( Will have a resolution today one way or another.

Re: build parallella-linux kernel

PostPosted: Fri Aug 22, 2014 4:01 am
by claudiug
Andrew, Andreas,

Thank you for the suggestions. I've cross-compiled the current parallella-linux kernel and works with the e16-headless bitfile.


Re: build parallella-linux kernel

PostPosted: Sun Sep 07, 2014 11:27 am
by g3vbv
A HOWTO would be nice as building and installing kernels on Parallella is completely different - nothing in /boot, no /lib/modules ........
I build natively.
root@parallella-16:/a1/parallella-linux# make -j 4 LOADADDR=0x8000 uImage
LD arch/arm/boot/compressed/vmlinux
OBJCOPY arch/arm/boot/zImage
Kernel: arch/arm/boot/zImage is ready
UIMAGE arch/arm/boot/uImage
Image Name: Linux-3.14.12-parallella-xilinx-
Created: Sun Sep 7 04:27:26 2014
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3370784 Bytes = 3291.78 kB = 3.21 MB
Load Address: 00008000
Entry Point: 00008000
Image arch/arm/boot/uImage is ready

root@parallella-16:/a1/parallella-linux# ls arch/arm/boot/dts/*parallella*
arch/arm/boot/dts/zynq-parallella1.dtsi arch/arm/boot/dts/zynq-parallella1-hdmi.dts arch/arm/boot/dts/zynq-parallella1-headless.dts
root@parallella-16:/a1/parallella-linux# make zynq-parallella1-hdmi.dtb
DTC arch/arm/boot/dts/zynq-parallella1-hdmi.dtb
root@parallella-16:/a1/parallella-linux# l arch/arm/boot/dts/zynq-parallella1-hdmi.dtb
-rw-r--r-- 1 root root 8823 Sep 7 11:55 arch/arm/boot/dts/zynq-parallella1-hdmi.dtb

root@parallella-16:/usr/src/parallella-uboot# l u-boot*
-rwxr-xr-x 1 root root 1214809 Aug 29 01:33 u-boot
-rw-r--r-- 1 root root 250520 Aug 29 01:33 u-boot.bin
-rw-r--r-- 1 root root 923 Aug 29 01:33
-rw-r--r-- 1 root root 88744 Aug 29 01:33
-rw-r--r-- 1 root root 751650 Aug 29 01:33 u-boot.srec

So far so good and that's as far as I have got.

I also have the following configured as modules:-
root@parallella-16:/a1/parallella-linux# grep =m .config

"make -j 4 modules"
LD [M] crypto/ansi_cprng.ko
CC net/rpmsg/rpmsg_proto.mod.o
LD [M] drivers/ata/ahci_platform.ko
LD [M] drivers/ata/libahci.ko
LD [M] drivers/ata/libata.ko
LD [M] drivers/ata/pata_platform.ko
LD [M] drivers/char/hw_random/exynos-rng.ko
LD [M] drivers/char/hw_random/rng-core.ko
LD [M] drivers/hid/hid-multitouch.ko
LD [M] drivers/input/evbug.ko
LD [M] drivers/memstick/core/memstick.ko
LD [M] drivers/memstick/core/ms_block.ko
LD [M] drivers/memstick/core/mspro_block.ko
LD [M] drivers/phy/phy-bcm-kona-usb2.ko
LD [M] drivers/phy/phy-exynos-dp-video.ko
LD [M] drivers/phy/phy-exynos-mipi-video.ko
LD [M] drivers/remoteproc/mb_remoteproc.ko
LD [M] drivers/remoteproc/remoteproc.ko
LD [M] drivers/remoteproc/zynq_remoteproc.ko
LD [M] drivers/rpmsg/virtio_rpmsg_bus.ko
LD [M] drivers/scsi/scsi_mod.ko
LD [M] drivers/usb/class/cdc-wdm.ko
LD [M] drivers/usb/serial/cp210x.ko
LD [M] drivers/usb/serial/usb-serial-simple.ko
LD [M] drivers/usb/storage/ums-freecom.ko
LD [M] drivers/usb/storage/ums-realtek.ko
LD [M] drivers/usb/storage/ums-isd200.ko
LD [M] drivers/usb/storage/ums-usbat.ko
LD [M] drivers/usb/storage/usb-storage.ko
LD [M] drivers/video/backlight/backlight.ko
LD [M] drivers/video/backlight/generic_bl.ko
LD [M] drivers/video/backlight/lcd.ko
LD [M] drivers/virtio/virtio_ring.ko
LD [M] drivers/virtio/virtio.ko
LD [M] net/rpmsg/rpmsg_proto.ko
LD [M] lib/cordic.ko

Re: build parallella-linux kernel

PostPosted: Sun Sep 07, 2014 10:46 pm
by Feik
Is there any established process to this? Like g3vbv I am building locally on the parallella.

I am trying to add a WiFi driver to the kernel.
Following this post to build the kernel as suggested by this post.

I find that whether I build the kernel from GIT or from the download on the first post, it does not boot or give errors.
Is there something I am missing? Do I also need to rebuild the devicetree.dtb and parallella.bit.bin ?

Re: build parallella-linux kernel

PostPosted: Mon Sep 08, 2014 12:18 am
by g3vbv
Now rebuilding 3.14.12 uImage with all needed options in .config set to =y.

Re: build parallella-linux kernel

PostPosted: Sat Sep 13, 2014 1:06 am
by Feik
Ok. Win! I have managed to build a default kernel + devicetree.
Below are the commands that have gained be success:
Code: Select all
// Check out from GIT
git clone

cd parallella-linux

// Build config
make mrproper
make parallella_defconfig

// Change all modules to be compiled in (edit .config and swap =m with =y)
vi .config

// Make kernel
make -j 4 LOADADDR=0x8000 uImage

// Make DeviceTree
make zynq-parallella1-hdmi.dtb

// Mount boot partition
sudo mount /dev/mmcblk0p1 /mnt

// Move old files out of the way
sudo mv /mnt/uImage /mnt/uImage.bak
sudo mv /mnt/devicetree.dtb /mnt/devicetree.dtb.bak

// Copy new files into place
sudo cp arch/arm/boot/uImage /mnt/uImage
sudo cp arch/arm/boot/dts/zynq-parallella1-hdmi.dtb /mnt/devicetree.dtb

// Reboot and pray
sudo sync
sudo reboot

I haven't tried doing any more modifications to the kernel yet. But I presume make menuconfig will do the trick

It seems the default config is missing some things.
The main thing I have found so far is IIO is missing so the temp sensor script won't work.
I have also yet to succeed in getting Wifi going... but I have a feeling I am missing something in the setup process for that.