]> git.plutz.net Git - blast/blob - retropie.mk
retropie config, some config fixes
[blast] / retropie.mk
1 ## Choose only on of the possible target types
2 # image=disk.img
3 # squash=rootfs.squash
4 raspi=retropie.img
5
6 ## Image size in MB. Needs to be able to hold all software.
7 # imagesize=3072
8 imagesize=2048
9
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
14
15 ## Debian release, so far only stretch has been tested
16 release=stretch
17
18 ## Comma separated list of config modules from modules/ directory
19 modules=approx,autoresize,display_ws5inch # nodm,xfce
20 # approxhost := localhost:9999
21
22 ## Hostname for the generated machine
23 hostname=retropie
24
25 ## Root password will be salted and encrypted in image
26 rootpass=root
27
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
31 rootkey=image_ssh
32
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
36 # users=adam,steve
37 users=rpi
38
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
42 # wifi=MyWiFi
43 # wifipass=P4ssW0rD
44
45 ## Timezone as offered by Debians tzdata selection
46 timezone=Europe/Berlin
47
48 ## Comma separated list of locales, first one will become default locale
49 # locales=de_DE.UTF-8,en_US.UTF-8
50 locales=en_US.UTF-8
51
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
54 nodm_user=rpi
55
56 ## In nodm, use full screen chromium web browser as session
57 # webui=http://localhost/
58
59 ## When using NIS modules the directory server should be given
60 # nis_server=nismaster
61
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
66
67 CFGROOT := img_mount/
68
69 _target: ${CFGROOT}/opt/RetroPie-Setup/ ${CFGROOT}/etc/sudoers.d/nopassword _vc4driver _groups _autologin
70
71 RetroPie-Setup/:
72         [ ! -d "$@" ] && git clone --depth=1 https://github.com/RetroPie/RetroPie-Setup.git
73
74 ${CFGROOT}/opt/RetroPie-Setup/: RetroPie-Setup/ ${CFGROOT} | _config
75         cp -au "$<" "$@"
76
77 _vc4driver: ${CFGROOT} | _config
78         sed -Ei 's;^ *dtoverlay=vc4-fkms-v3d;# &;' ${CFGROOT}/boot/config.txt
79
80 ${CFGROOT}/etc/sudoers.d/nopassword: ${CFGROOT}
81         printf '%%sudo ALL=NOPASSWD: ALL\n' >"$@"
82         chmod 440 "$@"
83
84 _groups: _users
85         chroot "$${CFGROOT}" adduser rpi sudo
86         chroot "$${CFGROOT}" adduser rpi input
87         chroot "$${CFGROOT}" adduser rpi video
88
89 _autologin: ${CFGROOT}/etc/systemd/system/getty@tty1.service.d/override.conf ${CFGROOT}
90 ${CFGROOT}/etc/systemd/system/getty@tty1.service.d/override.conf:
91         mkdir -p ${CFGROOT}/etc/systemd/system/getty@tty1.service.d/
92         printf '[Service]\nExecStart=\nExecStart=-/sbin/agetty --autologin %s --noclear %%I $$TERM' \
93                 rpi >$@