Skip to content

Commit

Permalink
Merge branch 'main' into feature/enable-rockchip-in-kernel
Browse files Browse the repository at this point in the history
  • Loading branch information
sambonbonne authored Jan 18, 2025
2 parents 704d975 + c2d18cf commit 9ed0ab0
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 7 deletions.
18 changes: 16 additions & 2 deletions build_library/qemu_template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ IGNITION_CONFIG_FILE=""
CONFIG_IMAGE=""
SWTPM_DIR=
SAFE_ARGS=0
FORWARDED_PORTS=""
USAGE="Usage: $0 [-a authorized_keys] [--] [qemu options...]
Options:
-i FILE File containing an Ignition config
Expand All @@ -28,6 +29,7 @@ Options:
-a FILE SSH public keys for login access. [~/.ssh/id_{dsa,rsa}.pub]
-p PORT The port on localhost to map to the VM's sshd. [2222]
-I FILE Set a custom image file.
-f PORT Forward host_port:guest_port.
-M MB Set VM memory in MBs.
-T DIR Add a software TPM2 device through swtpm which stores secrets
and the control socket to the given directory. This may need
Expand Down Expand Up @@ -84,6 +86,9 @@ while [ $# -ge 1 ]; do
-p|-ssh-port)
SSH_PORT="$2"
shift 2 ;;
-f|-forward-port)
FORWARDED_PORTS="${FORWARDED_PORTS} $2"
shift 2 ;;
-s|-safe)
SAFE_ARGS=1
shift ;;
Expand Down Expand Up @@ -203,6 +208,15 @@ if [ -z "${CONFIG_IMAGE}" ]; then
fi
fi

# Process port forwards
QEMU_FORWARDED_PORTS=""
for port in ${FORWARDED_PORTS}; do
host_port=${port%:*}
guest_port=${port#*:}
QEMU_FORWARDED_PORTS="${QEMU_FORWARDED_PORTS},hostfwd=tcp::${host_port}-:${guest_port}"
done
QEMU_FORWARDED_PORTS="${QEMU_FORWARDED_PORTS#,}"

# Start assembling our default command line arguments
if [ "${SAFE_ARGS}" -eq 1 ]; then
# Disable KVM, for testing things like UEFI which don't like it
Expand Down Expand Up @@ -288,7 +302,7 @@ case "${VM_BOARD}" in
qemu-system-x86_64 \
-name "$VM_NAME" \
-m ${VM_MEMORY} \
-netdev user,id=eth0,hostfwd=tcp::"${SSH_PORT}"-:22,hostname="${VM_NAME}" \
-netdev user,id=eth0${QEMU_FORWARDED_PORTS:+,}${QEMU_FORWARDED_PORTS},hostfwd=tcp::"${SSH_PORT}"-:22,hostname="${VM_NAME}" \
-device virtio-net-pci,netdev=eth0 \
-object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0 \
"$@"
Expand All @@ -297,7 +311,7 @@ case "${VM_BOARD}" in
qemu-system-aarch64 \
-name "$VM_NAME" \
-m ${VM_MEMORY} \
-netdev user,id=eth0,hostfwd=tcp::"${SSH_PORT}"-:22,hostname="${VM_NAME}" \
-netdev user,id=eth0${QEMU_FORWARDED_PORTS:+,}${QEMU_FORWARDED_PORTS},hostfwd=tcp::"${SSH_PORT}"-:22,hostname="${VM_NAME}" \
-device virtio-net-device,netdev=eth0 \
-object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0 \
"$@"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fixed creating netdev arguments to correctly include commas when no port forwards are passed ([flatcar/scripts#2581](https://github.com/flatcar/scripts/pull/2581))
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Added support for multiple port forwarding parameters in the QEMU startup script. Users can now specify multiple port forwards using the `-f` option. ([flatcar/scripts#2575](https://github.com/flatcar/scripts/pull/2575))
1 change: 1 addition & 0 deletions changelog/updates/2025-01-11-linux-6.6.71-update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Linux ([6.6.71](https://lwn.net/Articles/1004703) (includes [6.6.70](https://lwn.net/Articles/1004551)))
8 changes: 4 additions & 4 deletions sdk_container/.repo/manifests/version.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FLATCAR_VERSION=4211.0.0+nightly-20250110-2100
FLATCAR_VERSION_ID=4211.0.0
FLATCAR_BUILD_ID="nightly-20250110-2100"
FLATCAR_SDK_VERSION=4211.0.0+nightly-20250110-2100
FLATCAR_VERSION=4216.0.0+nightly-20250115-2100
FLATCAR_VERSION_ID=4216.0.0
FLATCAR_BUILD_ID="nightly-20250115-2100"
FLATCAR_SDK_VERSION=4216.0.0+nightly-20250115-2100
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
DIST linux-6.12.tar.xz 147906904 BLAKE2B b2ec2fc69218cacabbbe49f78384a5d259ca581b717617c12b000b16f4a4c59ee348ea886b37147f5f70fb9a7a01c1e2c8f19021078f6b23f5bc62d1c48d5e5e SHA512 a37b1823df7b4f72542f689b65882634740ba0401a42fdcf6601d9efd2e132e5a7650e70450ba76f6cd1f13ca31180f2ccee9d54fe4df89bc0000ade4380a548

0 comments on commit 9ed0ab0

Please sign in to comment.