git clone https://github.com/intel/sriov-network-device-plugin
pushd sriov-network-device-plugin
# [optional] Running on a VM? - add a virtio net to the ConfigMap
# NOTE: The QEMU VM must have an extra virtio NIC device and support iommu:
# -machine q35,accel=kvm,kernel_irqchip=split -device intel-iommu,intremap=on,caching-mode=on,device-iotlb=on -netdev user,id=mynet1 -device virtio-net-pci,netdev=mynet1,disable-legacy=on,disable-modern=off,iommu_platform=on,ats=on
sed -i 's|resourceList.*|resourceList": [{"resourceName":"virtio_net","selectors":{"vendors":["1af4"],"devices":["1041"],"drivers":["vfio-pci"],"pfNames":["eth1"]}},{|g' deployments/configMap.yaml
#
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) 2020 Julio Montes | |
// | |
// SPDX-License-Identifier: Apache-2.0 | |
// | |
// convert a string in format 24h to seconds at compile time | |
#include <stdexcept> | |
#include <string> | |
using namespace std; |
socat -d -d unix-client:/run/vc/sbs/18b2d72aa31b721b96d50e606684ab92fac19244cddd604dae35428fda5a28ce/console.sock pty,echo=0,raw &> /tmp/log &
sleep 1
pts=$(grep "N PTY is" /tmp/log | egrep -o "/dev/pts/[0-9]+")
echo "" > $pts
echo "uptime" > $pts
uptime=$(head -4 $pts)
killall socat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Automatically generated file; DO NOT EDIT. | |
# Linux/arm64 4.9.51 Kernel Configuration | |
# | |
CONFIG_ARM64=y | |
CONFIG_64BIT=y | |
CONFIG_ARCH_PHYS_ADDR_T_64BIT=y | |
CONFIG_MMU=y | |
CONFIG_DEBUG_RODATA=y | |
CONFIG_ARM64_PAGE_SHIFT=12 |
sudo -E FS_TYPE="ext4" USE_DOCKER=1 DISTRO=clearlinux AGENT_INIT=no EXTRA_PKGS="dbus-bin dbus-autostart util-linux-bin p11-kit-bin bash shadow ca-certs dist-pam-configs xz-bin tar-bin grep-bin sed-bin pigz-bin iproute2-bin procps-ng-bin psstop-bin htop-bin curl nano make-bin coreutils-bin pciutils strace-bin e2fsprogs-extras" make -e rootfs
sudo -E FS_TYPE="ext4" USE_DOCKER=1 DISTRO=clearlinux make -e image
WARNING: Comment "The list of systemd units and files that are not needed in Kata Containers" in image-builder/image_builder.sh