@@ -16,3 +16,4 @@  config KAS_BUILD_SYSTEM
 
 source "kas/distro/Kconfig"
 source "kas/machine/Kconfig"
+source "kas/opt/Kconfig"
new file mode 100644
@@ -0,0 +1,43 @@ 
+# This software is a part of ISAR.
+# Copyright (C) 2023 ilbers GmbH
+#
+# Authors:
+#  Uladzimir Bely <ubely@ilbers.de>
+
+menu "Mirror selection"
+	depends on DEBIAN_BUSTER || DEBIAN_BULLSEYE || DEBIAN_BOOKWORM || UBUNTU_FOCAL || UBUNTU_JAMMY
+
+config MIRROR_DEBIAN
+	bool "Use specific Debian mirror"
+	depends on DEBIAN_BUSTER || DEBIAN_BULLSEYE || DEBIAN_BOOKWORM
+	help
+	  Select better local Debian mirror instead of deb.debian.org
+
+config MIRROR_DEBIAN_URL
+	string "URL of Debian mirror"
+	default "http://deb.debian.org"
+	depends on MIRROR_DEBIAN
+
+config KAS_INCLUDE_MIRROR_DEBIAN
+	string
+	default "kas/opt/mirror-debian.yaml"
+	depends on MIRROR_DEBIAN
+
+
+config MIRROR_UBUNTU
+	bool "Use specific Ubuntu mirror"
+	depends on UBUNTU_FOCAL || UBUNTU_JAMMY
+	help
+	  Select better local Ubuntu mirror instead of archive.ubuntu.com
+
+config MIRROR_UBUNTU_URL
+	string "URL of Ubuntu mirror"
+	default "http://archive.ubuntu.com"
+	depends on MIRROR_UBUNTU
+
+config KAS_INCLUDE_MIRROR_UBUNTU
+	string
+	default "kas/opt/mirror-ubuntu.yaml"
+	depends on MIRROR_UBUNTU
+
+endmenu
new file mode 100644
@@ -0,0 +1,10 @@ 
+# This software is a part of ISAR.
+# Copyright (C) 2023 ilbers GmbH
+
+header:
+  version: 14
+
+local_conf_header:
+  mirror-debian: |
+    DISTRO_APT_PREMIRRORS += "\
+      http://deb\.debian\.org ${MIRROR_DEBIAN_URL}\n"
new file mode 100644
@@ -0,0 +1,10 @@ 
+# This software is a part of ISAR.
+# Copyright (C) 2023 ilbers GmbH
+
+header:
+  version: 14
+
+local_conf_header:
+  mirror-ubuntu: |
+    DISTRO_APT_PREMIRRORS += "\
+      http://archive\.ubuntu\.com ${MIRROR_UBUNTU_URL}\n"
 
  
This allows to select better (faster) mirror for Debian and Ubuntu distributions. Isar DISTRO_APT_PREMIRRORS is used under the hood. Signed-off-by: Uladzimir Bely <ubely@ilbers.de> --- Kconfig | 1 + kas/opt/Kconfig | 43 ++++++++++++++++++++++++++++++++++++++ kas/opt/mirror-debian.yaml | 10 +++++++++ kas/opt/mirror-ubuntu.yaml | 10 +++++++++ 4 files changed, 64 insertions(+) create mode 100644 kas/opt/Kconfig create mode 100644 kas/opt/mirror-debian.yaml create mode 100644 kas/opt/mirror-ubuntu.yaml