1 ## Choose only on of the possible target types
6 ## Image size in MB. Needs to be able to hold all software.
10 ## Additional packages
11 # packages:=chromium-browser,ssh,lsb-release
12 # packages=supertuxkart/buster,libc-bin/buster,libc6/buster,libopenal1/buster,locales/buster
13 packages=ssh lsb-release bison bluetooth build-essential cmake dialog fbi fbset flex g++ gcc git libasound2-dev libavcodec-dev libavdevice-dev libavformat-dev libcurl4-openssl-dev libfreeimage-dev libfreetype6-dev libgles2-mesa-dev libraspberrypi-dev libsdl2-2.0-0 libsdl2-dev libsm-dev libudev-dev libusb-1.0-0-dev libvlccore-dev libvlc-dev libx11-xcb-dev libxkbcommon-dev mc python-dbus python-gobject python-pyudev rapidjson-dev samba vlc xmlstarlet omxplayer insserv libfftw3-single3 alsa-utils
15 ## Debian release, so far only stretch has been tested
18 ## Comma separated list of config modules from modules/ directory
19 modules=approx,autoresize #,display_ws5inch # nodm,xfce
20 approxhost:=localhost:9000
22 ## Hostname for the generated machine
25 ## Root password will be salted and encrypted in image
28 ## The corresponding .pub file for the given rootkey will be applied as
29 ## SSH login file for the root user.
30 ## If the pub file is not found, a new key pair will be generated
33 ## Comma separated list of users to be set up.
34 ## User logins will start out with an empty password
35 ## If the live module is in use, users will also be added to the sudo group
39 ## Wifi configuration, if a Wifi password is given, WPA encryption will be used
40 ## without the password, the system will try to connect to an open wifi
41 # wifi=berlin.freifunk.net
45 ## Timezone as offered by Debians tzdata selection
46 timezone=Europe/Berlin
48 ## Comma separated list of locales, first one will become default locale
49 # locales=de_DE.UTF-8,en_US.UTF-8
52 ## If nodm is installed, you can choose a user to login automatically
53 ## If no user is given here, then nodm will default to root
56 ## In nodm, use full screen chromium web browser as session
57 # webui=http://localhost/
59 ## When using NIS modules the directory server should be given
60 # nis_server=nismaster
62 ## If the approxmodule is enabled, then one (and only one) apt-source
63 ## can be choosen to install packages from
64 ## See modules/approx.mk if you need more flexibility
65 # approx=http://localhost:9000/debian
69 _target: ${CFGROOT}/etc/sudoers.d/nopassword _retropie _vc4driver _groups _autologin | _config
71 _retropie: ${CFGROOT}/opt/RetroPie-Setup/ # ${CFGROOT}/opt/retropie/
74 [ ! -d "$@" ] && git clone --depth=1 https://github.com/RetroPie/RetroPie-Setup.git
76 ${CFGROOT}/opt/RetroPie-Setup/: RetroPie-Setup/ | _config
79 # ${CFGROOT}/opt/retropie/: retropie/ | _config
83 sed -Ei 's;^ *dtoverlay=vc4-fkms-v3d;# &;' ${CFGROOT}/boot/config.txt
85 ${CFGROOT}/etc/sudoers.d/nopassword: | _config
86 printf '%%sudo ALL=NOPASSWD: ALL\n' >"$@"
89 _groups: _users | _config
90 chroot "$${CFGROOT}" adduser rpi sudo
91 chroot "$${CFGROOT}" adduser rpi input
92 chroot "$${CFGROOT}" adduser rpi video
94 _autologin: ${CFGROOT}/etc/systemd/system/getty@tty1.service.d/override.conf ${CFGROOT}/etc/profile.d/retropie_autostart.sh
95 ${CFGROOT}/etc/systemd/system/getty@tty1.service.d/override.conf: | _config
96 mkdir -p ${CFGROOT}/etc/systemd/system/getty@tty1.service.d/
97 printf '[Service]\nExecStart=\nExecStart=-/sbin/agetty --autologin %s --noclear %%I $$TERM' \
100 ${CFGROOT}/etc/profile.d/retropie_autostart.sh: | _config
101 printf '%s\n' '[ "$$USER" = rpi ] && \\' \
102 'if which emulationstation; then' ' emulationstation' \
103 'else' ' sudo /opt/RetroPie-Setup/retropie_setup.sh' 'fi' \