Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cbrake/master #43

Merged
merged 4 commits into from
Oct 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
build
downloads
conf/auto.conf
conf/local.conf
conf/sanity_info
conf/site.conf
conf/locallocal.conf
conf/local.conf
pseudodone
git_config
subversion_config/
Expand Down
36 changes: 23 additions & 13 deletions conf/local.conf.sample
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
# Uncomment the following to enable systemd
#DISTRO_FEATURES_append = " systemd"
#VIRTUAL-RUNTIME_init_manager = "systemd"
#DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
#VIRTUAL-RUNTIME_initscripts = ""

# Uncomment the following to enable busybox init/dev/login
#VIRTUAL-RUNTIME_init_manager = "busybox"
#VIRTUAL-RUNTIME_dev_manager = "busybox-mdev"
#VIRTUAL-RUNTIME_login_manager = "busybox"
# this is a sample of what might go in local.conf

# Uncomment the following to enable musl libc
#TCLIBC = "musl"
# required for Freescale stuff to build
ACCEPT_FSL_EULA = "1"

# generate the mirror tarball for SCM repos
# BB_GENERATE_MIRROR_TARBALLS = "1"
# required for Qualcomm stuff to build
ACCEPT_EULA = "1"

# required to build netperf
LICENSE_FLAGS_WHITELIST = "non-commercial"

# use the following to set the IP or hostname
# for the oe_setup_feed_server function
# if you have a decent DHCP server, then this is often
# the same as MACHINE
export MACHINE_IP=$MACHINE

# When setting up feeds it will try to use this
# hosts IP address to configure the server on target
# machine, however if a different IP address is to be
# used then set it up here
export HOST_IP=10.10.10.10

# configure docker container to run bitbake in
export DOCKER_REPO=yoedistro/yoe-build:stretch
12 changes: 0 additions & 12 deletions conf/locallocal.conf.sample

This file was deleted.

7 changes: 3 additions & 4 deletions conf/local.conf → conf/site.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

# this following is for settings that are not checked into the build
# template -- see locallocal.conf.sample
include locallocal.conf
# site.conf is used for configuration settings that are checked into git,
# and are used by the entire team. For settings that are unique to a machine
# or user, and are not stored in git, please use local.conf.

# CONF_VERSION is increased each time build/conf/ changes incompatibly
CONF_VERSION = "1"
Expand Down
20 changes: 20 additions & 0 deletions conf/site.conf.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# local.conf should only be used for settings that are unique to a
# user or build machine. Settings that are common for the entire team
# should be added to site.conf, which is stored in git.

# Use the following to enable systemd
DISTRO_FEATURES_append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
VIRTUAL-RUNTIME_initscripts = ""

# Use the following to enable busybox init/dev/login
VIRTUAL-RUNTIME_init_manager = "busybox"
VIRTUAL-RUNTIME_dev_manager = "busybox-mdev"
VIRTUAL-RUNTIME_login_manager = "busybox"

# Use the following to enable musl libc
TCLIBC = "musl"

# configure docker container to run bitbake in
export DOCKER_REPO=yoedistro/yoe-build:stretch
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ included for some of them below.
OpenEmbedded supports a wide range of technology choices. Some of these are documented
below.

- [Configuration Files](conf-files.md)
- [libc/init system](libc-init.md)

## Design Choices
Expand Down
24 changes: 24 additions & 0 deletions docs/conf-files.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Configuration Files

[up](README.md)

