From 6563761c22bf3d0e07818ed47556e7b84103a0b2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Sun, 22 Dec 2019 20:19:53 +0100 Subject: [PATCH] retropie config, some config fixes --- modules/autoresize.mk | 2 +- modules/default.mk | 2 +- raspi_elok.mk | 87 ------------------------------------------- retropie.mk | 65 +++++++++++++++----------------- 4 files changed, 33 insertions(+), 123 deletions(-) delete mode 100644 raspi_elok.mk diff --git a/modules/autoresize.mk b/modules/autoresize.mk index 012aec9..ee00f52 100644 --- a/modules/autoresize.mk +++ b/modules/autoresize.mk @@ -24,7 +24,7 @@ if [ "$$before" = "$$after" ]; then case $$roottype in ext[234]) resize2fs "$$rootfs";; btrfs) btrfs filesystem resize max /;; - nilfs2) nilfs-resize "$$rootfs";; + nilfs2) nilfs-resize -y "$$rootfs";; esac systemctl disable autoresize else diff --git a/modules/default.mk b/modules/default.mk index ec3f2f4..5885a38 100644 --- a/modules/default.mk +++ b/modules/default.mk @@ -122,6 +122,6 @@ ifdef wifi export wifi ${CFGROOT}/etc/network/interfaces.d/wifi: ${CFGROOT} printf 'auto wlan0\nallow-hotplug wlan0\n\niface wlan0 inet dhcp\n' >$@ - printf ' wireless-ssid "%s"\n' "$$wifi" >>$@ + printf ' wireless-essid %s\n' "$$wifi" >>$@ endif endif diff --git a/raspi_elok.mk b/raspi_elok.mk deleted file mode 100644 index 1d4d192..0000000 --- a/raspi_elok.mk +++ /dev/null @@ -1,87 +0,0 @@ -## Choose only on of the possible target types -# image=disk.img -# squash=rootfs.squash -raspi=raspi_elok.img - -## Image size in MB. Needs to be able to hold all software. -imagesize=3072 - -## Additional packages -packages=chromium-browser,okular,libreoffice-impress,ssh -packages=supertuxkart/buster,libc-bin/buster,libc6/buster,libopenal1/buster,locales/buster - -## Debian release, so far only stretch has been tested -release=stretch - -## Comma separated list of config modules from modules/ directory -modules=approx,nodm,xfce,autoresize -approxhost := localhost:9999 - -## Hostname for the generated machine -hostname=pi_elok - -## Root password will be salted and encrypted in image -rootpass=root - -## The corresponding .pub file for the given rootkey will be applied as -## SSH login file for the root user. -## If the pub file is not found, a new key pair will be generated -# rootkey=image_ssh - -## Comma separated list of users to be set up. -## User logins will start out with an empty password -## If the live module is in use, users will also be added to the sudo group -# users=adam,steve -users=elok - -## Wifi configuration, if a Wifi password is given, WPA encryption will be used -## without the password, the system will try to connect to an open wifi -wifi=berlin.freifunk.net -# wifi=MyWiFi -# wifipass=P4ssW0rD - -## Timezone as offered by Debians tzdata selection -timezone=Europe/Berlin - -## Comma separated list of locales, first one will become default locale -locales=de_DE.UTF-8,en_US.UTF-8 - -## If nodm is installed, you can choose a user to login automatically -## If no user is given here, then nodm will default to root -nodm_user=elok - -## In nodm, use full screen chromium web browser as session -# webui=http://localhost/ - -## When using NIS modules the directory server should be given -# nis_server=nismaster - -## If the approxmodule is enabled, then one (and only one) apt-source -## can be choosen to install packages from -## See modules/approx.mk if you need more flexibility -# approx=http://localhost:9000/debian - -define stk_config := - - - - - - - -endef -export stk_config - -_config: ${CFGROOT}/etc/xdg/.config/supertuxkart/0.8.2/config.xml -${CFGROOT}/etc/xdg/.config/supertuxkart/0.8.2/config.xml: ${CFGROOT} - mkdir -p "$${CFGROOT}"/etc/xdg/.config/supertuxkart/0.8.2/ - printf '%s\n' "$${stk_config}" >"$${CFGROOT}"/etc/xdg/.config/supertuxkart/0.8.2/config.xml diff --git a/retropie.mk b/retropie.mk index da650d0..c23e85c 100644 --- a/retropie.mk +++ b/retropie.mk @@ -4,18 +4,20 @@ raspi=retropie.img ## Image size in MB. Needs to be able to hold all software. -imagesize=3072 +# imagesize=3072 +imagesize=2048 ## Additional packages -packages=chromium-browser,ssh,lsb-release -packages=supertuxkart/buster,libc-bin/buster,libc6/buster,libopenal1/buster,locales/buster +# packages:=chromium-browser,ssh,lsb-release +# packages=supertuxkart/buster,libc-bin/buster,libc6/buster,libopenal1/buster,locales/buster +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 ## Debian release, so far only stretch has been tested release=stretch ## Comma separated list of config modules from modules/ directory -modules=approx,nodm,xfce,autoresize,display_ws5inch -approxhost := localhost:9999 +modules=approx,autoresize,display_ws5inch # nodm,xfce +# approxhost := localhost:9999 ## Hostname for the generated machine hostname=retropie @@ -26,7 +28,7 @@ rootpass=root ## The corresponding .pub file for the given rootkey will be applied as ## SSH login file for the root user. ## If the pub file is not found, a new key pair will be generated -# rootkey=image_ssh +rootkey=image_ssh ## Comma separated list of users to be set up. ## User logins will start out with an empty password @@ -36,7 +38,7 @@ users=rpi ## Wifi configuration, if a Wifi password is given, WPA encryption will be used ## without the password, the system will try to connect to an open wifi -wifi=berlin.freifunk.net +# wifi=berlin.freifunk.net # wifi=MyWiFi # wifipass=P4ssW0rD @@ -44,7 +46,8 @@ wifi=berlin.freifunk.net timezone=Europe/Berlin ## Comma separated list of locales, first one will become default locale -locales=de_DE.UTF-8,en_US.UTF-8 +# locales=de_DE.UTF-8,en_US.UTF-8 +locales=en_US.UTF-8 ## If nodm is installed, you can choose a user to login automatically ## If no user is given here, then nodm will default to root @@ -61,36 +64,30 @@ nodm_user=rpi ## See modules/approx.mk if you need more flexibility # approx=http://localhost:9000/debian -define stk_config := - - - - +CFGROOT := img_mount/ - - -endef -export stk_config - -${CFGROOT}/etc/xdg/.config/supertuxkart/0.8.2/config.xml: ${CFGROOT} - mkdir -p "$${CFGROOT}"/etc/xdg/.config/supertuxkart/0.8.2/ - printf '%s\n' "$${stk_config}" >"$${CFGROOT}"/etc/xdg/.config/supertuxkart/0.8.2/config.xml - -# _config: ${CFGROOT}/etc/xdg/.config/supertuxkart/0.8.2/config.xml +_target: ${CFGROOT}/opt/RetroPie-Setup/ ${CFGROOT}/etc/sudoers.d/nopassword _vc4driver _groups _autologin RetroPie-Setup/: [ ! -d "$@" ] && git clone --depth=1 https://github.com/RetroPie/RetroPie-Setup.git -${FGROOT}/opt/RetroPie-Setup/: RetroPie-Setup/ +${CFGROOT}/opt/RetroPie-Setup/: RetroPie-Setup/ ${CFGROOT} | _config cp -au "$<" "$@" -_config: ${FGROOT}/opt/RetroPie-Setup/ +_vc4driver: ${CFGROOT} | _config + sed -Ei 's;^ *dtoverlay=vc4-fkms-v3d;# &;' ${CFGROOT}/boot/config.txt + +${CFGROOT}/etc/sudoers.d/nopassword: ${CFGROOT} + printf '%%sudo ALL=NOPASSWD: ALL\n' >"$@" + chmod 440 "$@" + +_groups: _users + chroot "$${CFGROOT}" adduser rpi sudo + chroot "$${CFGROOT}" adduser rpi input + chroot "$${CFGROOT}" adduser rpi video + +_autologin: ${CFGROOT}/etc/systemd/system/getty@tty1.service.d/override.conf ${CFGROOT} +${CFGROOT}/etc/systemd/system/getty@tty1.service.d/override.conf: + mkdir -p ${CFGROOT}/etc/systemd/system/getty@tty1.service.d/ + printf '[Service]\nExecStart=\nExecStart=-/sbin/agetty --autologin %s --noclear %%I $$TERM' \ + rpi >$@ -- 2.39.2