09-09-2016 06:05 AM
Hallo,
is there a possibility to customize the linux kernel and rootfs automatically generated by SDSOC? Would be nice if there was something like the config menus petalinux has got.
Regards
Mark
09-09-2016 07:13 AM
The PetaLinux Tools offers everything necessary to customize, build and deploy Embedded Linux solutions on Xilinx processing systems. Tailored to accelerate design productivity, the solution works with the Xilinx hardware design tools to ease the development of Linux systems for Zynq-7000 All Programmable SoCs, and MicroBlaze.
The Yocto Project is an open source collaboration project that provides templates, tools and methods to help you create custom Linux-based systems for embedded products regardless of the hardware architecture. It's not an embedded Linux distribution it creates a custom one for you!
--------------Contents------------------
....................................System requirements
....................................Steps to follow
....................................Creating u-boot image
....................................Adding Custom packages in Yocto
....................................Creating fitimg.its and fitimg.itb files
....................................Creating fitimg.its
....................................Creating fitimg.itb
....................................Booting the system with BOOT.bin and fitimg.itb
....................................PetaLinux files
....................................Yocto files
....................................Commands to boot the system
....................................Useful URLs
We need following utilities to be installed on the system where we are generating the image using Yocto:
Following steps provide information on how to create a Yocto compiled image:
Command: git clone git://git.yoctoproject.org/poky.git
Commands: cd poky
git clone http://github.com/Xilinx/meta-xilinx
Commands: in poky dir : git checkout -b fido origin/fido
cd meta-xilinx
git checkout -b fido origin/fido
cd ..
Command: . ./oe-init-build-env build-zc702-zynq7
In conf/bblayers.conf : After the last value present for BBLAYERS ?= add
/home/xilinxfae/myData/proj/zc7000/sandbox/yocto/poky/meta-xilinx \
In conf/local.conf : After # Machine Selection add
MACHINE ??= "zc702-zynq7"
Command: bitbake core-image-minimal
Command: yocto-layer -create mylayer
Command: Create dir structure meta-mylayer/recipes-core/images
Vim myimage-image-minimal.bb inside images folder
Add below lines to the myimage-image-minimal.bb file :
SUMMARY = "extended image with some extra packages"
inherit core-image
IMAGE_INSTALL = " packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP}
${CORE_IMAGE_EXTRA_INSTALL} "
CORE_IMAGE_EXTRA_INSTALL += "smartpm"
Command: git://git.openembedded.org/meta-openembedded
/home/xilinxfae/myData/proj/zc7000/sandbox/yocto/poky/meta-mylayer \
/home/xilinxfae/myData/proj/zc7000/sandbox/yocto/poky/meta-openembedded/meta-oe \
MACHINE ??= "zc702-zynq7"
Command: bitbake myimage-image-minimal
Create file named fitimg.its and paste the following in the file:
/*
* fit2015_2.its
* If you cut and paste:
* - beware of dos/linux line endings
* - watch how special characters like double quotes copy over
*/
/dts-v1/;
/ {
description = "fit 2015.2 its";
/*timestamp = <12345678>; # Added by mkimage; do not add manually*/
#address-cells = <1>;
images {
kernel@1 {
description = "OSL 2015.2 kernel";
data = /incbin/("./zImage.gz");
type = "kernel";
arch = "arm";
os = "lin
ux";
compression = "gzip
";
load = <0x8000>;
entry = <0x8000>;
};
ramdisk@1 {
description = "OSL 2015.2 ramd
isk";
data = /incbin/("./ramdisk.image.gz");
type = "ramd
isk";
arch = "arm";
os = "lin
ux";
compression = "gzip
";
};
fdt@1 {
description = "OSL 2015.2 device tree blob";
data = /incbin/("./devicetree.dtb");
type = "flat
_dt";
arch = "arm";
compression = "none";
};
};
configurations {
default = "conf@1";
conf@1 {
description = "default configuration";
kernel = "kernel@1";
ram
disk = "ramdisk@1";
fdt = "fdt@1";
};
};
};
Create folder named FITImage and copy the following in the folder->
m
kdir FITImag
e
cp fitim
g.its FITimage/. /*The one we created in above step*/
cp
zImage FITimage/. /*The one we created using peta-linux command in PetaLinux project*/
cp sys
tem.dtb FITimage/devicetree.dtb /*From PetaLinux project*/
cp core-image-minimal****rootfs.cpio.gz .u-bootFITimag/urootfs.cpio.gz /*The one we
created using bitbake command*/
cd F
ITimage
gzip -9 < zImage > zImage.gz
dd if=urootfs.cpio.gz of=ramdisk.image.gz ibs=64 sk
ip=1
mkimage -f fitimg.its fitimg.itb
cp fit
img.itb <to sdcard. For us under /mnt/sdCard1 partition>
sync
Place the BOOT.bin from the PetaLinux project in the sdcard to boot.
Place the fitimg.itb created above in the sdcard.
https://github.com/kratsg/meta-l1calo/wiki/Building-and-Deploying-an-OS
http://layers.openembedded.org/layerindex/branch/master/layers/
Here you can see some additional packages that were added to the filesystem:
Figure 1 - Large filesystem support
Figure 2 - NFS support
Figure 3 - Package manager smart
09-09-2016 07:28 AM
What I exactly mean:
I have a custom platform developed with Vivado and a Linux running on it created with Petalinux Tools. It would be very nice now, if I was able to use SDSoC to create an application with some additional automatically generated hardware. The "problem" is sticking the results from SDSoc together with my custom Linux. So I wondered if there was a possibility to tell SDSoC to generate the Linux like I told the Petalinux Tools before.
09-09-2016 11:33 AM
You can use your custom Vivado design and Linux to create an SDSoC platform, using the processes and tools
described in the document "SDSoC Environment User Guide: Platforms and Libraries" http://www.xilinx.com/support/documentation/sw_manuals/xilinx2016_2/ug1146-sdsoc-platforms-and-libraries.pdf
An SDSoC platform includes hardware (Vivado design, XML metadata) and software (include files, libraries,
Linux kernel/filesystem/devicetree, XML metadata, etc) required to compile and link both the generated hardware
system and applications that use functions accelerated in the programmable logic (PL). The Linux you build using
PetaLinux just needs to be included as part of your custom platform's software data and SDSoC copies it into the SD card
image produced for applications built using your custom platform. The Linux included with SDSoC provided platforms are
not generated dynamically by SDSoC running PetaLinux, but are included in the form of pre-generated kernel, ramdisk
and devicetree files residing in individual platform folders in the installation.
The Linux you build does need to include kernel drivers required by SDSoC, and UG1146 provides documentation describing
how to do that.