All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergio Torres Soldado <torres.soldado@gmail.com>
To: Dimitris Tassopoulos <dimtass@gmail.com>
Cc: Yocto discussion list <yocto@yoctoproject.org>
Subject: Re: customising a bsp
Date: Mon, 1 Apr 2019 07:48:45 +0000	[thread overview]
Message-ID: <CAFuHCCANbbWqhEcXmv7Z921wZ+_8BEkChv+d07dQinHhwy9gvg@mail.gmail.com> (raw)
In-Reply-To: <CACKFPN02mVEou-e9A5SQs+WiQB-_Xm1yGkhrbnHiOACZjzUHjg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4724 bytes --]

Hi Dimitris,

 That is very versatile thanks. It is a way of solving the issue.

 Just as a side note this is what I did so far trying to separate the
changes to the machine:

 added the following to a layer I created:
.
|-- conf
|   `-- machine
|       `-- raspberrypi3-custom.conf

Initially raspberrypi3-custom.conf was just a copy of raspberrpi3.conf in
meta-raspberry but I get the following excerpt of an error:
"""
ERROR: linux-raspberrypi-1_4.14.98+gitAUTOINC+5d63a4595d-r0
do_kernel_metadata: Could not locate BSP definition for
raspberrypi3-custom/standard and no defconfig was provided
"""

To remedy this I added the following line to raspberrypi3-custom.conf:
"""
KBUILD_DEFCONFIG_raspberrypi3-custom ?= "bcm2709_defconfig
"""

But then I get the error:
"""
ERROR: bcm2835-bootfiles-20190212-r3 do_populate_lic: QA Issue:
bcm2835-bootfiles: LIC_FILES_CHKSUM points to an invalid file:
/opt/yocto/workspace/build/tmp/work/raspberrypi3_custom-poky-linux-gnueabi/bcm2835-bootfiles/20190212-r3/firmware-83977fe3b6ef54c1d29c83b0a778d330f523441f/boot/LICENCE.broadcom
[license-checksum]
ERROR: bcm2835-bootfiles-20190212-r3 do_populate_lic: Fatal QA errors
found, failing task.
ERROR: bcm2835-bootfiles-20190212-r3 do_populate_lic: Function failed:
populate_lic_qa_checksum
ERROR: Logfile of failure stored in:
/opt/yocto/workspace/build/tmp/work/raspberrypi3_custom-poky-linux-gnueabi/bcm2835-bootfiles/20190212-r3/temp/log.do_populate_lic.30228
"""

I ended up editing raspberrypi3.conf directly basically branching
meta-raspberrypi.


On Mon, 1 Apr 2019 at 08:27, Dimitris Tassopoulos <dimtass@gmail.com> wrote:

> Hi Serj,
>
> I'm using the -r / -R options in bitbake in order to customize the image
> via global
> variables and be able to build different configurations for the same
> machine and
> distro. You you use the same option to create e.g. different versions.
> Have a look
> in the documentation
>
>
> https://www.yoctoproject.org/docs/1.6/bitbake-user-manual/bitbake-user-manual.html
>
> search for these lines:
> -r PREFILE, --read=PREFILE
> -R POSTFILE, --postread=POSTFILE
>
> What those do is that you can add an extra configuration file wich either
> prepends
> or appends the local.conf file. I'm using it both ways, but for your case
> I think you
> need to add your default versions with ?= in the local.conf and then
> override them
> with an external conf file and use --read option.
>
> So, let's say that you have the minimal-image then you can have a number or
> versioned configuration files (e.g. version-1.0.conf, version-1.2.conf,
> e.t.c.) then
> you setup your environment as usual using your environment setup scripts or
> just calling oe-init-build-env for your machine and then you'll be able to
> build
> different versions like this:
>
> bitbake -R version-1.0.conf minimal-image
>
>
> You can also build a single recipe using the version file
>
> bitbake -R version-1.2.conf virtual/kernel
>
>
> Then, if you like, you can create a wrapper script that actually
> simplifies the call
> and just pass the version. For example, you can create an executable bash
> script
> and these
>
> #!/bin/bash
>> CONF_VERSION="1.0"
>> while getopts v:h" OPTION
>> do
>>     case $OPTION in
>>     v) CONF_VERSION=${OPTARG} ;;
>>     h) echo "Print some help" ;;
>>     *) echo "Print some help" ;;
>> esac
>> done
>> bitbake --postread=${CONF_VERSION} ${1}
>
>
> And then call the script using -v to pass the version. Of course, that
> assumes
> that all version files are in the same folder with the local.conf. I
> usually make
> such scripts but they are doing much more stuff, for example use variables
> from the extra conf file to run other tasks.
>
> Hope that helps.
>
> Cheers,
> Dimitris
>
> Sergio Torres Soldado <torres.soldado@gmail.com> schrieb am Sa., 30. März
> 2019, 18:34:
>
>> Hi,
>>
>>  What is the best alternative to setting variables in local.conf? The
>> specific use-case is customising a meta-raspberrypi build, which has a
>> bunch of variables that are picked up by the MACHINE code to influence
>> build configurations. I want to version these customisations hence removing
>> them from local.conf.
>>
>>  I have tried adding a machine definition in a separate layer that
>> includes the same files as those from the machines in meta-raspberry pi but
>> there is logic that depends on the machine name and building an image fails.
>>
>> Many thanks,
>> Serj.
>> --
>> _______________________________________________
>> yocto mailing list
>> yocto@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto
>
>

[-- Attachment #2: Type: text/html, Size: 7200 bytes --]

  reply	other threads:[~2019-04-01  7:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-30 17:33 customising a bsp Sergio Torres Soldado
2019-04-01  7:27 ` Dimitris Tassopoulos
2019-04-01  7:48   ` Sergio Torres Soldado [this message]
2019-04-01 14:45     ` Paul Barker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFuHCCANbbWqhEcXmv7Z921wZ+_8BEkChv+d07dQinHhwy9gvg@mail.gmail.com \
    --to=torres.soldado@gmail.com \
    --cc=dimtass@gmail.com \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.