Changes

Jump to: navigation, search
Building the Linux kernel
== Building the Linux kernel ==
petalinuxFirst of all, PetaLinux environment has to be set up.<pre class="workstation-create --type project --template zynq --name bora1terminal"></pre>
Then, create a project from the <code>zynq</code> template:
<pre class="workstation-terminal">
petalinux-create --type project --template zynq --name bora_1
</pre>
 
Import the hardware specification file (.hdf) generated by your Vivado project:
<pre class="workstation-terminal">
petalinux-config --get-hw-description=/home/dvdk/devel/bora/bora-minimal/bora-minimal.sdk/
</pre>
kernel directoryYour project tree should look like this:<pre class="workstation-terminal"></pre>
DTS include directoryClone the Linux kernel sources from DAVE's git repisitory in the :
kernel directory
<pre class="workstation-terminal">
</pre>
Add in project-specReplace the file <code>xilinx_zynq_defconfig</meta-usercode> with a symbolic link to <code>bora_defconfig</conf/petalinuxbsp.confcode>:LINUX_VERSION_EXTENSION <pre class= "workstation-belk-4.0.0"KERNEL_DEVICETREE = "bora.dtbterminal"></pre>
dvdk@osboxes:~/devel/bora/prj/bora1/components/ext_sources/linux-xlnx$ cd arch/arm/configs/
Add in project-spec/meta-user/conf/petalinuxbsp.conf
<pre class="workstation-terminal">
LINUX_VERSION_EXTENSION = "-belk-4.0.0"
KERNEL_DEVICETREE = "bora.dtb"
</pre>
Configure the build system in order to use an external kernel:
dvdk@osboxes:~/devel/bora/prj/bora1$ !3598petalinux-package --image -c kernel --format uImageSDK environment now set up; additionally you may now run devtool Configure the build system in order to perform development tasks.Run devtool --help for further details. ### Shell environment set up use a custom directory for builds. ### You can now run 'bitbake <target>' Common targets aredevice tree include files: core-image-minimal core-image-sato meta-toolchain meta-ide-supportDTS include directory
You can also run generated qemu images with a command like 'runqemu qemux86'Build the kernel:INFO: Adding user layer<pre class="workstation-terminal">dvdk@osboxes: /home/dvdk~/devel/bora/prj/bora1/project$ petalinux-build -spec/metav -userc kernel[INFO] building kernel[INFO: generating uImage] sourcing bitbakeINFO: bitbake -R /home/dvdk/devel/bora/prj/bora1/build/conf/kerneltype.conf virtual/kernel Parsing recipes: 100% |####################################################################################################################| Time: 0:0102:4414
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:5922Checking sstate mirror object availability: 100% |#########################################################################################| Time: 0:00:1113
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/embeddedswNOTE: Tasks Summary: Attempted 2410 tasks of which 1869 2349 didn't need to be rerun and all succeeded.cpINFO: cannot create regular file ‘Copying Images from deploy to imagesINFO: Creating images/homelinux directory[INFO] successfully built kernel</dvdkpre> Create the <code>uImage</develcode> file:<pre class="workstation-terminal"></bora/prj/bora1pre> After the build is completed, the <code>uImage</code> file and the device tree blob are located in the <code>images/linux</uImage’: No such file or code> directory.
4,650
edits

Navigation menu