From: Paul Hänsch Date: Mon, 21 Sep 2020 15:49:19 +0000 (+0200) Subject: allow rpi video memory selction, automatically choose rpi initrd X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=ce6b1ef14dfa506b8eb56fba270056ddbaecaf73;p=blast allow rpi video memory selction, automatically choose rpi initrd --- diff --git a/modules/default.mk b/modules/default.mk index 171f531..e8e4fd1 100644 --- a/modules/default.mk +++ b/modules/default.mk @@ -17,10 +17,14 @@ keyboard-configuration keyboard-configuration/model select Generic 105-key (Intl keyboard-configuration keyboard-configuration/variant select English (US) - English (Macintosh) endef +ifndef rpivmem + rpivmem := 128 +endif + define RPICONFIG := ${RPICONFIG} -dtoverlay=vc4-fkms-v3d,cma-256 +dtoverlay=vc4-fkms-v3d,cma-${rpivmem} endef .PHONY: _debconf_selections _raspberry_config _keyboard @@ -43,8 +47,8 @@ _raspberry_config: ${CFGROOT} _raspberry_initrd: ${CFGROOT} printf '${fstype}\n' >>"$${CFGROOT}/etc/initramfs-tools/modules" - k="${kernel}"; \ - [ "$$k" ] || k="$$(echo "$${CFGROOT}"/lib/modules/*-v7+)"; \ + k="$$(printf '%s\n' "$${CFGROOT}"/lib/modules/* |sed 's;^.*/;;; /-/d')"; \ + [ "${kernel}" ] && k="${kernel}"; \ chroot $${CFGROOT} update-initramfs -c -k "$${k##*/}"; \ printf 'initramfs initrd.img-%s\n' "$${k##*/}" >>"$${CFGROOT}/boot/config.txt"