new file mode 100644
@@ -0,0 +1,9 @@
+#
+# A minimal version of the config that only supports only a few
+# virtual machines. This avoids bringing in any of numerous legacy
+# features from the 32bit platform (although virt still supports 32bit
+# itself)
+#
+
+CONFIG_ARM_VIRT=y
+CONFIG_SBSA_REF=y
@@ -915,6 +915,18 @@ for opt do
;;
--without-default-devices) default_devices="false"
;;
+ --with-devices-*[!a-zA-Z0-9_-]*=*) error_exit "Passed bad --with-devices-FOO option"
+ ;;
+ --with-devices-*) device_arch=${opt#--with-devices-};
+ device_arch=${device_arch%%=*}
+ cf=$source_path/configs/devices/$device_arch-softmmu/$optarg.mak
+ if test -f "$cf"; then
+ device_archs="$device_archs $device_arch"
+ eval "devices_${device_arch}=\$optarg"
+ else
+ error_exit "File $cf does not exist"
+ fi
+ ;;
--without-default-features) # processed above
;;
--enable-gprof) gprof="yes"
@@ -1764,7 +1776,8 @@ Advanced options (experts only):
--without-default-features default all --enable-* options to "disabled"
--without-default-devices do not include any device that is not needed to
start the emulator (only use if you are including
- desired devices in default-configs/devices/)
+ desired devices in configs/devices/)
+ --with-devices-ARCH=NAME override default configs/devices
--enable-debug enable common debug build options
--enable-sanitizers enable default sanitizers
--enable-tsan enable thread sanitizer
@@ -5082,6 +5095,15 @@ if test "$skip_meson" = no; then
echo "# Automatically generated by configure - do not modify" > $cross
echo "[properties]" >> $cross
+
+ # unroll any custom device configs
+ if test -n "$device_archs"; then
+ for a in $device_archs; do
+ eval "c=\$devices_${a}"
+ echo "${a}-softmmu = '$c'" >> $cross
+ done
+ fi
+
test -z "$cxx" && echo "link_language = 'c'" >> $cross
echo "[built-in options]" >> $cross
echo "c_args = [${CFLAGS:+$(meson_quote $CFLAGS)}]" >> $cross
@@ -1595,9 +1595,10 @@ foreach target : target_dirs
configuration: config_target_data)}
if target.endswith('-softmmu')
+ config_input = meson.get_external_property(target, 'default')
config_devices_mak = target + '-config-devices.mak'
config_devices_mak = configure_file(
- input: ['configs/devices' / target / 'default.mak', 'Kconfig'],
+ input: ['configs/devices' / target / config_input + '.mak', 'Kconfig'],
output: config_devices_mak,
depfile: config_devices_mak + '.d',
capture: true,