Building linux and rootfs using Angstrom/Yocto

Hello,
I am trying to build the linux kernel and rootfs using the GSRD documentation for cyclone V soc using this link ( https://rocketboards.org/foswiki/Documentation/GSRDCompilingLinux) .

When i come to the step MACHINE=cyclone5 . ./setup-environment i see an error saying that the folder setup-environment does not exist. not sure how to go about this. any inputs would be greatly appreciated!

posting the screenshot of what i see

Hi,

Are you seeing setup-environment or setup-environment-internal in angstrom-build/ ?

it looks like they only change its name when you do repo sync

<project name="Angstrom-distribution/meta-angstrom" path="layers/meta-angstrom" remote="github" revision="angstrom-v2019.06-warrior">
<copyfile dest="setup-environment" src="setup-environment-internal"/>

I’m not sure if .repo/local_manifests/altera.xml can append/overwrite to default.xml (i’m not a repo-tool expert) but if after you do repo sync you can’t see setup-environment* scripts maybe is because the altera.xml manifest… can you post your .repo/manifest.xml (it is a soft link to the real one)

1 Like

hello,
from your reply, i noticed that the setup-environment file was not in the angstrom-build folder. it was outside it. does it need to be in that folder? also the name is setup-environment.

after moved the file to the angstrom-build folder, and run Machine=cyclone5… command, i see the below, which i assume is correct??

looks like your Yocto setup is right you should now be able to run bitbake try to bake a simple image like

$bitbake core-image-minimal

or the ones suggested…

when i implement the next step i see the below error. it doesnt make sense though since i see the folder conf and the file bblayers.conf

looks like you are messing things up with sed command probably a space before a backslash, not sure i’m not familiar with regexp, but they put this to add meta-altera-refdes to bblayers, bitbake already has a tool for this(if you don’t want to manually edit the bblayers file).

you can add a meta-layer with

$ bitbake-layers add-layer /path/of/meta-altera-refdes

when i try to execute the bitbake command, it says command not found. does the bitbake folder need to be in the angstrom_build folder?

No, bitbake will be available whenever you setup your build environment, commonly using oe-init-build-env but it looks like your setup-environment script set your PATH already.

Short Answer : You will only be available to run bitbake after sourcing your setup-environment script.

okay. i am a novice and have trouble understanding this. what does sourcing the setup-environment script mean? how do i do that. sorry for asking a lot of questions. thanks for taking the time again!

Don’t worry I’m glad to help,

By sourcing the setup-environment i mean this step

$MACHINE=arria10 . ./setup-environment

The ’ . ’ before ./setup-environment means that you are sourcing the script and not executing it, more info here

i executed the above step. and i still see the same message.i wonder what i could be doing wrong.

could you post the output of the following please

$ env | grep ^PATH

spappu@spappu-linux:/local/mnt/workspace/angstrom-build$ env | grep ^PATH
PATH=/local/mnt/workspace/angstrom-build/layers/openembedded-core/scripts:/local/mnt/workspace/angstrom-build/bitbake/bin:/local/mnt/workspace/angstrom-build/.repo/repo:/local/mnt/workspace/rsync-3.1.1:/pkg/hwtools/vendors/mentor/startup:/pkg/qcaetools/asic/bin:/pkg/wts/qct/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/pkg/icetools/bin:/pkg/hwtools/bin:/pkg/netscape/bin:/pkg/gnu/bin:/pkg/qcaetools/syseng/bin:/prj/vlsi/tools/bin:/pkg/qcaetools/rfeng/bin:/pkg/zip/bin:/pkg/qcaetools/digeng/bin:/pkg/qcaetools/itag/

Ok it looks like the setup script is doing its job, i just follow the steps that you should be following and this is what your angstrom dir should be looking after a $repo sync

angstrom-repo-sync

Then after sourcing the setup script i can run bitbake as you can see in the following image

Also, I notice that if i add a build_test where i want to keep my build configuration isolated it can’t find the “layers” dir… i think they only give the option to have just one builddir i.e. angstrom-build.

I think what you did wrong was to badly export your PATH

export PATH=$PATH:~/angstrom-build

you probably need to change to

export PATH=$PATH:/local/mnt/workspace/yocto/angstrom-build

when you first setup angstrom-build dir.

I don’t know why you have meta-* outside angstrom-build not sure if you are also using linux-socfpga-gsrd-13.1-src.bsx to setup your build-environment… you should be following just one set of instructions and not mixing them if you are not really sure what you are doing.

Probably the only thing that you need is as you said move bitbake dir to your angstrom-build/, but i don’t know if this bitbake dir that you have in there was the one downloaded by repo sync operation or linux-socfpga-gsrd-13.1-src.bsx install method. You should be using the one that corresponds with the version of your meta-*

on your suggestion, i moved the bitbake folder to theangstrom-build environment. i honestly dont know if that folder was from another project i was working on. i don’t think i organised these folders right. i probably need to delete this folder and re-do it.
after i moved the bitbake folder, i tried the bitbake command to run into another error.

Yes, you will probably need to delete these dirs and start all over again remember to set properly your PATH before you do repo sync.

About the error looks like you missed the following instructions:

$ sed -i ‘/meta-altera/a \ \ ${TOPDIR}/layers/meta-altera-refdes \’ conf/bblayers.conf # This is to add the meta-altera-refdes layer to conf/bblayers.conf
$ sed -i ‘/meta-atmel/d’ conf/bblayers.conf # this has conflicting packages
$ sed -i ‘/meta-freescale/d’ conf/bblayers.conf # this has conflicting packages
$ echo “DISTRO_FEATURES_remove = " wayland "” >> conf/local.conf # broke builds prior to this not needed for GSRD
$ echo “DISTRO_FEATURES_remove = " alsa "” >> conf/local.conf # breaking builds prior to this not needed for GSRD
$ rm layers/meta-altera-refdes/recipes-devtools/socfpga-test/socfpga-test_1.0.bb # developmental unit tests stub for older kernels
$ export KERNEL_PROVIDER=linux-altera-ltsi
$ export KERNEL_TAG=refs/tags/ACDS19.3_REL_GSRD_PR
$ export KBRANCH=socfpga-4.14.130-ltsi
$ export BB_ENV_EXTRAWHITE=“$BB_ENV_EXTRAWHITE KBRANCH KERNEL_TAG UBOOT_TAG KERNEL_PROVIDER”

i did a cleanup of the folders and started the process again. it went much smoother than before though i did encounter an error in the last step which was different than the previous errors that i saw. one question that i have about repo sync is, whenever i executed that command, i saw the .repo folder come up in a different folder. how do i have it sync in the folder that i want?
below is what i see now…

this is my directory

hi @Mikernl ,
any thoughts on the above error?