Difference between revisions of "BELK-TN-006: Using PetaLinux to Build BELK/BXELK Software Components"

From DAVE Developer's Wiki
Jump to: navigation, search
(Building the Linux kernel)
(Building the Linux kernel)
Line 49: Line 49:
  
  
Add in build/conf/plnxtool.conf (project-spec/meta-user/conf/petalinuxbsp.conf ????)
+
Add in project-spec/meta-user/conf/petalinuxbsp.conf
 
LINUX_VERSION_EXTENSION = "-belk-4.0.0"
 
LINUX_VERSION_EXTENSION = "-belk-4.0.0"
 
+
KERNEL_DEVICETREE = "bora.dtb"
  
  
Line 61: Line 61:
  
  
project-spec/meta-user/conf/petalinuxbsp.conf
+
 
KERNEL_DEVICETREE = "bora.dtb"
+
 
 +
dvdk@osboxes:~/devel/bora/prj/bora1$ !3598
 +
petalinux-package --image -c kernel --format uImage
 +
SDK environment now set up; additionally you may now run devtool to perform development tasks.
 +
Run devtool --help for further details.
 +
 
 +
### Shell environment set up for builds. ###
 +
 
 +
You can now run 'bitbake <target>'
 +
 
 +
Common targets are:
 +
    core-image-minimal
 +
    core-image-sato
 +
    meta-toolchain
 +
    meta-ide-support
 +
 
 +
You can also run generated qemu images with a command like 'runqemu qemux86'
 +
INFO: Adding user layer: /home/dvdk/devel/bora/prj/bora1/project-spec/meta-user
 +
INFO: generating uImage
 +
INFO: bitbake -R /home/dvdk/devel/bora/prj/bora1/build/conf/kerneltype.conf virtual/kernel
 +
Parsing recipes: 100% |####################################################################################################################| Time: 0:01:44
 +
Parsing of 2446 .bb files complete (0 cached, 2446 parsed). 3236 targets, 224 skipped, 0 masked, 0 errors.
 +
NOTE: Resolving any missing task queue dependencies
 +
Initialising tasks: 100% |#################################################################################################################| Time: 0:00:59
 +
Checking sstate mirror object availability: 100% |#########################################################################################| Time: 0:00:11
 +
NOTE: Executing SetScene Tasks
 +
NOTE: Executing RunQueue Tasks
 +
linux-xlnx-4.9-belk-4.0.0+git999-r0 do_compile: NOTE: linux-xlnx: compiling from external source tree /home/dvdk/devel/bora/prj/bora1/build/../components/ext_sources/linux-xlnx
 +
fsbl-2017.2+gitAUTOINC+122565ec40-r0 do_compile: NOTE: fsbl: compiling from external source tree /opt/petalinux/tools/hsm/data/embeddedsw
 +
NOTE: Tasks Summary: Attempted 2410 tasks of which 1869 didn't need to be rerun and all succeeded.
 +
cp: cannot create regular file ‘/home/dvdk/devel/bora/prj/bora1/images/linux/uImage’: No such file or directory

Revision as of 09:28, 21 September 2018

Info Box
Bora5-small.jpg Applies to Bora
BORA Xpress.png Applies to BORA Xpress

History[edit | edit source]

Version Date Notes
1.0.0 September 2018 First public release

Introduction[edit | edit source]

As explained here, BELK/BXELK structure is not based on PetaLinux build system. Instead, BELK/BXELK make use of a standardized Yocto-based build system to build all the software components—U-Boot, Linux kernel, and root filesystem—that run on the Processing System (PS). This choice is more flexible and more modularized but it requires a little bit more knowledge of embedded Linux systems.

That being said, there are cases in which it can be convenient to build such components with PetaLinux build system, however. This technical note shows how to build the Linux kernel image released with BELK/BXELK with PetaLinux build system.

The procedure was tested with the following configuration.

Component Version
PetaLinux 2017.2
BELK/BXELK 4.0.0

Building the Linux kernel[edit | edit source]

petalinux-create --type project --template zynq --name bora1

petalinux-config --get-hw-description=/home/dvdk/devel/bora/bora-minimal/bora-minimal.sdk/

kernel directory

DTS include directory


Add in project-spec/meta-user/conf/petalinuxbsp.conf LINUX_VERSION_EXTENSION = "-belk-4.0.0" KERNEL_DEVICETREE = "bora.dtb"


dvdk@osboxes:~/devel/bora/prj/bora1/components/ext_sources/linux-xlnx$ cd arch/arm/configs/ dvdk@osboxes:~/devel/bora/prj/bora1/components/ext_sources/linux-xlnx/arch/arm/configs$ rm xilinx_zynq_defconfig dvdk@osboxes:~/devel/bora/prj/bora1/components/ext_sources/linux-xlnx/arch/arm/configs$ ln -s bora_defconfig xilinx_zynq_defconfig dvdk@osboxes:~/devel/bora/prj/bora1/components/ext_sources/linux-xlnx/arch/arm/configs$ ll xilinx_zynq_defconfig lrwxrwxrwx 1 dvdk dvdk 14 set 21 10:30 xilinx_zynq_defconfig -> bora_defconfig



dvdk@osboxes:~/devel/bora/prj/bora1$ !3598 petalinux-package --image -c kernel --format uImage SDK environment now set up; additionally you may now run devtool to perform development tasks. Run devtool --help for further details.

      1. Shell environment set up for builds. ###

You can now run 'bitbake <target>'

Common targets are:

   core-image-minimal
   core-image-sato
   meta-toolchain
   meta-ide-support

You can also run generated qemu images with a command like 'runqemu qemux86' INFO: Adding user layer: /home/dvdk/devel/bora/prj/bora1/project-spec/meta-user INFO: generating uImage INFO: bitbake -R /home/dvdk/devel/bora/prj/bora1/build/conf/kerneltype.conf virtual/kernel Parsing recipes: 100% |####################################################################################################################| Time: 0:01:44 Parsing of 2446 .bb files complete (0 cached, 2446 parsed). 3236 targets, 224 skipped, 0 masked, 0 errors. NOTE: Resolving any missing task queue dependencies Initialising tasks: 100% |#################################################################################################################| Time: 0:00:59 Checking sstate mirror object availability: 100% |#########################################################################################| Time: 0:00:11 NOTE: Executing SetScene Tasks NOTE: Executing RunQueue Tasks linux-xlnx-4.9-belk-4.0.0+git999-r0 do_compile: NOTE: linux-xlnx: compiling from external source tree /home/dvdk/devel/bora/prj/bora1/build/../components/ext_sources/linux-xlnx fsbl-2017.2+gitAUTOINC+122565ec40-r0 do_compile: NOTE: fsbl: compiling from external source tree /opt/petalinux/tools/hsm/data/embeddedsw NOTE: Tasks Summary: Attempted 2410 tasks of which 1869 didn't need to be rerun and all succeeded. cp: cannot create regular file ‘/home/dvdk/devel/bora/prj/bora1/images/linux/uImage’: No such file or directory