]> git.plutz.net Git - blast/commitdiff
allow rpi video memory selction, automatically choose rpi initrd
authorPaul Hänsch <paul@plutz.net>
Mon, 21 Sep 2020 15:49:19 +0000 (17:49 +0200)
committerPaul Hänsch <paul@plutz.net>
Mon, 21 Sep 2020 15:49:19 +0000 (17:49 +0200)
modules/default.mk

index 171f531e6a51e483e940edddb647d99aab6404f1..e8e4fd1ed3dcdfd2b9869bd55219db3361c66a9d 100644 (file)
@@ -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"