Topics

#apt #linux #yocto #raspberrypi., apt, gcc, sudo not present #yocto #apt #linux


Siddhartha V
 

Hello,

  I built the image for Raspberrypi3B+ board. But when boot the board gcc, apt, sudo were not there. Actually only the poweron and poweroff and few basic commnds like, ls, mkdir, whoami were working. May I konw what wrong I did while building please.

I am using yocto warrior. I used "bitbake core-image-base" command for building.

My bblayers.conf is as below:

# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
POKY_BBLAYERS_CONF_VERSION = "2"
 
BBPATH = "${TOPDIR}"
BBFILES ?= ""
 
BBLAYERS ?= " \
  /home/siddhu/Documents/yocto/sources/poky/meta \
  /home/siddhu/Documents/yocto/sources/poky/meta-poky \
  /home/siddhu/Documents/yocto/sources/poky/meta-yocto-bsp \
  /home/siddhu/Documents/yocto/sources/meta-openembedded/meta-oe \
  /home/siddhu/Documents/yocto/sources/meta-openembedded/meta-multimedia \
  /home/siddhu/Documents/yocto/sources/meta-openembedded/meta-python \
  /home/siddhu/Documents/yocto/sources/meta-openembedded/meta-networking \
  /home/siddhu/Documents/yocto/sources/meta-openembedded/meta-filesystems \
  /home/siddhu/Documents/yocto/sources/meta-raspberrypi \
  "

My local.conf file I have added the below details:

MACHINE ??= "raspberrypi3"
PACKAGE_CLASSES ?= "package_rpm"
CONF_VERSION = "1"
IMAGE_FEATURES += "ssh-server-dropbear"


Mark Van De Vyver <mark@...>
 

Hi Siddhartha,
Caveat: This is generally what I've done, and not specific to any rpi or rhel setup....
 
If you run `bitbake -e core-image-base | grep "^IMAGE_FEATURES" you'll be able to see what was configured.
You can also filter *_FEATURES to get a better idea of what went on in terms of machine and compatible features.
 
Next, with that data in mind you can read the ./<build-folder>/bitbake-cookerdaemon.log
When reading this you will see various files are loaded - opening each of them in turn you might see some code that turns off what you expected to have installed.
Or you might notice that the packages you expected to be installed were never put forward for installation.
 
Not sure if that helps.  I've run into some wrinkles where a package wasn't available, and became so only after adding a 'seemingly' (to me that is) unrelated layer - but in those cases I got a warning the package could not be found.  Sounds like that **is not** happening here.  Sorry I can't be of better assistance.

HTH?

 


Josef Holzmayr <holzmayr@...>
 

Howdy!

Am 27.05.2020 um 12:06 schrieb Siddhartha V:
Hello,
  I built the image for Raspberrypi3B+ board. But when boot the board gcc, apt, sudo were not there. Actually only the poweron and poweroff and few basic commnds like, ls, mkdir, whoami were working. May I konw what wrong I did while building please.
This sounds like you actually want an ubuntu. Why not just use it, then? Beating a yocto build into shape will always just leave you wanting and complaining, unless you are willing to get rid of your assumptions.

Hint:
The frist things you have to get out of your head are expecting apt, sudo and gcc on the board.

Reasoning:
- no apt, because the images are usually constructed at build time including all expected software. Runtime package management is actually rarely needed.
- no sudo, because you can just log in as whatever user you want to. And in the product case it has no use because usually people do not login, hence no need for its security means.
- no gcc, because all compilation is meant to happen at image building time, or at least on the development host.

Of course this is only a very generic, top-level explanation and use cases diffee. But If the mindset does not fit right from the beginning, then there only lies trouble ahead.

Greetz

--
_____________________________________________________________
R-S-I Elektrotechnik GmbH & Co. KG
Woelkestrasse 11
D-85301 Schweitenkirchen
Fon: +49 8444 9204-0
Fax: +49 8444 9204-50
www.rsi-elektrotechnik.de

_____________________________________________________________
Amtsgericht Ingolstadt - GmbH: HRB 191328 - KG: HRA 170363
Geschäftsführer: Dr.-Ing. Michael Sorg, Dipl.-Ing. Franz Sorg
USt-IdNr.: DE 128592548


Ross Burton
 

On Wed, 27 May 2020 at 11:06, Siddhartha V <Siddhuvgowda.18695@...> wrote:
Hello,

  I built the image for Raspberrypi3B+ board. But when boot the board gcc, apt, sudo were not there. Actually only the poweron and poweroff and few basic commnds like, ls, mkdir, whoami were working. May I konw what wrong I did while building please.

I am using yocto warrior. I used "bitbake core-image-base" command for building.

You did nothing wrong, precisely. core-image-base is a base image that doesn’t do much beyond boot into a working command line environment.

If you want a working toolchain (gcc and friends) on the image then add “tools-sdl” to IMAGE_FEATURES. By default toolchains are not included because they’re huge and not needed.

If you want apt then first change the package manager to deb by changing your explicit assignment of PACKAGE_CLASSES. This builds the image with apt, and if you also want a working apt and package database in the image then add package-management to IMAGE_FEATURES.

To add sudo, simple add sudo to IMAGE_INSTALL.

I recommend looking up those variables in the documentation to understand what they do.

Ross