Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

yocto and bitbake

Altera_Forum
Honored Contributor II
2,197 Views

Hello, 

 

I started to work with yocto linux and bitbake. Therefore, I followed some howtos to understand the topic. One of them [1] describes the way to use a self compiled preloader/bootloader, kernel and filesystem. I don't understand how the command: bitbake u-boot  

knows, which preloader or bootloader it has to bake? 

 

Can somebody help me to solve these puzzels? 

 

Greetings, 

 

Stefan 

 

[1] rocketboards.org/foswiki/Documentation/GitGettingSTarted
0 Kudos
12 Replies
Altera_Forum
Honored Contributor II
1,112 Views

bitbake u-boot 

 

The altera-init script in your yocto directory sets up the recipe file (*.bb) order search for bitbake and it will eventually find a recipe that has a PROVIDES "u-boot" which seems to be found under yocto/meta-altera/recipes-bsp[/B][/B][/B][/B][/B][/B][/B][/B][/B][/B] in my altera yocto distribution. Note that bitbake virtual/bootloader is synonymous with bitbake u-boot. 

 

Regards,
0 Kudos
Altera_Forum
Honored Contributor II
1,112 Views

 

--- Quote Start ---  

bitbake u-boot 

 

The altera-init script in your yocto directory sets up the recipe file (*.bb) order search for bitbake and it will eventually find a recipe that has a PROVIDES "u-boot" which seems to be found under yocto/meta-altera/recipes-bsp in my altera yocto distribution. Note that bitbake virtual/bootloader is synonymous with bitbake u-boot. 

 

Regards, 

--- Quote End ---  

 

 

I have the same issues as original poster. 

I've been staring at the scripts and can't seem to find out how 'bitbake' is building the appropriate files. 

I can't find where I would update the .dts file for a new build??? 

 

If I were to make a small change in Qsys and want to update the Device Tree, I can't seem to find where I would update that info for the linux build. 

 

Everything on rocketboards explains how to build the pre-set up projects, but nothing on creating new/customizing the existing projects. 

 

Anyone have some direction on creating a custom build (based off the SoC examples)?? 

 

Thanks, 

 

Mike
0 Kudos
Altera_Forum
Honored Contributor II
1,112 Views

hi.. im new to yocto and bitbake.. can u pls help me how to start work in it...?

0 Kudos
Altera_Forum
Honored Contributor II
1,112 Views

for boot loader, bitbake virtual/bootloader 

for kernel, bitbake virtual/kernel 

for files system, bitbake core-image-minimal
0 Kudos
Altera_Forum
Honored Contributor II
1,112 Views

Yocto has taken me quite awhile to work things out, but in short, there are two very useful commands: 

 

bitbake 

bitbake-layers 

 

The bitbake-layers command can be used along with show-layers, show-overlayed, or show-recipes to print out evverything available, the active version of the recipes, etc. 

 

If you want to examine a specific recipe, you can walk it back, layer-by-layer, and running "bitbake-layers help" will give a nice printout of how to find cross-dependencies and similar. 

 

For the dts/dtb, these are machine specific, and are defined in the MACHINE files. A good description of this can be found here: https://community.freescale.com/thread/339128. Now if you're really interested in the Altera implementation, it's part of meta-altera/recipes-kernel/linux/linux-altera.inc, where it uses the default dtb files. to really make your own, you'd probably want to make a new layer that pulls them from were you want or copies them over directly yourself.
0 Kudos
Altera_Forum
Honored Contributor II
1,112 Views

what operating system that you are using? i know some ubnutu version giving so much problem to the users. !

0 Kudos
Altera_Forum
Honored Contributor II
1,112 Views

 

--- Quote Start ---  

what operating system that you are using? i know some ubnutu version giving so much problem to the users. ! 

--- Quote End ---  

 

 

I'd love to hear about these problems, as poky is just a system built in Python and dependencies can be automatically pulled when recipes are built. Personally, I use a Debian-variant, Mint, as I don't like where Ubuntu has gone with how they deal with apt repositories and the UI. I haven't tried with cygwin and Windows yet, as I run all my tools within a VM. Is there an issue with newer kernels, maybe? 

 

I'm also derim... I somehow ended up with 2 accounts.
0 Kudos
Altera_Forum
Honored Contributor II
1,112 Views

 

--- Quote Start ---  

If I were to make a small change in Qsys and want to update the Device Tree, I can't seem to find where I would update that info for the linux build. 

--- Quote End ---  

 

 

