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

Yet more image minification #277

Merged
merged 12 commits into from
Feb 18, 2022
Merged
7 changes: 6 additions & 1 deletion meta-ov/conf/distro/ovlinux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ POKY_DEFAULT_EXTRA_RDEPENDS = "packagegroup-core-boot"
POKY_DEFAULT_EXTRA_RRECOMMENDS = "kernel-module-af-packet"

PACKAGECONFIG:remove:pn-glibc = "nscd"
PACKAGECONFIG:remove:pn-systemd = "binfmt hibernate ima machined nss-mymachines quotacheck zstd"
PACKAGECONFIG:remove:pn-systemd = "binfmt hibernate idn ima kmod machined myhostname nss nss-mymachines nss-resolve quotacheck seccomp sysvinit userdb utmp xz zstd"
PACKAGECONFIG:append:pn-systemd = " cgroupv2"
PACKAGECONFIG:remove:pn-connman = "wispr"
PACKAGECONFIG:remove:pn-libarchive = "libxml2 bz2 lzo zstd"
PACKAGECONFIG:remove:pn-opkg-utils = "python"
Expand All @@ -55,6 +56,10 @@ PACKAGECONFIG:remove:pn-alsa-plugins = "samplerate speexdsp"
PACKAGECONFIG:remove:pn-librsvg = "gdkpixbuf"
PACKAGECONFIG:remove:pn-librsvg-native = "gdkpixbuf"

PACKAGECONFIG:remove:pn-mesa = "virgl panfrost"
EXTRA_OEMESON:remove:pn-mesa = " -Dgles1=enabled"
EXTRA_OEMESON:append:pn-mesa = " -Dgles1=disabled"

DEPENDS:remove:pn-libpcre = "bzip2 zlib"

DEPENDS:remove:pn-gdk-pixbuf-native = "shared-mime-info-native"
Expand Down
6 changes: 2 additions & 4 deletions meta-ov/recipes-apps/sensord/files/sensord.service
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
[Unit]
Description=Sensor Daemon for Openvario Sensorboard
After=syslog.target

[Service]
Type=forking
ExecStart=/opt/bin/sensord -c /opt/conf/sensord.conf
ExecStart=/opt/bin/sensord -f -c /opt/conf/sensord.conf
Restart=on-abort

[Install]
WantedBy=multi-user.target
WantedBy=multi-user.target
3 changes: 1 addition & 2 deletions meta-ov/recipes-apps/variod/files/variod.service
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ Requires=pulseaudio.service
After=pulseaudio.service

[Service]
Type=forking
ExecStart=/opt/bin/variod -c /opt/conf/variod.conf
ExecStart=/opt/bin/variod -f -c /opt/conf/variod.conf
Restart=on-abort

[Install]
Expand Down
14 changes: 13 additions & 1 deletion meta-ov/recipes-bsp/alsa-state/alsa-state.bbappend
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
FILESEXTRAPATHS:prepend := "${THISDIR}:"
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

# we have a different asound.state file for different machines
PACKAGE_ARCH = "${MACHINE_ARCH}"

SRC_URI += "file://run-lock.conf"

do_install:append() {
install -d ${D}${exec_prefix}/lib/tmpfiles.d
install -m 0644 ${WORKDIR}/run-lock.conf ${D}${exec_prefix}/lib/tmpfiles.d/
}

FILES:alsa-states:append = " ${exec_prefix}/lib/tmpfiles.d/run-lock.conf"
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ state.sun4icodec {
dbvalue.0 -400
}
}
control.2 {
control.8 {
iface MIXER
name 'Left Mixer Left DAC Playback Switch'
value false
Expand All @@ -23,7 +23,7 @@ state.sun4icodec {
count 1
}
}
control.3 {
control.13 {
iface MIXER
name 'Right Mixer Right DAC Playback Switch'
value true
Expand All @@ -33,7 +33,7 @@ state.sun4icodec {
count 1
}
}
control.4 {
control.14 {
iface MIXER
name 'Right Mixer Left DAC Playback Switch'
value true
Expand All @@ -43,7 +43,7 @@ state.sun4icodec {
count 1
}
}
control.5 {
control.15 {
iface MIXER
name 'Power Amplifier DAC Playback Switch'
value true
Expand All @@ -53,7 +53,7 @@ state.sun4icodec {
count 1
}
}
control.6 {
control.16 {
iface MIXER
name 'Power Amplifier Mixer Playback Switch'
value true
Expand All @@ -63,7 +63,7 @@ state.sun4icodec {
count 1
}
}
control.7 {
control.17 {
iface MIXER
name 'Power Amplifier Mute Switch'
value true
Expand Down
4 changes: 4 additions & 0 deletions meta-ov/recipes-bsp/alsa-state/files/run-lock.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# alsactl wants to create /run/lock/asound.state.lock, and systemd
# creates /run/lock only if legacy sysv support is enabled (which
# OpenVario does not)
d /run/lock 0755 root root -
9 changes: 9 additions & 0 deletions meta-ov/recipes-core/images/openvario-base-image.bb
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,12 @@ mask_systemd_units() {
}

ROOTFS_POSTPROCESS_COMMAND += "mask_systemd_units;"

delete_uimage() {
# delete the redundant uImage from the root partition; another
# copy is on the /boot partition, and that one is used by
# u-boot
rm -f ${IMAGE_ROOTFS}/boot/uImage*
}

ROOTFS_POSTINSTALL_COMMAND += "delete_uimage;"
9 changes: 9 additions & 0 deletions meta-ov/recipes-debloat/alsa-lib/alsa-lib_%.bbappend
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# those ALSA definitions are useless for OpenVario, and omitting them
# saves 2 MB

RDEPENDS:alsa-lib:remove = "alsa-ucm-conf"
RDEPENDS:libatopology:remove = "alsa-topology-conf"

do_install:append () {
rm -rf ${D}${datadir}/alsa/cards ${D}${datadir}/alsa/ctl ${D}${datadir}/alsa/pcm
}
2 changes: 2 additions & 0 deletions meta-ov/recipes-kernel/linux/files/sound.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
CONFIG_SOUND=y
CONFIG_SND=y
CONFIG_SND_HRTIMER=y
# CONFIG_SND_SUPPORT_OLD_API is not set
# CONFIG_SND_DRIVERS is not set
# CONFIG_SND_ARM is not set
# CONFIG_SND_SPI is not set
Expand Down