]> git.plutz.net Git - blast/blob - retropie.mk
fixed approx config for raspi
[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=4096
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:9000
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}/etc/sudoers.d/nopassword _retropie _vc4driver _groups _autologin | _config
70
71 _retropie: ${CFGROOT}/opt/RetroPie-Setup/  # ${CFGROOT}/opt/retropie/
72
73 RetroPie-Setup/:
74         [ ! -d "$@" ] && git clone --depth=1 https://github.com/RetroPie/RetroPie-Setup.git
75
76 ${CFGROOT}/opt/RetroPie-Setup/: RetroPie-Setup/ | _config
77         cp -au "$<" "$@"
78
79 # ${CFGROOT}/opt/retropie/: retropie/ | _config
80 #       -cp -au "$<" "$@"
81
82 _vc4driver: | _config
83         sed -Ei 's;^ *dtoverlay=vc4-fkms-v3d;# &;' ${CFGROOT}/boot/config.txt
84
85 ${CFGROOT}/etc/sudoers.d/nopassword: | _config
86         printf '%%sudo ALL=NOPASSWD: ALL\n' >"$@"
87         chmod 440 "$@"
88
89 _groups: _users | _config
90         chroot "$${CFGROOT}" adduser rpi sudo
91         chroot "$${CFGROOT}" adduser rpi input
92         chroot "$${CFGROOT}" adduser rpi video
93
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' \
98                 rpi >$@
99
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' \
104                 >"$@"
105
106 define RPICONFIG :=
107 dtparam=audio=on
108 gpu_mem_256=128
109 gpu_mem_512=256
110 gpu_mem_1024=256
111 overscan_scale=1
112 endef