Mike, I've been building the DTS separately and loading it on myself. To really do things correctly, you'd need to create a new Yocto BSP for your board based on the socfpga one, and then modify all of the recipes to pull the correct dts files, etc. What I do is build Linux and the kernel using Yocto, while the preloader and u-boot through the Altera tools. Really I could do a custom u-boot as well for other drivers, but I like how tightly coupled the preloader process is using the bsp-editor. You can see what I've done here: http://www.alteraforum.com/forum/showthread.php?t=50270 

 

The dts/dtb is purely based on the FPGA design and maybe preloader and is decoupled, so.... If you dig down in to the poky recipe structure, you can see that the default dtb is included in the linux-socfpga-ltsi (or other) repository. You could always create a recipe patch to have it use your own, instead, but why rebuild linux every time your devicetree changes? Just run the sopc2dts command and dump them wherever they need to go. Much easier. And you're more than welcome to ask me directly or post here-- people are quite helpful. Also: http://rocketboards.org/foswiki/documentation/gsrd141sdcardarrowsockitedition#creating_sd_card_image_using_rebuilt_binaries and http://rocketboards.org/foswiki/documentation/gsrd131programmingfpga#gsrd_fpga_configuration give much clearer ideas about what's actually going on.
0 Kudos
Altera_Forum
Honored Contributor II
1,112 Views

Ok, I'm having a nightmare with yocto and linux too. I think it's different to the above, but here goes: 

I am running Ubuntu 12.04 LTS on a virtual machine (Oracle VM Virtualbox).  

I'm using the latest version of linux/yocto etc from here: http://rocketboards.org/foswiki/view/documentation/gsrd150compilinglinuxarrowsockitedition 

If I try and build the kernel, it gets most of the way along but has stopped every time trying to download socfpga-3.10-ltsi with "git://github.com/altera-opensource/linux-socfpga.git;protocol=https;branch=socfpga-3.10-ltsi". 

If I copy the job from ps -fT xxx | more into a script and run it from there, it runs and downloads fine. 

eg: /bin/sh -c export SSH_AGENT_PID="1502"; export SSH_AUTH_SOCK="/tmp/keyring-DOkxUK/ssh"; export PATH="/home/user/poky2/angstrom-socfpga/sources/openembedded-core/scripts:/home/user/poky2/angstrom-socfpga/build/tmp-angstrom_v2014_12-glibc/sysroots/i686-linux/usr/bin/arm-angstrom-linux-gnueabi:/home/user/poky2/angstrom-socfpga/build/tmp-angstrom_v2014_12-glibc/sysroots/cyclone5/usr/bin/crossscripts:/home/user/poky2/angstrom-socfpga/build/tmp-angstrom_v2014_12-glibc/sysroots/i686-linux/usr/sbin:/home/user/poky2/angstrom-socfpga/build/tmp-angstrom_v2014_12-glibc/sysroots/i686-linux/usr/bin:/home/user/poky2/angstrom-socfpga/build/tmp-angstrom_v2014_12-glibc/sysroots/i686-linux/sbin:/home/user/poky2/angstrom-socfpga/build/tmp-angstrom_v2014_12-glibc/sysroots/i686-linux/bin:/home/user/poky2/angstrom-socfpga/sources/openembedded-core/scripts:/home/user/poky2/angstrom-socfpga/sources/bitbake/bin:/opt/altera-linux/linaro/gcc-linaro-arm-linux-gnueabihf-4.7-2012.11-20121123_linux/bin/:/home/user/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"; export HOME="/home/user"; git -c core.fsyncobjectfiles=0 clone --bare --mirror https://github.com/altera-opensource/linux-socfpga.git /home/user/poky2/angstrom-socfpga/sources/downloads/git2/github.com.altera-opensource.linux-socfpga.git 

 

So why will it work from the command line, download anything else with bitbake, but it can't do this one. 

And having downloaded it into the right directory, it still wants to download it again, but presumably that's because it can't flag that it's done it rather than me.
0 Kudos
Altera_Forum
Honored Contributor II
1,112 Views

it could be night mare when one using different linux os that away from the one had been recommended, or using upgraded os version.

0 Kudos
Altera_Forum
Honored Contributor II
1,112 Views

They suggest 12.04, I'm using 12.04 LTS. What's the problem? Why would it work on the command line but not with bitbake?  

 

But thank you for replying, because it's nice to know that some people reply! Some threads don't get any replies.
0 Kudos
Altera_Forum
Honored Contributor II
1,112 Views

could you show which kernel version and page you refer to build your kernel? you need to use the OS version exactly or slightly newer, from my past experience is that you getting so much trouble for all prerequisite tools with your operating system !

0 Kudos
Reply