]> git.plutz.net Git - blast/blobdiff - modules/default.mk
include backports in apt-proxy
[blast] / modules / default.mk
index 171f531e6a51e483e940edddb647d99aab6404f1..bb4f432ceadd9298c7f6e3321d36fc55f5e207e1 100644 (file)
@@ -15,12 +15,19 @@ ${DEBCONF}
 
 keyboard-configuration keyboard-configuration/model    select  Generic 105-key (Intl) PC
 keyboard-configuration keyboard-configuration/variant  select  English (US) - English (Macintosh)
+
+console-setup  console-setup/charmap47 select  UTF-8
+console-setup  console-setup/codeset47 select  # Latin1 and Latin5 - western Europe and Turkic languages
 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 +50,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"
 
@@ -132,3 +139,27 @@ ifdef wifi
        printf '  wireless-essid "%s"\n' "$$wifi" >>$@
   endif
 endif
+
+.PHONY: _fstab
+
+ifdef _fstab
+  _config: ${CFGROOT}/etc/fstab
+  export _fstab
+
+else
+  ifdef fsuuid
+    define _fstab :=
+UUID=${fsuuid} /               btrfs   auto,rw,subvol=${release}       0 0
+UUID=${fsuuid} /home           btrfs   auto,nofail,rw,subvol=home      0 0
+UUID=${fsuuid} /mnt/fsroot     btrfs   auto,nofail,rw                  0 0
+LABEL=SWAP     swap            swap    auto,nofail,sw                  0 0
+LABEL=EFIBOOT  /boot/efi       vfat    auto,nofail,ro                  0 0
+endef
+    _config: ${CFGROOT}/etc/fstab
+    export _fstab
+
+  endif
+endif
+
+${CFGROOT}/etc/fstab: ${CFGROOT}
+       printf '%s' "$${_fstab}" >"$@"