OpenEmbedded is configured through "conf" files. These exist at various
[places](https://www.yoctoproject.org/docs/2.5.1/mega-manual/mega-manual.html#user-configuration)
in the sources. At the top level of the project are several files that
contain high level, or build specific configuration options. For the Yoe
project, these files include:

- **conf/auto.conf**: This file is automatically generated by the the build system
and should not be modified.
- [**conf/site.conf**](../conf/site.conf): This file includes Yoe defaults and
project specific changes that you want to store in git.
This [file](../conf/site.conf.sample) includes samples of things you might want to add.
- **conf/local.conf**: This file includes changes that are specified to a user to build
machine, and are not checked into git. This [file](../conf/local.conf.sample) includes
samples of things you might want to add.

The above configuration files are included into the build by the
[bitbake.conf](https://github.com/YoeDistro/openembedded-core/blob/master/meta/conf/bitbake.conf#L744) file in the OpenEmbedded Core layer.

For a full list of variables available in the OpenEmbedded build system, see the
[Variables Glossary](https://www.yoctoproject.org/docs/2.5.1/mega-manual/mega-manual.html#ref-variables-glos).
34 changes: 18 additions & 16 deletions docs/libc-init.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# libc and init system selection

[up](README.md)

## Systemd

SysVinit and Systemd are common init systems. SysVinit is the default, but Systemd can
Expand Down Expand Up @@ -36,22 +38,22 @@ TCLIBC = "musl"

## Comparison of disk spaced used

* Musl + Busybox init/dev/login
* space used in ext4 filesystem on running system using df: 1.9MB
* adding sizes of files in image from buildhistory: 1.5MB
* number of files in image: 595
* Busybox init/dev/login
* space used in ext4 filesystem on running system using df: 3.5MB
* adding sizes of files in image from buildhistory: 3.1MB
* number of files in image: 621
* SysVinit
* space used in ext4 filesystem on running system using df: 4.7MB
* adding sizes of files in image from buildhistory: 4.3MB
* number of files in image: 696
* Systemd
* space used in ext4 filesystem on running system using df: 33.2MB
* adding sizes of files in image from buildhistory: 22MB
* number of files in image: 1,806
- Musl + Busybox init/dev/login
- space used in ext4 filesystem on running system using df: 1.9MB
- adding sizes of files in image from buildhistory: 1.5MB
- number of files in image: 595
- Busybox init/dev/login
- space used in ext4 filesystem on running system using df: 3.5MB
- adding sizes of files in image from buildhistory: 3.1MB
- number of files in image: 621
- SysVinit
- space used in ext4 filesystem on running system using df: 4.7MB
- adding sizes of files in image from buildhistory: 4.3MB
- number of files in image: 696
- Systemd
- space used in ext4 filesystem on running system using df: 33.2MB
- adding sizes of files in image from buildhistory: 22MB
- number of files in image: 1,806

The space on disc used by a systemd image is much larger than adding the size of
the files in the image. We're not sure why this is -- perhaps there is filesystem
Expand Down
40 changes: 21 additions & 19 deletions envsetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ cd $OE_BASE

# incremement this to force recreation of config files. This should be done
# whenever the DISTRO, or anything major changes
BASE_VERSION=10
OE_ENV_FILE=localconfig.sh
YOE_ENV_VERSION=13
YOE_ENV_FILE=localconfig.sh

# Workaround for differences between yocto bitbake and vanilla bitbake
export BBFETCH2=True
Expand Down Expand Up @@ -157,41 +157,43 @@ fi
# If an env already exists, use it, otherwise generate it
#--------------------------------------------------------------------------

if [ -e ${OE_ENV_FILE} ]; then
. ./${OE_ENV_FILE}
if [ -e ${YOE_ENV_FILE} ]; then
. ./${YOE_ENV_FILE}
fi

if [ x"${BASE_VERSION}" != x"${SCRIPTS_BASE_VERSION}" ]; then
echo "BASE_VERSION mismatch, recreating ${OE_ENV_FILE}"
rm -f ${OE_ENV_FILE}
if [ x"${YOE_ENV_VERSION}" != x"${YOE_ENV_BASE_VERSION}" ]; then
echo "YOE_ENV_VERSION mismatch, recreating ${YOE_ENV_FILE}"
rm -f ${YOE_ENV_FILE}

elif [ x"${DISTRO_DIRNAME}" != x"${SCRIPTS_DISTRO_DIRNAME}" ]; then
echo "DISTRO name has changed, recreating ${OE_ENV_FILE}"
rm -f ${OE_ENV_FILE}
echo "DISTRO name has changed, recreating ${YOE_ENV_FILE}"
rm -f ${YOE_ENV_FILE}
fi

if [ -e ${OE_ENV_FILE} ]; then
. ./${OE_ENV_FILE}
if [ -e ${YOE_ENV_FILE} ]; then
. ./${YOE_ENV_FILE}
else

#--------------------------------------------------------------------------
# Specify distribution information
#--------------------------------------------------------------------------

echo "export SCRIPTS_BASE_VERSION=${BASE_VERSION}" >${OE_ENV_FILE}
echo "export SCRIPTS_DISTRO_DIRNAME=\"${DISTRO_DIRNAME}\"" >>${OE_ENV_FILE}
echo "# This is an automatically generated file, please do not edit" >${YOE_ENV_FILE}
echo "export YOE_ENV_BASE_VERSION=${YOE_ENV_VERSION}" >>${YOE_ENV_FILE}
echo "export SCRIPTS_DISTRO_DIRNAME=\"${DISTRO_DIRNAME}\"" >>${YOE_ENV_FILE}

echo "${OE_ENV_FILE} created"
echo "${YOE_ENV_FILE} created"

#--------------------------------------------------------------------------
# Write out the OE bitbake configuration file.
#--------------------------------------------------------------------------
mkdir -p ${OE_BUILD_DIR}/conf

SITE_CONF=${OE_BUILD_DIR}/conf/site.conf
cat >$SITE_CONF <<_EOF
AUTO_CONF=${OE_BUILD_DIR}/conf/auto.conf
cat >$AUTO_CONF <<_EOF
# This is an automatically generated file, please do not edit.

SCONF_VERSION = "1"
ACONF_VERSION = "1"

# Where to store sources
DL_DIR = "${OE_BASE}/downloads"
Expand All @@ -206,9 +208,9 @@ TMPDIR = "${OE_BUILD_DIR}/build/tmp"

_EOF

echo "${SITE_CONF} has been updated"
echo "${AUTO_CONF} has been updated"

fi # if -e ${OE_ENV_FILE}
fi # if -e ${YOE_ENV_FILE}

###############################################################################
# UPDATE_ALL() - Make sure everything is up to date
Expand Down