UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor augustvh
Visitor
1,522 Views
Registered: ‎05-15-2018

Petalinux on zedboard

Hi,

 

I am trying to build a linux kernel for use on zedboard by utilizing the petalinux tool. However, a problem via the boot process causes the UART to not send any new information regarding the boot process. Any help is appreciated!

 

The following setup is used: Ubuntu 16.04 with Petalinux v2018.1 and SDK v2018.1 installed.

The build procedure is as follows:

 

source petalinux settings.sh and sdk setting64.sh

 

$ petalinux-build -t project -s <path/to/BSP>/avnet-digilent-zedboard-v2018.1-final.bsp

$ cd <project-root>

$ petalinux-config

 

exit without any configurations (i.e default settings)

 

$ petalinux-config -c kernel

 

exit without changes (default settings)

 

$ petalinux-config -c rootfs

 

exit without changes (default settings)

 

$ petalinux-build

$ petalinux-package --boot --format BIN --fsbl images/linux/zynq_fsbl.elf --kernel images/linux/image.ub --u-boot images/linux/u-boot.elf

 

Then, copy the BOOT.BIN and image.ub to SD card and turn the board on which yields (at the kernel boot process):

 

Starting kernel ...

Booting Linux on physical CPU 0x0
Linux version 4.14.0-xilinx-v2018.1 (oe-user@oe-host) (gcc version 7.2.0 (GCC)) #1 SMP PREEMPT Tue May 15 11:23:18 CEST 2018
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
OF: fdt: Machine model: Zynq Zed Development Board
bootconsole [earlycon0] enabled
Memory policy: Data cache writealloc
cma: Reserved 256 MiB at 0x10000000
percpu: Embedded 16 pages/cpu @cfb4d000 s34764 r8192 d22580 u65536
Built 1 zonelists, mobility grouping on.  Total pages: 130048
Kernel command line: console=ttyPS0,115200 earlyprintk
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 240936K/524288K available (6144K kernel code, 238K rwdata, 1560K rodata, 1024K init, 153K bss, 21208K reserved, 262144K cma-reserved, 0K highmem)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
    lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .text : 0xc0008000 - 0xc0700000   (7136 kB)
      .init : 0xc0900000 - 0xc0a00000   (1024 kB)
      .data : 0xc0a00000 - 0xc0a3b900   ( 239 kB)
       .bss : 0xc0a3b900 - 0xc0a61e44   ( 154 kB)
Preemptible hierarchical RCU implementation.
        RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
        Tasks RCU enabled.
RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
efuse mapped to e0800000
slcr mapped to e0802000
L2C: platform modifies aux control register: 0x72360000 -> 0x72760000
L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000
L2C-310 erratum 769419 enabled
L2C-310 enabling early BRESP for Cortex-A9
L2C-310 full line of zeros enabled for Cortex-A9
L2C-310 ID prefetch enabled, offset 1 lines
L2C-310 dynamic clock gating enabled, standby mode enabled
L2C-310 cache controller enabled, 8 ways, 512 kB
L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76760001
zynq_clock_init: clkc starts at e0802100
Zynq clock init
sched_clock: 64 bits at 333MHz, resolution 3ns, wraps every 4398046511103ns
clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x4ce07af025, max_idle_ns: 440795209040 ns
Switching to timer-based delay loop, resolution 3ns
clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 537538477 ns
timer #0 at e080a000, irq=17
Console: colour dummy device 80x30
Calibrating delay loop (skipped), value calculated using timer frequency.. 666.66 BogoMIPS (lpj=3333333)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x100000 - 0x100060
Hierarchical SRCU implementation.
smp: Bringing up secondary CPUs ...
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
smp: Brought up 1 node, 2 CPUs
SMP: Total of 2 processors activated (1333.33 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
random: get_random_u32 called from bucket_table_alloc+0x1c4/0x204 with crng_init=0
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 512 (order: 3, 32768 bytes)
pinctrl core: initialized pinctrl subsystem
random: fast init done
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor menu
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB @ 0xe0840000
zynq-pinctrl 700.pinctrl: zynq pinctrl initialized
e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 25, base_baud = 3125000) is a xuartps
`▒▒׋▒Led
console [ttyPS0] enabled
bootconsole [earlycon0] disabled
bootconsole [earlycon0] disabled

This is where I define it as hung up since I cannot communicate with the board via the UART any more and no more output is shown.

 

Does anyone have an idea as to why this is happening and what might cause the problem? Is there any configuration that I have to make in order for the kernel boot process to be succesful beyond that of the default settings together with the BSP provided?

 

Best regards.

August

 

 

0 Kudos
13 Replies
Observer shustik
Observer
1,517 Views
Registered: ‎07-14-2017

Re: Petalinux on zedboard

0 Kudos
Visitor augustvh
Visitor
1,501 Views
Registered: ‎05-15-2018

Re: Petalinux on zedboard

My system-top.dts which was automatically generated is as follows

 

/dts-v1/;
/include/ "zynq-7000.dtsi"
/include/ "zedboard.dtsi"
/include/ "pl.dtsi"
/include/ "pcw.dtsi"
/ {
    chosen {
                  bootargs = "earlycon";
                  stdout-path = "serial0:115200n8";
    };
    aliases {
                 ethernet0 = &gem0;
                 serial0 = &uart1;
                 spi0 = &qspi;
    };
    memory {
                  device_type = "memory";
                  reg = <0x0 0x20000000>;
    };
};
#include "system-user.dtsi"
0 Kudos
Visitor augustvh
Visitor
1,494 Views
Registered: ‎05-15-2018

Re: Petalinux on zedboard

I tried following that thread without much success.

 

In general I was hoping that by letting everything stay as default the BSP and petalinux tool together would magically make everything work out of the box. The "hack" provided makes me very confused as to why that is not automagically generated via the BSP e.g.

 

And since I am quite new with these tools I cannot yet rule out that any previous setup has been done incorrectly or that I am using the tools in an improper way.

0 Kudos
Observer shustik
Observer
1,493 Views
Registered: ‎07-14-2017

Re: Petalinux on zedboard

And what is your bootargs?
0 Kudos
Observer shustik
Observer
1,483 Views
Registered: ‎07-14-2017

Re: Petalinux on zedboard

I used hdf file, not bsp. For zedboard. And everything but uEnv were fine...
Commands:
petalinux-create -t project --template zynq -n new_proj
petalinux-config --get-hw-description=’ <path>/<my_vivado_proj>/<my_vivado_proj>.sdk’ (path to my system.hdf, obtained from vivado.
Then I picked Subsystem AUTO hardware settings--> advanced bootable images storage Settings --> and chose sd card for everything.
After that build.
Ok...

my uEnv.txt listing (copied to sd part BOOT)

bootargs=root=/dev/mmcblk0p2 rw rootwait
uenvcmd=fatload mmc 0 0x1000000 image.ub && bootm 0x1000000

0 Kudos
Visitor augustvh
Visitor
1,480 Views
Registered: ‎05-15-2018

Re: Petalinux on zedboard

My kernel bootargs are:

 

console=ttyPS0, 115200 earlyprintk

which are auto generated

0 Kudos
Visitor augustvh
Visitor
1,466 Views
Registered: ‎05-15-2018

Re: Petalinux on zedboard

Whenever I add the option: --get-hw-description=<path/to/hdf>

 

I get a warning saying that usage of HDF is going to be deprecated in future releases and that I should use a DSA (device support archive instead).

 

The HDF file I specify are from the Petalinux hwplatform templates under /home/<user>/<path-to-petalinux-install>/tools/hsm/data/embeddedsw/lib/hwplatform_templates/zed_hw_platform. However, specifying the HDF does not change anything regarding the bootargs, they remain the same.

 

But I thought that the BSP provided by the board creator should hold all of the infromation regarding the hardware platform that is required to be know by the linux kernel - as that is the goal of the yocto project?

 

0 Kudos
Observer shustik
Observer
1,452 Views
Registered: ‎07-14-2017

Re: Petalinux on zedboard

Try creating new project?

0 Kudos
Scholar watari
Scholar
1,445 Views
Registered: ‎06-16-2013

Re: Petalinux on zedboard

Hi @augustvh

 

Where do you define rootfs ?

It seems rootfs issue.

 

Best regards,

0 Kudos
Visitor augustvh
Visitor
1,138 Views
Registered: ‎05-15-2018

Re: Petalinux on zedboard

Could you specify more about what defining roofts means?

 

I am trying to get the bare minimum build so hopefully it should be automagically there from using default settings. The petalinux-config -c rootfs and then exit should give me a default rootfs?

 

 

0 Kudos
Scholar watari
Scholar
1,122 Views
Registered: ‎06-16-2013

Re: Petalinux on zedboard

Hi @augustvh

 

Kernel command line: console=ttyPS0,115200 earlyprintk

 

According to your log file, you don't define rootfs on kernel command line.

Therefore linux kernel can not mount root file and hug up.

 

Would you make sure it ?

 

Best regards,

 

 

0 Kudos
Visitor augustvh
Visitor
1,114 Views
Registered: ‎05-15-2018

Re: Petalinux on zedboard

Hi @watari

 

I am really trying to delegate these tasks to the petalinux tool and was hoping that the bare minimum petalinux build for zedboard does not require any modification of the generated boot files etc.

 

But if you have a modification to sugggest I could try to see if that helps.

 

Best regards,

August

0 Kudos
Scholar watari
Scholar
1,082 Views
Registered: ‎06-16-2013

Re: Petalinux on zedboard

Hi @augustvh

 

First of all, at least, Linux kernel request the followings for boot sequence even if it's minimum Linux system. It's my understanding.

 

- Writable rootfs (To mount ex. /dev/.. , /proc/.. and so on )

- Static or dynamic link library files

- Configuration files (You can find like these in /etc/)

 

In your case, I could not find rootfs in your log file and find definition of mount point at boot argument.

 

So, I suggest  to define it.

 

Also, sorry. I don't have latest pata-linux developing environment by OS version issue.

So I can not point out detail and how to resolve and build it.

 

Best regards,

0 Kudos