Adding Astro stuff

This commit is contained in:
Adam Boardman 2023-04-04 19:51:11 +01:00
parent 95708b4aa7
commit 9057854aa9
10 changed files with 316 additions and 4 deletions

125
astroslide.yaml Normal file
View file

@ -0,0 +1,125 @@
{{- $image := or .image "gemian-astroslide.tgz" -}}
{{- $output := or .output "tarball" -}}
{{- $variant := or .variant "mate" -}}
architecture: arm64
actions:
- action: recipe
description: Setup Gemian rootfs
recipe: gemian-common.yaml
- action: overlay
description: Adding Astro Slide overlay
source: overlay/astroslide
destination: /
- action: apt
description: Installing additional Debian packages
packages: [ curl, gnupg, openssh-server, sudo ]
- action: apt
description: Installing Astro Slide-specific packages
target-device: mt6873
packages:
# - bluebinder
# - media-hub
# - gemian-system
# - lxc-android
- lxc
- debhelper
- lxcfs
- uidmap
- libglx-mesa0
- libgl1-mesa-dri
- astro-linux-kernel
- devscripts
- build-essential
- kexec-tools
- action: run
description: Generate /usr/share/kernel/astroslide-boot.img for Astro Slide
chroot: true
command: /usr/sbin/update-gemian-boot-image astroslide
- action: run
description: Generate /usr/share/kernel/astroslide-boot-lvm-gemian-bullseye.img for Astro Slide
chroot: true
command: /usr/sbin/update-gemian-boot-image astroslide gemian-bullseye
- action: run
chroot: true
command: echo astroslide > /etc/hostname
- action: run
chroot: true
command: echo "127.0.0.1 astroslide" >> /etc/hosts
- action: run
chroot: true
description: Add apt sandbox user to Android inet group
command: sed -i 's/_apt:x:100:65534/_apt:x:100:3003/g' /etc/passwd
- action: run
chroot: true
description: depmod kernel modules
command: depmod -a 4.4.146
{{ if eq $variant "lxqt" }}
# - action: recipe
# recipe: variants/lxqt.yaml
{{ end }}
{{ if eq $variant "mate" }}
# - action: apt
# description: Installing MATE desktop environment
# packages:
# - lxdm
# - mate-desktop-environment
# - xserver-xorg
# - xserver-xorg-input-evdev
{{ end }}
{{ if eq $variant "kde-plasma" }}
# - action: recipe
# recipe: variants/kde-plasma.yaml
{{ end }}
# - action: run
# chroot: true
# description: Fix default DPI
# command: sed -e "s@\\[server\\]@[server]\\narg=/usr/bin/Xorg -dpi 192\n@" -i /etc/lxdm/lxdm.conf
- action: run
chroot: true
description: Removing xserver-xorg-input-libinput as it does not work with touchscreen yet
command: apt remove xserver-xorg-input-libinput
- action: run
chroot: true
description: Removing /var/log/journal to avoid persisant journaling
command: rm -rf /var/log/journal/
{{ if eq $output "tarball" }}
- action: pack
file: {{ $image }}
compression: gz
{{ end }}
{{ if eq $output "image" }}
- action: image-file
imagename: {{ $image }}
imagesize: 6000000000
fs: ext4
fsname: "gemian"
- action: run
description: Allow jenkins user to access file
command: chown jenkins.jenkins {{ $image }}
- action: filesystem-deploy
setup-fstab: false
setup-kernel-cmdline: false
description: Deploying filesystem onto image
{{ end }}

View file

@ -71,7 +71,6 @@ actions:
- xfonts-scalable
- xfonts-utils
- action: run
chroot: true
description: Enabling libhybris EGL libs

View file

@ -0,0 +1 @@
; export CHROMIUM_FLAGS="$CHROMIUM_FLAGS --use-gl=egl"

View file

@ -0,0 +1,2 @@
gps_drv
fmradio_drv

View file

@ -0,0 +1,2 @@
[ModemManager]
AutoSelectDataSim=always

View file

@ -0,0 +1,39 @@
# Ofono configuration for Planet Cosmo Communicator
[Settings]
#EmptyConfig=false
#Identity=radio:radio
#3GLTEHandover=true
#SetRadioCapability=auto
emptyPinQuery=false
useDataProfiles=true
[ril_0]
transport=binder:name=slot1
name=slot1
#socket=/dev/socket/rild
#sub=SUB1
#slot=0
#timeout=0
#technologies=all
#enable4G=true
#uiccWorkaround=true
#ecclistFile=/var/lib/ofono/ril.ecclist
#allowDataReq=auto
#dataCallFormat=auto
#dataCallRetryLimit=4
#dataCallRetryDelay=200
#remoteHangupReasons=20
#localHangupReasons=23
#enableVoicecall=true
#enableCellBroadcast=true
#startTimeout=20000
#legacyImeiQuery=false
#lteNetworkMode=9
#networkModeTimeout=20000
[ril_1]
transport=binder:name=slot2
name=slot2

View file

@ -0,0 +1 @@
load-module module-droid-card rate=48000 quirks=+no_hw_volume,-output_deep_buffer

View file

