mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-24 18:03:25 +00:00
Avoid inline comments in variable assignments in Makefile
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
dbee797bca
commit
065a3bd1c3
6
Makefile
6
Makefile
@ -37,7 +37,8 @@ FEATURES ?=
|
|||||||
# End of auto test features.
|
# End of auto test features.
|
||||||
|
|
||||||
# Network settings
|
# Network settings
|
||||||
NETDEV ?= user # Possible values are user,tap
|
# NETDEV possible values are user,tap
|
||||||
|
NETDEV ?= user
|
||||||
VHOST ?= off
|
VHOST ?= off
|
||||||
# End of network settings
|
# End of network settings
|
||||||
|
|
||||||
@ -98,7 +99,8 @@ endif
|
|||||||
ifeq ($(BOOT_PROTOCOL), linux-efi-handover64)
|
ifeq ($(BOOT_PROTOCOL), linux-efi-handover64)
|
||||||
CARGO_OSDK_ARGS += --grub-mkrescue=/usr/bin/grub-mkrescue
|
CARGO_OSDK_ARGS += --grub-mkrescue=/usr/bin/grub-mkrescue
|
||||||
CARGO_OSDK_ARGS += --grub-boot-protocol="linux"
|
CARGO_OSDK_ARGS += --grub-boot-protocol="linux"
|
||||||
CARGO_OSDK_ARGS += --encoding raw # FIXME: GZIP self-decompression triggers CPU faults
|
# FIXME: GZIP self-decompression (--encoding gzip) triggers CPU faults
|
||||||
|
CARGO_OSDK_ARGS += --encoding raw
|
||||||
else ifeq ($(BOOT_PROTOCOL), linux-legacy32)
|
else ifeq ($(BOOT_PROTOCOL), linux-legacy32)
|
||||||
CARGO_OSDK_ARGS += --linux-x86-legacy-boot
|
CARGO_OSDK_ARGS += --linux-x86-legacy-boot
|
||||||
CARGO_OSDK_ARGS += --grub-boot-protocol="linux"
|
CARGO_OSDK_ARGS += --grub-boot-protocol="linux"
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
# SPDX-License-Identifier: MPL-2.0
|
# SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
MAKEFLAGS += --no-builtin-rules # Prevent the implicit rules from compiling ".c" or ".s" files automatically.
|
# Prevent the implicit rules from compiling ".c" or ".s" files automatically.
|
||||||
|
MAKEFLAGS += --no-builtin-rules
|
||||||
|
|
||||||
MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
|
MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
|
||||||
CUR_DIR := $(patsubst %/,%,$(dir $(MKFILE_PATH)))
|
CUR_DIR := $(patsubst %/,%,$(dir $(MKFILE_PATH)))
|
||||||
|
@ -28,11 +28,11 @@ LMBENCH_TCP_BW_RAND_PORT=${LMBENCH_TCP_BW_PORT:-$(shuf -i 1024-65535 -n 1)}
|
|||||||
# Optional QEMU arguments. Opt in them manually if needed.
|
# Optional QEMU arguments. Opt in them manually if needed.
|
||||||
# QEMU_OPT_ARG_DUMP_PACKETS="-object filter-dump,id=filter0,netdev=net01,file=virtio-net.pcap"
|
# QEMU_OPT_ARG_DUMP_PACKETS="-object filter-dump,id=filter0,netdev=net01,file=virtio-net.pcap"
|
||||||
|
|
||||||
if [[ "$NETDEV" =~ "user" ]]; then
|
if [ "$NETDEV" = "user" ]; then
|
||||||
echo "[$1] Forwarded QEMU guest port: $SSH_RAND_PORT->22; $NGINX_RAND_PORT->8080 $REDIS_RAND_PORT->6379 $IPERF_RAND_PORT->5201 $LMBENCH_TCP_LAT_RAND_PORT->31234 $LMBENCH_TCP_BW_RAND_PORT->31236" 1>&2
|
echo "[$1] Forwarded QEMU guest port: $SSH_RAND_PORT->22; $NGINX_RAND_PORT->8080 $REDIS_RAND_PORT->6379 $IPERF_RAND_PORT->5201 $LMBENCH_TCP_LAT_RAND_PORT->31234 $LMBENCH_TCP_BW_RAND_PORT->31236" 1>&2
|
||||||
NETDEV_ARGS="-netdev user,id=net01,hostfwd=tcp::$SSH_RAND_PORT-:22,hostfwd=tcp::$NGINX_RAND_PORT-:8080,hostfwd=tcp::$REDIS_RAND_PORT-:6379,hostfwd=tcp::$IPERF_RAND_PORT-:5201,hostfwd=tcp::$LMBENCH_TCP_LAT_RAND_PORT-:31234,hostfwd=tcp::$LMBENCH_TCP_BW_RAND_PORT-:31236"
|
NETDEV_ARGS="-netdev user,id=net01,hostfwd=tcp::$SSH_RAND_PORT-:22,hostfwd=tcp::$NGINX_RAND_PORT-:8080,hostfwd=tcp::$REDIS_RAND_PORT-:6379,hostfwd=tcp::$IPERF_RAND_PORT-:5201,hostfwd=tcp::$LMBENCH_TCP_LAT_RAND_PORT-:31234,hostfwd=tcp::$LMBENCH_TCP_BW_RAND_PORT-:31236"
|
||||||
VIRTIO_NET_FEATURES=",mrg_rxbuf=off,ctrl_rx=off,ctrl_rx_extra=off,ctrl_vlan=off,ctrl_vq=off,ctrl_guest_offloads=off,ctrl_mac_addr=off,event_idx=off,queue_reset=off,guest_announce=off,indirect_desc=off"
|
VIRTIO_NET_FEATURES=",mrg_rxbuf=off,ctrl_rx=off,ctrl_rx_extra=off,ctrl_vlan=off,ctrl_vq=off,ctrl_guest_offloads=off,ctrl_mac_addr=off,event_idx=off,queue_reset=off,guest_announce=off,indirect_desc=off"
|
||||||
elif [[ "$NETDEV" =~ "tap" ]]; then
|
elif [ "$NETDEV" = "tap" ]; then
|
||||||
THIS_SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
THIS_SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||||
QEMU_IFUP_SCRIPT_PATH=$THIS_SCRIPT_DIR/net/qemu-ifup.sh
|
QEMU_IFUP_SCRIPT_PATH=$THIS_SCRIPT_DIR/net/qemu-ifup.sh
|
||||||
QEMU_IFDOWN_SCRIPT_PATH=$THIS_SCRIPT_DIR/net/qemu-ifdown.sh
|
QEMU_IFDOWN_SCRIPT_PATH=$THIS_SCRIPT_DIR/net/qemu-ifdown.sh
|
||||||
|
Reference in New Issue
Block a user