+_keyboard: ${CFGROOT}
+ -sed -Ei 's;^XKBLAYOUT=.*$$;XKBLAYOUT="${keyboard}";;' "$${CFGROOT}/etc/default/keyboard"
+
+ifdef raspi
+ _config: _raspberry_config _raspberry_initrd
+endif
+
+_raspberry_config: ${CFGROOT}
+ printf '%s\n' "$${RPICONFIG}" >>"$${CFGROOT}/boot/config.txt"
+
+_raspberry_initrd: ${CFGROOT}
+ printf '${fstype}\n' >>"$${CFGROOT}/etc/initramfs-tools/modules"
+ 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"
+
+.PHONY: _timezone _locales
+
+ifdef timezone
+ export timezone
+ PACKAGES += tzdata
+ _config: _timezone
+endif
+
+ifdef locales
+ PACKAGES += locales
+ _config: _locales
+endif
+
+_timezone: ${CFGROOT}
+ printf '%s\n' "$${timezone}" >"$${CFGROOT}/etc/timezone"
+ ln -sf /usr/share/zoneinfo/"$${timezone}" "$${CFGROOT}/etc/localtime"
+
+_locales: ${CFGROOT}
+ for l in $(subst ${comma_},${space_},${locales}); do \
+ printf '%s %s\n' "$${l}" "$${l#*.}"; \
+ done >"$${CFGROOT}/etc/locale.gen"
+ printf 'LANG=%s\n' "$(firstword $(subst ${comma_},${space_},${locales}))" >"$${CFGROOT}/etc/default/locale"
+ chroot "$${CFGROOT}" locale-gen
+
+.PHONY: _rootpass _users _hostname