@ -0,0 +1,142 @@
#!/usr/bin/pulseaudio -nF
#
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
# This startup script is used only if PulseAudio is started per-user
# (i.e. not in system mode)
.nofail
.fail
load-module module-droid-keepalive
### Automatically augment property information from .desktop files
### stored in /usr/share/application
load-module module-augment-properties
load-module module-null-sink sink_name=sink.null rate=48000
load-module module-stream-restore
### Switch when connected by default (ubports)
load-module module-switch-on-connect ignore_virtual=yes
### Should be after module-*-restore but before module-*-detect (sfos)
load-module module-switch-on-port-available
### If droid-card needs other arguments than the default, have the new
### load-module line in /etc/pulse/arm_droid_card_custom.pa
.ifexists /etc/pulse/arm_droid_card_custom.pa
.include /etc/pulse/arm_droid_card_custom.pa
.else
load-module module-droid-card rate=48000
.endif
### Needed on many new devices. HADK guide explains how to implement this fully
.ifexists module-droid-glue.so
.nofail
load-module module-droid-glue
.fail
.endif
.ifexists module-droid-hidl-28.so
.nofail
load-module module-droid-hidl-28
.fail
.endif
load-module module-null-sink sink_name=sink.fake.sco rate=8000 channels=1
load-module module-null-source source_name=source.fake.sco rate=8000 channels=1
#load-module module-bluetooth-discover bluez4_args="sco_sink=sink.fake.sco sco_source=source.fake.sco" bluez5_args="headset=droid"
load-module module-bluetooth-discover
load-module module-bluetooth-policy
#load-module module-policy-enforcement
load-module module-role-ducking trigger_roles=alarm,notification,warning ducking_roles=x-maemo volume=-200dB
### Load several protocols
.ifexists module-esound-protocol-unix.so
load-module module-esound-protocol-unix
.endif
load-module module-native-protocol-unix
### Network access (may be configured with paprefs, so leave this commented
### here if you plan to use paprefs)
#load-module module-esound-protocol-tcp
#load-module module-native-protocol-tcp
#load-module module-zeroconf-publish
### Load the RTP receiver module (also configured via paprefs, see above)
#load-module module-rtp-recv
### Load the RTP sender module (also configured via paprefs, see above)
#load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=44100 sink_properties="device.description='RTP Multicast Sink'"
#load-module module-rtp-send source=rtp.monitor
### Load additional modules from GSettings. This can be configured with the paprefs tool.
### Please keep in mind that the modules configured by paprefs might conflict with manually
### loaded modules.
.ifexists module-gsettings.so
.nofail
load-module module-gsettings
.fail
.endif
### Make sure we always have a sink around, even if it is a null sink.
load-module module-always-sink
### Honour intended role device property
load-module module-intended-roles
### Automatically suspend sinks/sources that become idle for too long
load-module module-suspend-on-idle timeout=1
### If autoexit on idle is enabled we want to make sure we only quit
### when no local session needs us anymore.
.ifexists module-console-kit.so
load-module module-console-kit
.endif
.ifexists module-systemd-login.so
load-module module-systemd-login
.endif
### Load DBus protocol
.ifexists module-dbus-protocol.so
load-module module-dbus-protocol
.endif
### Move orphan streams to placeholder sinks or sources so that playback doesn't get
### interrupted. Policy enforcement module then moves the streams to new appropriate
### sinks or sources.
#load-module module-rescue-streams sink_name=sink.null source_name=sink.null.monitor
### Enable positioned event sounds
load-module module-position-event-sounds
### Modules to allow auto-loading of filters (such as echo cancellation)
### on demand. module-filter-heuristics tries to determine what filters
### make sense, and module-filter-apply does the heavy-lifting of
### loading modules and rerouting streams.
load-module module-filter-heuristics
load-module module-filter-apply
### Make some devices default
set-default-sink sink.primary_output
set-default-source source.droid

View file

@ -0,0 +1 @@
SUBSYSTEM=="input", ATTRS{name}=="Integrated keyboard", ENV{XKBMODEL}="planetcosmo"

View file

@ -221,9 +221,9 @@ useradd --gid 9998 --no-create-home --home-dir /nonexistent --no-user-group --sy
groupadd --gid 9999 aid_nobody
useradd --gid 9999 --no-create-home --home-dir /nonexistent --no-user-group --system --shell /usr/sbin/nologin --uid 9999 aid_nobody
groupadd -g 100000 cosmo
useradd -m -u 100000 -g 100000 -G audio,input,video,sudo,dialout,aid_media,aid_system,aid_graphics,aid_input,aid_radio,aid_wakelock,aid_audio,aid_net_bt_admin,aid_net_bt,aid_inet,aid_net_raw,aid_net_admin -s /bin/bash cosmo
echo cosmo:cosmo | chpasswd
groupadd -g 100000 gemian
useradd -m -u 100000 -g 100000 -G audio,input,video,sudo,dialout,aid_media,aid_system,aid_graphics,aid_input,aid_radio,aid_wakelock,aid_audio,aid_net_bt_admin,aid_net_bt,aid_inet,aid_net_raw,aid_net_admin -s /bin/bash gemian
echo gemian:gemian | chpasswd
usermod systemd-timesync -a -G aid_inet
usermod avahi -a -G aid_inet