build parallella-linux kernel

Forum about Parallella boot process, linux kernel, distros, SD-cards, etc.

build parallella-linux kernel

Postby claudiug » Wed Aug 20, 2014 9:11 am

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
http://ftp.parallella.org/ubuntu/archiv ... /gitpatch/
and booting using u-boot on the SPI flash.

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

Thanks,
Claudiu
claudiug
 
Posts: 4
Joined: Fri Aug 15, 2014 7:31 am
Location: San Diego, CA

Re: build parallella-linux kernel

Postby bcxcube » Wed Aug 20, 2014 3:10 pm

Hi Claudiu,

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

-ben
User avatar
bcxcube
 
Posts: 7
Joined: Tue Jul 29, 2014 4:00 pm
Location: Nashua, NH

Re: build parallella-linux kernel

Postby claudiug » Thu Aug 21, 2014 5:24 am

Ben,

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).
viewtopic.php?f=48&t=1230

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.

Claudiu
claudiug
 
Posts: 4
Joined: Fri Aug 15, 2014 7:31 am
Location: San Diego, CA

Re: build parallella-linux kernel

Postby 9600 » Thu Aug 21, 2014 10:02 am

@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.

Cheers,

Andrew
Andrew Back (a.k.a. 9600 / carrierdetect)
User avatar
9600
 
Posts: 997
Joined: Mon Dec 17, 2012 3:25 am

Re: build parallella-linux kernel

Postby aolofsson » Thu Aug 21, 2014 10:14 am

Yeah..I was just about to respond..my fault. :( Will have a resolution today one way or another.
Andreas
User avatar
aolofsson
 
Posts: 1005
Joined: Tue Dec 11, 2012 6:59 pm
Location: Lexington, Massachusetts,USA

Re: build parallella-linux kernel

Postby claudiug » Fri Aug 22, 2014 4:01 am

Andrew, Andreas,

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

BR,
Claudiu
claudiug
 
Posts: 4
Joined: Fri Aug 15, 2014 7:31 am
Location: San Diego, CA

Re: build parallella-linux kernel

Postby g3vbv » Sun Sep 07, 2014 11:27 am

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 u-boot.lds
-rw-r--r-- 1 root root 88744 Aug 29 01:33 u-boot.map
-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
CONFIG_SCSI_MOD=m
CONFIG_SCSI=m
CONFIG_ATA=m
CONFIG_SATA_AHCI_PLATFORM=m
CONFIG_PATA_PLATFORM=m
CONFIG_INPUT_EVBUG=m
CONFIG_HW_RANDOM=m
CONFIG_HW_RANDOM_EXYNOS=m
CONFIG_LCD_CLASS_DEVICE=m
CONFIG_BACKLIGHT_CLASS_DEVICE=m
CONFIG_BACKLIGHT_GENERIC=m
CONFIG_HID_MULTITOUCH=m
CONFIG_USB_WDM=m
CONFIG_USB_STORAGE=m
CONFIG_USB_STORAGE_REALTEK=m
CONFIG_USB_STORAGE_FREECOM=m
CONFIG_USB_STORAGE_ISD200=m
CONFIG_USB_STORAGE_USBAT=m
CONFIG_USB_SERIAL_SIMPLE=m
CONFIG_USB_SERIAL_CP210X=m
CONFIG_MEMSTICK=m
CONFIG_MSPRO_BLOCK=m
CONFIG_MS_BLOCK=m
CONFIG_VIRTIO=m
CONFIG_REMOTEPROC=m
CONFIG_ZYNQ_REMOTEPROC=m
CONFIG_MB_REMOTEPROC=m
CONFIG_RPMSG=m
CONFIG_PHY_EXYNOS_MIPI_VIDEO=m
CONFIG_PHY_EXYNOS_DP_VIDEO=m
CONFIG_BCM_KONA_USB2_PHY=m
CONFIG_CRYPTO_RNG=m
CONFIG_CRYPTO_ANSI_CPRNG=m
CONFIG_CORDIC=m

"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
root@parallella-16:/a1/parallella-linux#
Retired - Senior Staff Specialist Amdahl worldwide supporting AMDAHL/Fujitsu/IBM Mainframes and Sun/Fujitsu SPARC servers.
g3vbv
 
Posts: 30
Joined: Mon Dec 17, 2012 3:25 am
Location: Halesowen, West Midlands, UK

Re: build parallella-linux kernel

Postby Feik » Sun Sep 07, 2014 10:46 pm

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 ?
User avatar
Feik
 
Posts: 4
Joined: Mon Dec 17, 2012 3:20 am

Re: build parallella-linux kernel

Postby g3vbv » Mon Sep 08, 2014 12:18 am

Now rebuilding 3.14.12 uImage with all needed options in .config set to =y.
Retired - Senior Staff Specialist Amdahl worldwide supporting AMDAHL/Fujitsu/IBM Mainframes and Sun/Fujitsu SPARC servers.
g3vbv
 
Posts: 30
Joined: Mon Dec 17, 2012 3:25 am
Location: Halesowen, West Midlands, UK

Re: build parallella-linux kernel

Postby Feik » Sat Sep 13, 2014 1:06 am

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 https://github.com/parallella/parallella-linux

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.
User avatar
Feik
 
Posts: 4
Joined: Mon Dec 17, 2012 3:20 am

Next

Return to Linux/U-Boot

Who is online

Users browsing this forum: No registered users and 1 guest

cron