How to build Petalinux Kernel for Ultra96 V2 Based on Avnet BSP 2018.3

Updated: Apr 27



Build Steps

# Setup PetaLinux Environment

cd ~petalinux-install-directory

source peta/settings.sh


# go to BSP source code directory

cd ultra96v2_oob_2018_3


# In order to clean up build temp files By running following command:

petalinux-build -c kernel -x distclean

# You should see following debug messages:

​petalinux-build -c kernel -x distclean

[INFO] building kernel

[INFO] sourcing bitbake

INFO: bitbake virtual/kernel -c cleansstate Loading cache: 100% |##################################################################################################################################################| Time: 0:00:01 Loaded 3468 entries from dependency cache. Parsing recipes: 100% |################################################################################################################################################| Time: 0:00:04 Parsing of 2577 .bb files complete (2542 cached, 35 parsed). 3469 targets, 133 skipped, 0 masked, 0 errors. NOTE: Resolving any missing task queue dependencies Initialising tasks: 100% |#############################################################################################################################################| Time: 0:00:00 NOTE: Executing RunQueue Tasks NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn't need to be rerun and all succeeded.

[INFO] successfully built kernel

# In order to fetch source ode, please run following command: petalinux-build -c kernel -x fetch

# You will see following debug messages:

petalinux-build -c kernel -x fetch

[INFO] building kernel

[INFO] sourcing bitbake

INFO: bitbake virtual/kernel -c fetch Loading cache: 100% |##################################################################################################################################################| Time: 0:00:01 Loaded 3468 entries from dependency cache. Parsing recipes: 100% |################################################################################################################################################| Time: 0:00:04 Parsing of 2577 .bb files complete (2542 cached, 35 parsed). 3469 targets, 133 skipped, 0 masked, 0 errors. NOTE: Resolving any missing task queue dependencies Initialising tasks: 100% |#############################################################################################################################################| Time: 0:00:00 NOTE: Executing RunQueue Tasks NOTE: Tasks Summary: Attempted 1 tasks of which 0 didn't need to be rerun and all succeeded. INFO: Copying Images from deploy to images [INFO] successfully built kernel

# In order to unpack source ode, please run following command:

petalinux-build -c kernel -x unpack


# You will see following debug messages:

​petalinux-build -c kernel -x unpack

[INFO] building kernel

[INFO] sourcing bitbake

INFO: bitbake virtual/kernel -c unpack Loading cache: 100% |##################################################################################################################################################| Time: 0:00:01 Loaded 3468 entries from dependency cache. Parsing recipes: 100% |################################################################################################################################################| Time: 0:00:04 Parsing of 2577 .bb files complete (2542 cached, 35 parsed). 3469 targets, 133 skipped, 0 masked, 0 errors. NOTE: Resolving any missing task queue dependencies Initialising tasks: 100% |#############################################################################################################################################| Time: 0:00:00 NOTE: Executing RunQueue Tasks NOTE: Tasks Summary: Attempted 2 tasks of which 1 didn't need to be rerun and all succeeded. INFO: Copying Images from deploy to images [INFO] successfully built kernel

# In order to rebuild source ode, please run following command:

petalinux-build -c kernel -x build


# You will see following debug messages:

​petalinux-build -c kernel -x build

[INFO] building kernel

[INFO] sourcing bitbake

INFO: bitbake virtual/kernel -c build Loading cache: 100% |##################################################################################################################################################| Time: 0:00:01 Loaded 3468 entries from dependency cache. Parsing recipes: 100% |################################################################################################################################################| Time: 0:00:04 Parsing of 2577 .bb files complete (2542 cached, 35 parsed). 3469 targets, 133 skipped, 0 masked, 0 errors. NOTE: Resolving any missing task queue dependencies Initialising tasks: 100% |#############################################################################################################################################| Time: 0:00:01 Checking sstate mirror object availability: 100% |#####################################################################################################################| Time: 0:00:01 NOTE: Executing SetScene Tasks NOTE: Executing RunQueue Tasks NOTE: Tasks Summary: Attempted 716 tasks of which 687 didn't need to be rerun and all succeeded. INFO: Copying Images from deploy to images [INFO] successfully built kernel

It will generate new image.ub in images/linux folder

# Copy image.ub to BOOT folder

cp images/linux/image.ub /media/jimmy/BOOT Sync Umount /media/jimmy/BOOT Umount /media/jimmy/root

# New debug message, The timestamp in yellow color has been changed

​Starting kernel ...

[ 0.000000] Booting Linux on physical CPU 0x0

[ 0.000000] Linux version 4.14.0-xilinx-v2018.3 (oe-user@oe-host) (gcc version 7.3.0 (GCC)) #1 SMP Tue Apr 12 02:05:33 UTC 2022

[ 0.000000] Boot CPU: AArch64 Processor [410fd034]

[ 0.000000] Machine model: Avnet Ultra96 Rev1

[ 0.000000] earlycon: cdns0 at MMIO 0x00000000ff010000 (options '115200n8')

[ 0.000000] bootconsole [cdns0] enabled

[ 0.000000] efi: Getting EFI parameters from FDT:

[ 0.000000] efi: UEFI not found.

[ 0.000000] cma: Reserved 256 MiB at 0x000000006fc00000

[ 0.000000] psci: probing for conduit method from DT.

[ 0.000000] psci: PSCIv1.1 detected in firmware.

[ 0.000000] psci: Using standard PSCI v0.2 function IDs [ 0.000000] psci: MIGRATE_INFO_TYPE not supported.

[ 0.000000] random: fast init done

[ 0.000000] percpu: Embedded 21 pages/cpu @ffffffc07fe60000 s46488 r8192 d31336 u86016

[ 0.000000] Detected VIPT I-cache on CPU0

[ 0.000000] CPU features: enabling workaround for ARM erratum 845719

[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 512771

[ 0.000000] Kernel command line: earlycon console=ttyPS0,115200 clk_ignore_unused root=/dev/mmcblk0p2 rw rootwait


32 views0 comments