259 lines
7.9 KiB
Plaintext
259 lines
7.9 KiB
Plaintext
#@--------------------------------------------------------------------
|
|
#@TYPE: Distribution
|
|
#@NAME: Mortsgna
|
|
#@DESCRIPTION: Linux Distribution based on Angstrom
|
|
#@MAINTAINER: Andreas Müller <schnitzeltony@gmail.com>
|
|
#@--------------------------------------------------------------------
|
|
|
|
###############################################################################
|
|
# Global settings
|
|
###############################################################################
|
|
|
|
# follow Yocto version scheme
|
|
DISTRO_VERSION = "v3.3"
|
|
|
|
# With Angstrom we had DISTRO_TYPE = "debug"/"release". No recipe except
|
|
# good old lxdm takes care (yes it was me). OE-Core way is setting
|
|
# "debug-tweaks" in IMAGE_FEATURES. So if one wants to login with lxdm as
|
|
# root set below in your local.conf:
|
|
# DISTRO_TYPE = "debug"
|
|
|
|
# Set the toolchain type (internal, external) and brand (generic, csl etc.)
|
|
TOOLCHAIN_TYPE ?= "internal"
|
|
TOOLCHAIN_BRAND ?= ""
|
|
|
|
# Preferred providers
|
|
include conf/distro/include/mortsgna-preferred-providers.inc
|
|
|
|
# Add yocto mirros as fallback
|
|
MIRRORS += " \
|
|
bzr://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
|
|
cvs://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
|
|
git://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
|
|
gitsm://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
|
|
hg://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
|
|
osc://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
|
|
p4://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
|
|
svn://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
|
|
"
|
|
|
|
# Preserve original DISTRO value
|
|
USERDISTRO := "${DISTRO}"
|
|
DISTRO = "mortsgna"
|
|
DISTRO_NAME = "Mortsgna"
|
|
|
|
BUILDNAME = "Mortsgna ${DISTRO_VERSION}"
|
|
|
|
TARGET_VENDOR = "-mortsgna"
|
|
SDK_VENDOR = "-mortsgnasdk"
|
|
|
|
# Yocto work around for missing ONLINE_PACKAGE_MANAGEMENT support
|
|
ONLINE_PACKAGE_MANAGEMENT = "full"
|
|
|
|
# Default hash policy for distro
|
|
BB_SIGNATURE_HANDLER ?= "OEBasicHash"
|
|
|
|
# We want to build a superset for the default config
|
|
LICENSE_FLAGS_WHITELIST += "commercial"
|
|
|
|
# Can be "glibc" or "musl"
|
|
TCLIBC ?= "glibc"
|
|
|
|
# libc specific tweaks
|
|
require conf/distro/include/mortsgna-libc-${TCLIBC}.inc
|
|
|
|
# Add INHERITs
|
|
require conf/distro/include/mortsgna-inherits.inc
|
|
|
|
# Generate locales on the buildsystem instead of on the target. Speeds up first boot, set to "1" to enable
|
|
ENABLE_BINARY_LOCALE_GENERATION ?= "1"
|
|
|
|
# build UTF8 locales only
|
|
LOCALE_UTF8_ONLY = "1"
|
|
|
|
# Name the generated images in a sane way
|
|
IMAGE_NAME = "${DISTRO_NAME}-${IMAGE_BASENAME}-${TCLIBC}-${IMAGE_PKGTYPE}-${DISTRO_VERSION}-${MACHINE}"
|
|
DEPLOY_DIR_IMAGE = "${DEPLOY_DIR}/images/${MACHINE}"
|
|
|
|
# DISTRO_FEATURES
|
|
require conf/distro/include/mortsgna-distro-features.inc
|
|
|
|
# Toolchain virtuals:
|
|
require conf/distro/include/toolchain-${TOOLCHAIN_TYPE}.inc
|
|
|
|
|
|
###############################################################################
|
|
# ARM tweaks
|
|
###############################################################################
|
|
|
|
# thumb2 only
|
|
ARM_INSTRUCTION_SET ??= "thumb"
|
|
ARM_INSTRUCTION_SET:armv4 ?= "arm"
|
|
ARM_INSTRUCTION_SET:armv5 ?= "arm"
|
|
ARM_INSTRUCTION_SET:armv6 ?= "arm"
|
|
|
|
# set MORTSGNA_ARMV7_TUNE="1" in your local.conf to build armv7athf
|
|
require conf/distro/include/mortsgna-armv7-tune.inc
|
|
DEFAULTTUNE:mortsgna := "${@armv7_tune_handler(d)}"
|
|
|
|
|
|
###############################################################################
|
|
# Extra tweaks
|
|
###############################################################################
|
|
|
|
# Unbreak multimachine builds
|
|
LICENSE_DIRECTORY = "${DEPLOY_DIR}/licenses/${MACHINE_ARCH}"
|
|
|
|
# Shared state fixups
|
|
MACHINEOVERRIDES[vardepsexclude] += "SOC_FAMILY"
|
|
|
|
# qemu doesn't like this fp
|
|
ENABLE_BINARY_LOCALE_GENERATION_ep9312 = "0"
|
|
|
|
# qemu has taken a dislike to armeb as well
|
|
ENABLE_BINARY_LOCALE_GENERATION:armeb = "0"
|
|
|
|
# blacklist policy
|
|
PNBLACKLIST[pn-fso-apm] = "regular apmd is good enough"
|
|
PNBLACKLIST[weston-init] = "A passwordless root session reachable by two keys - security???"
|
|
PNBLACKLIST[packagegroup-core-x11] = "Conflicts with mortsgna-images"
|
|
PNBLACKLIST[xserver-nodm-init] = "Mortsgna-images use graphical display managers"
|
|
|
|
###############################################################################
|
|
# Quality & security hardening
|
|
###############################################################################
|
|
|
|
require conf/distro/include/security_flags.inc
|
|
|
|
# disable static libs
|
|
require conf/distro/include/no-static-libs.inc
|
|
|
|
# QA check settings - a little stricter than the OE-Core / poky for two reasons
|
|
# 1. They make sense
|
|
# 2. Many poky users out there might complain about my other layers or patches
|
|
# sent
|
|
# wait with 'mime' & 'mime-xdg' (meta-browser tests with old branches)
|
|
WARN_TO_ERROR_QA = " \
|
|
already-stripped compile-host-path install-host-path \
|
|
xorg-driver-abi textrel incompatible-license files-invalid infodir \
|
|
build-deps symlink-to-sysroot multilib \
|
|
installed-vs-shipped ldflags pn-overrides rpaths staticdev libdir \
|
|
uppercase-pn \
|
|
unknown-configure-option useless-rpaths host-user-contaminated \
|
|
invalid-packageconfig patch-fuzz src-uri-bad \
|
|
"
|
|
WARN_QA:remove = "${WARN_TO_ERROR_QA}"
|
|
ERROR_QA:append = " ${WARN_TO_ERROR_QA}"
|
|
|
|
###############################################################################
|
|
# Image defaults
|
|
###############################################################################
|
|
|
|
# image specific volatile logfile handlding with image feature 'volatile-log'
|
|
require conf/distro/include/mortsgna-image-logfile-volatile.inc
|
|
|
|
# For X11/Wayland images we install an unpriviledged user by default. If this
|
|
# is not desired override DISTRO_GUI_USER in your image or local.conf for all
|
|
# images
|
|
DISTRO_GUI_USER ?= "unpriv-user"
|
|
|
|
# If you don't want parts of this in your packagegroup-base using images you can put this in the image recipe:
|
|
# BAD_RECOMMENDATIONS = "<packages-to-remove>"
|
|
# or
|
|
# IMAGE_INSTALL:remove = "<packages-to-remove>"
|
|
#
|
|
# os-release: Distro release info on target
|
|
# kernel modules: ship fs modules so you can mount stuff and af-packet so networking works
|
|
# util-linux-mount util-linux-umount: busybox mount is broken or not really usable
|
|
# less: makes journalctl readable / coloured
|
|
#
|
|
# DEBUG_APPS: ship strace and procpc to make simple debugging a lot easier
|
|
DISTRO_EXTRA_RRECOMMENDS += " \
|
|
os-release \
|
|
default-locale \
|
|
\
|
|
kernel-module-vfat \
|
|
kernel-module-ext2 \
|
|
kernel-module-ext3 \
|
|
kernel-module-af-packet \
|
|
\
|
|
strace procps \
|
|
\
|
|
util-linux-mount util-linux-umount \
|
|
less \
|
|
"
|
|
|
|
# In case one wants to use packagegroup-basic: Prefer openssh over dropbear
|
|
# Note: to avoid redundancies TASK_BASIC_SSHDAEMON is used in this layer
|
|
TASK_BASIC_SSHDAEMON = " \
|
|
openssh-ssh openssh-sshd \
|
|
openssh-scp \
|
|
openssh-sftp openssh-sftp-server \
|
|
"
|
|
|
|
# Image features strongly suggested
|
|
EXTRA_IMAGE_FEATURES += " \
|
|
package-management \
|
|
empty-root-password \
|
|
allow-empty-password \
|
|
post-install-logging \
|
|
volatile-log \
|
|
"
|
|
|
|
# make x11-base a valid IMAGE_FEATURES
|
|
IMAGE_FEATURES[validitems] += "x11-base"
|
|
|
|
#
|
|
# udev, devfsd, busybox-mdev (from busybox) or none
|
|
#
|
|
IMAGE_DEV_MANAGER ?= "udev"
|
|
#
|
|
# sysvinit, upstart, systemd
|
|
#
|
|
IMAGE_INIT_MANAGER ?= "systemd"
|
|
IMAGE_INITSCRIPTS ?= "systemd-compat-units"
|
|
#
|
|
# busybox, getty
|
|
#
|
|
IMAGE_LOGIN_MANAGER ?= "busybox"
|
|
|
|
IMAGE_BOOT ?= "${IMAGE_INITSCRIPTS} \
|
|
${IMAGE_DEV_MANAGER} \
|
|
${IMAGE_INIT_MANAGER} \
|
|
${IMAGE_LOGIN_MANAGER}"
|
|
|
|
IMAGE_INSTALL += "${IMAGE_BOOT}"
|
|
|
|
# some default locales
|
|
IMAGE_LINGUAS:libc-glibc ?= "de-de fr-fr en-us en-gb es-es it-it"
|
|
|
|
# there are important missing I bet
|
|
IMAGE_LINGUAS_FULL ?= " \
|
|
af-za \
|
|
ar-sa \
|
|
da-dk \
|
|
de-de \
|
|
el-gr \
|
|
en-gb \
|
|
en-us \
|
|
es-es \
|
|
fi-fi \
|
|
fr-fr \
|
|
he-il \
|
|
hi-in \
|
|
hu-hu \
|
|
it-it \
|
|
ja-jp \
|
|
ko-kr \
|
|
nn-no \
|
|
ku-tr \
|
|
pl-pl \
|
|
pt-pt \
|
|
ru-ru \
|
|
sv-se \
|
|
vi-vn \
|
|
zh-cn \
|
|
"
|
|
# broken?
|
|
# tr-tr
|