Initial import of debos configs for building Gemini PDA/Cosmo Communicator Debian rootfs
This commit is contained in:
commit
bed31554c3
7 changed files with 269 additions and 0 deletions
41
cosmopda.yaml
Normal file
41
cosmopda.yaml
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
{{- $image := or .image "gemian-cosmopda.tgz" -}}
|
||||||
|
|
||||||
|
architecture: arm64
|
||||||
|
|
||||||
|
actions:
|
||||||
|
- action: recipe
|
||||||
|
description: Setup Gemian rootfs
|
||||||
|
recipe: gemian-common.yaml
|
||||||
|
|
||||||
|
- action: overlay
|
||||||
|
description: Adding Cosmo Communicator overlay
|
||||||
|
source: overlay/cosmopda
|
||||||
|
destination: /
|
||||||
|
|
||||||
|
- action: apt
|
||||||
|
description: Installing additional Debian packages
|
||||||
|
packages: [ curl, gnupg, openssh-server, sudo ]
|
||||||
|
|
||||||
|
- action: apt
|
||||||
|
description: Installing Cosmo Communicator-specific packages
|
||||||
|
packages: [ droid-hal-cosmopda ]
|
||||||
|
|
||||||
|
- action: run
|
||||||
|
chroot: true
|
||||||
|
command: echo cosmopda > /etc/hostname
|
||||||
|
|
||||||
|
- action: run
|
||||||
|
chroot: true
|
||||||
|
description: Setting password on root user (useful for testing, remove later)
|
||||||
|
command: echo root:root | chpasswd
|
||||||
|
|
||||||
|
- action: apt
|
||||||
|
description: Installing MATE desktop environment
|
||||||
|
packages:
|
||||||
|
- lightdm
|
||||||
|
- mate-desktop-environment
|
||||||
|
- xserver-xorg
|
||||||
|
|
||||||
|
- action: pack
|
||||||
|
file: {{ $image }}
|
||||||
|
compression: gz
|
||||||
47
gemian-common.yaml
Normal file
47
gemian-common.yaml
Normal file
|
|
@ -0,0 +1,47 @@
|
||||||
|
architecture: arm64
|
||||||
|
|
||||||
|
actions:
|
||||||
|
- action: debootstrap
|
||||||
|
suite: "buster"
|
||||||
|
components:
|
||||||
|
- main
|
||||||
|
- non-free
|
||||||
|
mirror: https://deb.debian.org/debian
|
||||||
|
|
||||||
|
- action: overlay
|
||||||
|
description: Adding common Gemian overlay
|
||||||
|
source: overlay/common
|
||||||
|
destination: /
|
||||||
|
|
||||||
|
- action: apt
|
||||||
|
description: Installing additional Debian packages
|
||||||
|
packages: [ curl, gnupg, openssh-server, sudo ]
|
||||||
|
|
||||||
|
- action: run
|
||||||
|
chroot: true
|
||||||
|
description: Adding Gemian repos
|
||||||
|
script: scripts/add-gemian-repos.sh
|
||||||
|
|
||||||
|
- action: apt
|
||||||
|
description: Installing packages for libhybris-based HW adaptation
|
||||||
|
packages:
|
||||||
|
- drihybris
|
||||||
|
- glamor-hybris
|
||||||
|
- hybris-usb
|
||||||
|
- libhybris
|
||||||
|
- xserver-xorg-video-hwcomposer
|
||||||
|
|
||||||
|
- action: run
|
||||||
|
chroot: true
|
||||||
|
description: Enabling libhybris EGL libs
|
||||||
|
command: ln -s /usr/lib/aarch64-linux-gnu/libhybris-egl/ld.so.conf /etc/ld.so.conf.d/00_libhybris-egl.conf && ldconfig
|
||||||
|
|
||||||
|
- action: run
|
||||||
|
chroot: true
|
||||||
|
description: Enabling USB networking service
|
||||||
|
command: systemctl enable usb-tethering
|
||||||
|
|
||||||
|
- action: run
|
||||||
|
chroot: true
|
||||||
|
description: Setting Gemian users
|
||||||
|
script: scripts/setup-user.sh
|
||||||
42
geminipda.yaml
Normal file
42
geminipda.yaml
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
{{- $image := or .image "gemian-cosmopda.tgz" -}}
|
||||||
|
|
||||||
|
architecture: arm64
|
||||||
|
|
||||||
|
actions:
|
||||||
|
- action: recipe
|
||||||
|
description: Setup Gemian rootfs
|
||||||
|
recipe: gemian-common.yaml
|
||||||
|
|
||||||
|
- action: overlay
|
||||||
|
description: Adding Gemini PDA overlay
|
||||||
|
source: overlay/geminipda
|
||||||
|
destination: /
|
||||||
|
|
||||||
|
- action: apt
|
||||||
|
description: Installing Gemini PDA-specific packages
|
||||||
|
packages: [ droid-hal-cosmopda gemian-system initramfs-tools-halium gemian-modular-kernel ]
|
||||||
|
|
||||||
|
- action: run
|
||||||
|
chroot: true
|
||||||
|
command: echo geminipda > /etc/hostname
|
||||||
|
|
||||||
|
- action: run
|
||||||
|
chroot: true
|
||||||
|
description: Setting password on root user (useful for testing, remove later)
|
||||||
|
command: echo root:root | chpasswd
|
||||||
|
|
||||||
|
- action: run
|
||||||
|
chroot: true
|
||||||
|
description: Setting Gemian users
|
||||||
|
script: scripts/setup-user.sh
|
||||||
|
|
||||||
|
- action: apt
|
||||||
|
description: Installing MATE desktop environment
|
||||||
|
packages:
|
||||||
|
- lightdm
|
||||||
|
- mate-desktop-environment
|
||||||
|
- xserver-xorg
|
||||||
|
|
||||||
|
- action: pack
|
||||||
|
file: {{ $image }}
|
||||||
|
compression: gz
|
||||||
22
overlay/common/etc/X11/xorg.conf.d/20-hwcomposer.conf
Normal file
22
overlay/common/etc/X11/xorg.conf.d/20-hwcomposer.conf
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
Section "Monitor"
|
||||||
|
Identifier "Monitor0"
|
||||||
|
DisplaySize 135 68 # In millimeters
|
||||||
|
EndSection
|
||||||
|
|
||||||
|
Section "Device"
|
||||||
|
Identifier "MediaTek HWC"
|
||||||
|
Driver "hwcomposer"
|
||||||
|
Option "Rotate" "CCW"
|
||||||
|
EndSection
|
||||||
|
|
||||||
|
Section "Screen"
|
||||||
|
Identifier "Screen0"
|
||||||
|
Device "MediaTek HWC"
|
||||||
|
Monitor "Monitor0"
|
||||||
|
DefaultDepth 24
|
||||||
|
SubSection "Display"
|
||||||
|
Depth 24
|
||||||
|
#Virtual 1440 720
|
||||||
|
#Virtual 1080 540
|
||||||
|
EndSubSection
|
||||||
|
EndSection
|
||||||
85
overlay/common/etc/adduser.conf
Normal file
85
overlay/common/etc/adduser.conf
Normal file
|
|
@ -0,0 +1,85 @@
|
||||||
|
# /etc/adduser.conf: `adduser' configuration.
|
||||||
|
# See adduser(8) and adduser.conf(5) for full documentation.
|
||||||
|
|
||||||
|
# The DSHELL variable specifies the default login shell on your
|
||||||
|
# system.
|
||||||
|
DSHELL=/bin/bash
|
||||||
|
|
||||||
|
# The DHOME variable specifies the directory containing users' home
|
||||||
|
# directories.
|
||||||
|
DHOME=/home
|
||||||
|
|
||||||
|
# If GROUPHOMES is "yes", then the home directories will be created as
|
||||||
|
# /home/groupname/user.
|
||||||
|
GROUPHOMES=no
|
||||||
|
|
||||||
|
# If LETTERHOMES is "yes", then the created home directories will have
|
||||||
|
# an extra directory - the first letter of the user name. For example:
|
||||||
|
# /home/u/user.
|
||||||
|
LETTERHOMES=no
|
||||||
|
|
||||||
|
# The SKEL variable specifies the directory containing "skeletal" user
|
||||||
|
# files; in other words, files such as a sample .profile that will be
|
||||||
|
# copied to the new user's home directory when it is created.
|
||||||
|
SKEL=/etc/skel
|
||||||
|
|
||||||
|
# FIRST_SYSTEM_[GU]ID to LAST_SYSTEM_[GU]ID inclusive is the range for UIDs
|
||||||
|
# for dynamically allocated administrative and system accounts/groups.
|
||||||
|
# Please note that system software, such as the users allocated by the base-passwd
|
||||||
|
# package, may assume that UIDs less than 100 are unallocated.
|
||||||
|
FIRST_SYSTEM_UID=100
|
||||||
|
LAST_SYSTEM_UID=999
|
||||||
|
|
||||||
|
FIRST_SYSTEM_GID=100
|
||||||
|
LAST_SYSTEM_GID=999
|
||||||
|
|
||||||
|
# FIRST_[GU]ID to LAST_[GU]ID inclusive is the range of UIDs of dynamically
|
||||||
|
# allocated user accounts/groups.
|
||||||
|
FIRST_UID=100000
|
||||||
|
LAST_UID=200000
|
||||||
|
|
||||||
|
FIRST_GID=100000
|
||||||
|
LAST_GID=200000
|
||||||
|
|
||||||
|
# The USERGROUPS variable can be either "yes" or "no". If "yes" each
|
||||||
|
# created user will be given their own group to use as a default. If
|
||||||
|
# "no", each created user will be placed in the group whose gid is
|
||||||
|
# USERS_GID (see below).
|
||||||
|
USERGROUPS=yes
|
||||||
|
|
||||||
|
# If USERGROUPS is "no", then USERS_GID should be the GID of the group
|
||||||
|
# `users' (or the equivalent group) on your system.
|
||||||
|
USERS_GID=100
|
||||||
|
|
||||||
|
# If DIR_MODE is set, directories will be created with the specified
|
||||||
|
# mode. Otherwise the default mode 0755 will be used.
|
||||||
|
DIR_MODE=0755
|
||||||
|
|
||||||
|
# If SETGID_HOME is "yes" home directories for users with their own
|
||||||
|
# group the setgid bit will be set. This was the default for
|
||||||
|
# versions << 3.13 of adduser. Because it has some bad side effects we
|
||||||
|
# no longer do this per default. If you want it nevertheless you can
|
||||||
|
# still set it here.
|
||||||
|
SETGID_HOME=no
|
||||||
|
|
||||||
|
# If QUOTAUSER is set, a default quota will be set from that user with
|
||||||
|
# `edquota -p QUOTAUSER newuser'
|
||||||
|
QUOTAUSER=""
|
||||||
|
|
||||||
|
# If SKEL_IGNORE_REGEX is set, adduser will ignore files matching this
|
||||||
|
# regular expression when creating a new home directory
|
||||||
|
SKEL_IGNORE_REGEX="dpkg-(old|new|dist|save)"
|
||||||
|
|
||||||
|
# Set this if you want the --add_extra_groups option to adduser to add
|
||||||
|
# new users to other groups.
|
||||||
|
# This is the list of groups that new non-system users will be added to
|
||||||
|
# Default:
|
||||||
|
EXTRA_GROUPS="audio video sudo aid_system aid_graphics aid_input aid_audio aid_net_bt_admin aid_net_bt aid_inet aid_inet_raw aid_inet_admin"
|
||||||
|
|
||||||
|
# If ADD_EXTRA_GROUPS is set to something non-zero, the EXTRA_GROUPS
|
||||||
|
# option above will be default behavior for adding new, non-system users
|
||||||
|
ADD_EXTRA_GROUPS=1
|
||||||
|
|
||||||
|
|
||||||
|
# check user and group names also against this regular expression.
|
||||||
|
#NAME_REGEX="^[a-z][-a-z0-9_]*\$"
|
||||||
14
scripts/add-gemian-repos.sh
Executable file
14
scripts/add-gemian-repos.sh
Executable file
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
rm -f /etc/resolv.conf
|
||||||
|
echo "nameserver 8.8.8.8" > /etc/resolv.conf
|
||||||
|
|
||||||
|
echo "deb http://gemian.thinkglobally.org/buster/ buster main" >> /etc/apt/sources.list.d/gemian.list
|
||||||
|
|
||||||
|
echo "" >> /etc/apt/preferences.d/gemian.pref
|
||||||
|
echo "Package: *" >> /etc/apt/preferences.d/gemian.pref
|
||||||
|
echo "Pin: origin gemian.thinkglobally.org" >> /etc/apt/preferences.d/gemian.pref
|
||||||
|
echo "Pin: release o=Gemian,a=buster" >> /etc/apt/preferences.d/gemian.pref
|
||||||
|
echo "Pin-Priority: 2000" >> /etc/apt/preferences.d/gemian.pref
|
||||||
|
|
||||||
|
curl http://gemian.thinkglobally.org/archive-key.asc | apt-key add -
|
||||||
18
scripts/setup-user.sh
Executable file
18
scripts/setup-user.sh
Executable file
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/sh
|
||||||
|
groupadd -g 1001 radio
|
||||||
|
useradd -u 1001 -g 1001 -s /usr/sbin/nologin radio
|
||||||
|
groupadd -g 1021 gps
|
||||||
|
useradd -u 1021 -g 1021 -s /usr/sbin/nologin gps
|
||||||
|
|
||||||
|
groupadd -g 1000 aid_system
|
||||||
|
groupadd -g 1003 aid_graphics
|
||||||
|
groupadd -g 1004 aid_input
|
||||||
|
groupadd -g 1005 aid_audio
|
||||||
|
groupadd -g 3001 aid_net_bt_admin
|
||||||
|
groupadd -g 3002 aid_net_bt
|
||||||
|
groupadd -g 3003 aid_inet
|
||||||
|
groupadd -g 3004 aid_inet_raw
|
||||||
|
groupadd -g 3005 aid_inet_admin
|
||||||
|
groupadd -g 100000 gemini
|
||||||
|
|
||||||
|
useradd -m -u 100000 -g 100000 -G audio,video,sudo,aid_system,aid_graphics,aid_input,aid_audio,aid_net_bt_admin,aid_net_bt,aid_inet,aid_inet_raw,aid_inet_admin -s /bin/bash gemini
|
||||||
Loading…
Add table
Reference in a new issue