Merge pull request #692 from s-urbaniak/minikube-iso

add buildroot based minikube-iso build infrastructure
pull/714/head
dlorenc 2016-10-18 13:58:57 -07:00 committed by GitHub
commit 9de8cf8da6
51 changed files with 1347 additions and 1 deletions

View File

@ -72,7 +72,17 @@ localkube-image: out/localkube
make -C deploy/docker VERSION=$(VERSION)
iso:
cd deploy/iso && ./build.sh
cd deploy/iso/boot2docker && ./build.sh
minikube-iso:
[ ! -e $(BUILD_DIR)/buildroot ] && \
mkdir -p $(BUILD_DIR) && \
git clone https://github.com/buildroot/buildroot $(BUILD_DIR)/buildroot && \
cd $(BUILD_DIR)/buildroot && \
git checkout 2016.08 && \
make BR2_EXTERNAL=../../deploy/iso/minikube-iso minikube_defconfig && \
cd ../..
cd $(BUILD_DIR)/buildroot && make
.PHONY: integration
integration: out/minikube

View File

@ -0,0 +1 @@
source "$BR2_EXTERNAL/package/Config.in"

View File

@ -0,0 +1,116 @@
## minikube ISO image
This includes the configuration for an alternative bootable ISO image meant to be used in conjection with minikube.
It includes:
- systemd as the init system
- rkt
- docker
## Configurations
The following configurations have been tested:
* OSX
* Virtualbox
* VMware Fusion
* Linux
* Virtualbox
* KVM
The following configurations are known to have issues currently:
* OSX
* xhyve (https://github.com/coreos/minikube-iso/issues/17)
## Hacking
### Build instructions
```
$ git clone https://github.com/kubernetes/minikube
$ cd minikube
$ make minikube-iso
```
The bootable ISO image will be available in `out/buildroot/output/images/rootfs.iso9660`.
### Testing local minikube changes
To test a local build of minikube, include a `kubernetes-version` flag with a path to the `localkube` output from your source build directory:
```
$ cd minikube
$ ./out/minikube start \
--container-runtime=rkt \
--network-plugin=cni \
--kubernetes-version=file://$HOME/minikube/src/k8s.io/minikube/out/localkube \
--iso-url=https://github.com/coreos/minikube-iso/releases/download/v0.0.5/minikube-v0.0.5.iso
```
### Testing local minikube-iso changes
To test a local build of minikube-iso, start a web server (i.e. Caddy) to serve the ISO image, and start `minikube` with an `--iso-url` pointing to localhost:
```
$ cd $HOME/src/minikube/src/k8s.io/minikube
$ cd ./out/buildroot/output/images
$ caddy browse "log stdout"
Activating privacy features... done.
http://:2015
```
In another terminal:
```
$ minikube start --iso-url=http://localhost:2015/rootfs.iso9660
```
### Buildroot configuration
To change the buildroot configuration, execute:
```
$ cd out/buildroot
$ make menuconfig
$ make
```
To change the kernel configuration, execute:
```
$ cd out/buildroot
$ make linux-menuconfig
$ make
```
The last commands copies changes made to the kernel configuration to the minikube-iso defconfig.
### Saving buildroot/kernel configuration changes
To save any buildroot configuration changes made with `make menuconfig`, execute:
```
$ cd out/buildroot
$ make savedefconfig
```
The changes will be reflected in the `minikube-iso/configs/minikube_defconfig` file.
```
$ git stat
## master
M deploy/iso/minikube-iso/configs/minikube_defconfig
```
To save any kernel configuration changes made with `make linux-menuconfig`, execute:
```
$ cd out/buildroot
$ make linux-savedefconfig
$ cp output/build/linux-4.7.2/defconfig \
../../deploy/iso/minikube-iso/board/coreos/minikube/linux-4.7_defconfig
```
The changes will be reflected in the `deploy/iso/minikube-iso/configs/minikube_defconfig` file.

View File

@ -0,0 +1,5 @@
default 1
label 1
kernel /boot/bzImage
initrd /boot/initrd
append root=/dev/sr0 loglevel=3 console=tty0 noembed nomodeset norestore waitusb=10

View File

@ -0,0 +1,415 @@
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
CONFIG_AUDIT=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_TASKSTATS=y
CONFIG_TASK_DELAY_ACCT=y
CONFIG_TASK_XACCT=y
CONFIG_TASK_IO_ACCOUNTING=y
CONFIG_LOG_BUF_SHIFT=18
CONFIG_CGROUPS=y
CONFIG_MEMCG=y
CONFIG_MEMCG_SWAP=y
CONFIG_BLK_CGROUP=y
CONFIG_CGROUP_SCHED=y
CONFIG_CFS_BANDWIDTH=y
CONFIG_RT_GROUP_SCHED=y
CONFIG_CGROUP_PIDS=y
CONFIG_CGROUP_FREEZER=y
CONFIG_CGROUP_HUGETLB=y
CONFIG_CPUSETS=y
CONFIG_CGROUP_DEVICE=y
CONFIG_CGROUP_CPUACCT=y
CONFIG_CGROUP_PERF=y
CONFIG_BLK_DEV_INITRD=y
# CONFIG_COMPAT_BRK is not set
CONFIG_PROFILING=y
CONFIG_KPROBES=y
CONFIG_JUMP_LABEL=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
CONFIG_PARTITION_ADVANCED=y
CONFIG_OSF_PARTITION=y
CONFIG_AMIGA_PARTITION=y
CONFIG_MAC_PARTITION=y
CONFIG_BSD_DISKLABEL=y
CONFIG_MINIX_SUBPARTITION=y
CONFIG_SOLARIS_X86_PARTITION=y
CONFIG_UNIXWARE_DISKLABEL=y
CONFIG_SGI_PARTITION=y
CONFIG_SUN_PARTITION=y
CONFIG_KARMA_PARTITION=y
CONFIG_SMP=y
CONFIG_HYPERVISOR_GUEST=y
CONFIG_PARAVIRT=y
CONFIG_PARAVIRT_SPINLOCKS=y
CONFIG_KVM_DEBUG_FS=y
CONFIG_CALGARY_IOMMU=y
CONFIG_SCHED_SMT=y
CONFIG_PREEMPT_VOLUNTARY=y
CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y
CONFIG_MICROCODE_AMD=y
CONFIG_X86_MSR=y
CONFIG_X86_CPUID=y
CONFIG_NUMA=y
CONFIG_X86_CHECK_BIOS_CORRUPTION=y
# CONFIG_MTRR_SANITIZER is not set
CONFIG_EFI=y
CONFIG_HZ_1000=y
CONFIG_KEXEC=y
CONFIG_CRASH_DUMP=y
CONFIG_HIBERNATION=y
CONFIG_PM_DEBUG=y
CONFIG_PM_TRACE_RTC=y
CONFIG_ACPI_DOCK=y
CONFIG_CPU_FREQ=y
# CONFIG_CPU_FREQ_STAT is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_X86_ACPI_CPUFREQ=y
CONFIG_PCI_MMCONFIG=y
CONFIG_PCIEPORTBUS=y
CONFIG_HOTPLUG_PCI=y
CONFIG_PCCARD=y
CONFIG_YENTA=y
CONFIG_BINFMT_MISC=y
CONFIG_IA32_EMULATION=y
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
CONFIG_XFRM_USER=y
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_IP_MULTIPLE_TABLES=y
CONFIG_IP_ROUTE_MULTIPATH=y
CONFIG_IP_ROUTE_VERBOSE=y
CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=y
CONFIG_IP_PNP_BOOTP=y
CONFIG_IP_PNP_RARP=y
CONFIG_IP_MROUTE=y
CONFIG_IP_PIMSM_V1=y
CONFIG_IP_PIMSM_V2=y
CONFIG_SYN_COOKIES=y
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
# CONFIG_INET_XFRM_MODE_BEET is not set
# CONFIG_INET_DIAG is not set
CONFIG_TCP_CONG_ADVANCED=y
# CONFIG_TCP_CONG_BIC is not set
# CONFIG_TCP_CONG_WESTWOOD is not set
# CONFIG_TCP_CONG_HTCP is not set
CONFIG_TCP_MD5SIG=y
CONFIG_INET6_AH=y
CONFIG_INET6_ESP=y
CONFIG_NETLABEL=y
CONFIG_NETFILTER=y
CONFIG_NETFILTER_NETLINK_ACCT=y
CONFIG_NETFILTER_NETLINK_QUEUE=y
CONFIG_NF_CONNTRACK=m
CONFIG_NF_CONNTRACK_EVENTS=y
CONFIG_NF_CONNTRACK_TIMEOUT=y
CONFIG_NF_CONNTRACK_TIMESTAMP=y
CONFIG_NF_CONNTRACK_FTP=m
CONFIG_NF_CONNTRACK_IRC=m
CONFIG_NF_CONNTRACK_SANE=m
CONFIG_NF_CONNTRACK_SIP=m
CONFIG_NF_CONNTRACK_TFTP=m
CONFIG_NF_CT_NETLINK=m
CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m
CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
CONFIG_NETFILTER_XT_TARGET_DSCP=m
CONFIG_NETFILTER_XT_TARGET_HL=m
CONFIG_NETFILTER_XT_TARGET_HMARK=m
CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m
CONFIG_NETFILTER_XT_TARGET_LED=m
CONFIG_NETFILTER_XT_TARGET_LOG=m
CONFIG_NETFILTER_XT_TARGET_MARK=m
CONFIG_NETFILTER_XT_TARGET_NFLOG=m
CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
CONFIG_NETFILTER_XT_TARGET_TEE=m
CONFIG_NETFILTER_XT_TARGET_TPROXY=m
CONFIG_NETFILTER_XT_TARGET_SECMARK=m
CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m
CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m
CONFIG_NETFILTER_XT_MATCH_BPF=m
CONFIG_NETFILTER_XT_MATCH_CGROUP=m
CONFIG_NETFILTER_XT_MATCH_CLUSTER=m
CONFIG_NETFILTER_XT_MATCH_COMMENT=m
CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
CONFIG_NETFILTER_XT_MATCH_CONNLABEL=m
CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
CONFIG_NETFILTER_XT_MATCH_CPU=m
CONFIG_NETFILTER_XT_MATCH_DCCP=m
CONFIG_NETFILTER_XT_MATCH_DEVGROUP=m
CONFIG_NETFILTER_XT_MATCH_DSCP=m
CONFIG_NETFILTER_XT_MATCH_ECN=m
CONFIG_NETFILTER_XT_MATCH_ESP=m
CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
CONFIG_NETFILTER_XT_MATCH_HELPER=m
CONFIG_NETFILTER_XT_MATCH_HL=m
CONFIG_NETFILTER_XT_MATCH_IPCOMP=m
CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
CONFIG_NETFILTER_XT_MATCH_L2TP=m
CONFIG_NETFILTER_XT_MATCH_LENGTH=m
CONFIG_NETFILTER_XT_MATCH_LIMIT=m
CONFIG_NETFILTER_XT_MATCH_MAC=m
CONFIG_NETFILTER_XT_MATCH_MARK=m
CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
CONFIG_NETFILTER_XT_MATCH_NFACCT=m
CONFIG_NETFILTER_XT_MATCH_OSF=m
CONFIG_NETFILTER_XT_MATCH_OWNER=m
CONFIG_NETFILTER_XT_MATCH_POLICY=m
CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
CONFIG_NETFILTER_XT_MATCH_QUOTA=m
CONFIG_NETFILTER_XT_MATCH_RATEEST=m
CONFIG_NETFILTER_XT_MATCH_REALM=m
CONFIG_NETFILTER_XT_MATCH_RECENT=m
CONFIG_NETFILTER_XT_MATCH_SCTP=m
CONFIG_NETFILTER_XT_MATCH_SOCKET=m
CONFIG_NETFILTER_XT_MATCH_STATE=m
CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
CONFIG_NETFILTER_XT_MATCH_STRING=m
CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
CONFIG_NETFILTER_XT_MATCH_TIME=m
CONFIG_NETFILTER_XT_MATCH_U32=m
CONFIG_NF_CONNTRACK_IPV4=m
CONFIG_NF_LOG_ARP=m
CONFIG_IP_NF_IPTABLES=y
CONFIG_IP_NF_FILTER=y
CONFIG_IP_NF_TARGET_REJECT=y
CONFIG_IP_NF_NAT=m
CONFIG_IP_NF_TARGET_MASQUERADE=m
CONFIG_IP_NF_TARGET_NETMAP=m
CONFIG_IP_NF_TARGET_REDIRECT=m
CONFIG_IP_NF_MANGLE=y
CONFIG_NF_CONNTRACK_IPV6=m
CONFIG_IP6_NF_IPTABLES=y
CONFIG_IP6_NF_MATCH_IPV6HEADER=y
CONFIG_IP6_NF_FILTER=y
CONFIG_IP6_NF_TARGET_REJECT=y
CONFIG_IP6_NF_MANGLE=y
CONFIG_BRIDGE=m
CONFIG_NET_SCHED=y
CONFIG_NET_CLS_CGROUP=y
CONFIG_NET_EMATCH=y
CONFIG_NET_CLS_ACT=y
CONFIG_HAMRADIO=y
CONFIG_CFG80211=y
CONFIG_MAC80211=y
CONFIG_MAC80211_LEDS=y
CONFIG_RFKILL=y
CONFIG_NET_9P=m
CONFIG_NET_9P_VIRTIO=m
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_DEBUG_DEVRES=y
CONFIG_CONNECTOR=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_VIRTIO_BLK=y
CONFIG_VMWARE_BALLOON=m
CONFIG_VMWARE_VMCI=m
CONFIG_BLK_DEV_SD=y
CONFIG_BLK_DEV_SR=y
CONFIG_BLK_DEV_SR_VENDOR=y
CONFIG_CHR_DEV_SG=y
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_SPI_ATTRS=y
CONFIG_SCSI_FC_ATTRS=m
CONFIG_SCSI_ISCSI_ATTRS=m
CONFIG_SCSI_SAS_LIBSAS=m
CONFIG_SCSI_SAS_ATA=y
CONFIG_SCSI_SRP_ATTRS=m
CONFIG_MEGARAID_NEWGEN=y
CONFIG_MEGARAID_MM=m
CONFIG_VMWARE_PVSCSI=y
CONFIG_ATA=y
CONFIG_SATA_AHCI=y
CONFIG_ATA_PIIX=y
CONFIG_PATA_AMD=y
CONFIG_PATA_OLDPIIX=y
CONFIG_PATA_SCH=y
CONFIG_MD=y
CONFIG_BLK_DEV_MD=y
CONFIG_BLK_DEV_DM=y
CONFIG_DM_MIRROR=y
CONFIG_DM_ZERO=y
CONFIG_FUSION=y
CONFIG_FUSION_SPI=m
CONFIG_FUSION_FC=m
CONFIG_FUSION_SAS=m
CONFIG_FUSION_CTL=m
CONFIG_FUSION_LOGGING=y
CONFIG_MACINTOSH_DRIVERS=y
CONFIG_MAC_EMUMOUSEBTN=y
CONFIG_NETDEVICES=y
CONFIG_NETCONSOLE=y
CONFIG_VETH=y
CONFIG_VIRTIO_NET=y
CONFIG_AMD8111_ETH=m
CONFIG_PCNET32=m
CONFIG_PCMCIA_NMCLAN=m
CONFIG_TIGON3=y
CONFIG_NET_TULIP=y
CONFIG_E100=y
CONFIG_E1000=y
CONFIG_E1000E=y
CONFIG_SKY2=y
CONFIG_FORCEDETH=y
CONFIG_8139CP=y
CONFIG_8139TOO=y
CONFIG_FDDI=y
CONFIG_VMXNET3=y
CONFIG_INPUT_POLLDEV=y
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
CONFIG_INPUT_EVDEV=y
CONFIG_INPUT_JOYSTICK=y
CONFIG_INPUT_TABLET=y
CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_INPUT_MISC=y
# CONFIG_LEGACY_PTYS is not set
CONFIG_SERIAL_NONSTANDARD=y
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_NR_UARTS=32
CONFIG_SERIAL_8250_EXTENDED=y
CONFIG_SERIAL_8250_MANY_PORTS=y
CONFIG_SERIAL_8250_SHARE_IRQ=y
CONFIG_SERIAL_8250_DETECT_IRQ=y
CONFIG_SERIAL_8250_RSA=y
CONFIG_HW_RANDOM=y
# CONFIG_HW_RANDOM_INTEL is not set
# CONFIG_HW_RANDOM_AMD is not set
CONFIG_NVRAM=y
CONFIG_HPET=y
# CONFIG_HPET_MMAP is not set
CONFIG_I2C_I801=y
CONFIG_WATCHDOG=y
CONFIG_AGP=y
CONFIG_AGP_AMD64=y
CONFIG_AGP_INTEL=y
CONFIG_DRM=y
CONFIG_DRM_I915=y
CONFIG_FB_MODE_HELPERS=y
CONFIG_FB_TILEBLITTING=y
CONFIG_FB_EFI=y
# CONFIG_LCD_CLASS_DEVICE is not set
CONFIG_VGACON_SOFT_SCROLLBACK=y
CONFIG_LOGO=y
# CONFIG_LOGO_LINUX_MONO is not set
# CONFIG_LOGO_LINUX_VGA16 is not set
CONFIG_SOUND=y
CONFIG_SND=y
CONFIG_SND_SEQUENCER=y
CONFIG_SND_SEQ_DUMMY=y
CONFIG_SND_MIXER_OSS=y
CONFIG_SND_PCM_OSS=y
CONFIG_SND_SEQUENCER_OSS=y
CONFIG_SND_HRTIMER=y
CONFIG_SND_HDA_INTEL=y
CONFIG_SND_HDA_HWDEP=y
CONFIG_HIDRAW=y
CONFIG_HID_GYRATION=y
CONFIG_LOGITECH_FF=y
CONFIG_HID_NTRIG=y
CONFIG_HID_PANTHERLORD=y
CONFIG_PANTHERLORD_FF=y
CONFIG_HID_PETALYNX=y
CONFIG_HID_SAMSUNG=y
CONFIG_HID_SONY=y
CONFIG_HID_SUNPLUS=y
CONFIG_HID_TOPSEED=y
CONFIG_HID_PID=y
CONFIG_USB_HIDDEV=y
CONFIG_USB=y
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
CONFIG_USB_MON=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_UHCI_HCD=y
CONFIG_USB_PRINTER=y
CONFIG_USB_STORAGE=y
CONFIG_EDAC=y
CONFIG_RTC_CLASS=y
# CONFIG_RTC_HCTOSYS is not set
CONFIG_DMADEVICES=y
CONFIG_VIRTIO_PCI=y
CONFIG_EEEPC_LAPTOP=y
CONFIG_AMD_IOMMU=y
CONFIG_INTEL_IOMMU=y
# CONFIG_INTEL_IOMMU_DEFAULT_ON is not set
CONFIG_EFI_VARS=y
CONFIG_EXT4_FS=y
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y
CONFIG_BTRFS_FS=m
CONFIG_BTRFS_FS_POSIX_ACL=y
CONFIG_QUOTA=y
CONFIG_QUOTA_NETLINK_INTERFACE=y
# CONFIG_PRINT_QUOTA_WARNING is not set
CONFIG_QFMT_V2=y
CONFIG_AUTOFS4_FS=y
CONFIG_FUSE_FS=y
CONFIG_OVERLAY_FS=m
CONFIG_ISO9660_FS=y
CONFIG_JOLIET=y
CONFIG_ZISOFS=y
CONFIG_MSDOS_FS=y
CONFIG_VFAT_FS=y
CONFIG_PROC_KCORE=y
CONFIG_TMPFS_POSIX_ACL=y
CONFIG_HUGETLBFS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V3_ACL=y
CONFIG_NFS_V4=y
CONFIG_ROOT_NFS=y
CONFIG_9P_FS=m
CONFIG_9P_FS_POSIX_ACL=y
CONFIG_9P_FS_SECURITY=y
CONFIG_NLS_DEFAULT="utf8"
CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_ASCII=y
CONFIG_NLS_ISO8859_1=y
CONFIG_NLS_UTF8=y
CONFIG_PRINTK_TIME=y
# CONFIG_ENABLE_WARN_DEPRECATED is not set
# CONFIG_UNUSED_SYMBOLS is not set
CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_KERNEL=y
CONFIG_DEBUG_STACK_USAGE=y
CONFIG_DEBUG_STACKOVERFLOW=y
# CONFIG_SCHED_DEBUG is not set
CONFIG_SCHEDSTATS=y
CONFIG_TIMER_STATS=y
CONFIG_BLK_DEV_IO_TRACE=y
CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
CONFIG_EARLY_PRINTK_DBGP=y
# CONFIG_DEBUG_RODATA_TEST is not set
CONFIG_DEBUG_BOOT_PARAMS=y
CONFIG_OPTIMIZE_INLINING=y
CONFIG_SECURITY=y
CONFIG_SECURITY_NETWORK=y
CONFIG_SECURITY_SELINUX=y
CONFIG_SECURITY_SELINUX_BOOTPARAM=y
CONFIG_SECURITY_SELINUX_DISABLE=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_BPF=y
CONFIG_BPF_SYSCALL=y
CONFIG_NET_CLS_BPF=m
CONFIG_NET_ACT_BPF=m
CONFIG_BPF_JIT=y
CONFIG_HAVE_BPF_JIT=y
CONFIG_BPF_EVENTS=y

View File

@ -0,0 +1 @@
../../../usr/libexec/kubernetes/kubelet-plugins/net/exec/k8s.conf

View File

@ -0,0 +1,5 @@
# <file system> <mount pt> <type> <options> <dump> <pass>
/dev/root / ext2 rw,noauto 0 1
proc /proc proc defaults 0 0
devpts /dev/pts devpts defaults,gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0

View File

@ -0,0 +1,19 @@
{
"name": "rkt.kubernetes.io",
"type": "bridge",
"bridge": "mybridge",
"mtu": 1460,
"addIf": "true",
"isGateway": true,
"ipMasq": true,
"ipam": {
"type": "host-local",
"subnet": "10.1.0.0/16",
"gateway": "10.1.0.1",
"routes": [
{
"dst": "0.0.0.0/0"
}
]
}
}

View File

@ -0,0 +1,2 @@
root ALL=(ALL) ALL
%wheel ALL=(ALL) NOPASSWD: ALL

View File

@ -0,0 +1,5 @@
[Match]
Name=eth*
[Network]
DHCP=ipv4

View File

@ -0,0 +1 @@
/usr/lib/systemd/system/getty@.service

View File

@ -0,0 +1,19 @@
{
"name": "rkt.kubernetes.io",
"type": "bridge",
"bridge": "mybridge",
"mtu": 1460,
"addIf": "true",
"isGateway": true,
"ipMasq": true,
"ipam": {
"type": "host-local",
"subnet": "10.1.0.0/16",
"gateway": "10.1.0.1",
"routes": [
{
"dst": "0.0.0.0/0"
}
]
}
}

View File

@ -0,0 +1,2 @@
rkt -1 rkt -1 - /home/rkt /bin/bash rkt-admin,wheel,vboxsf -
docker -1 docker -1 =tcuser /home/docker /bin/bash rkt,rkt-admin,wheel,vboxsf -

View File

@ -0,0 +1,38 @@
BR2_x86_64=y
BR2_CCACHE=y
BR2_TOOLCHAIN_BUILDROOT_VENDOR="minikube"
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_TARGET_GENERIC_HOSTNAME="minikube"
BR2_TARGET_GENERIC_ISSUE="Welcome to minikube"
BR2_TARGET_GENERIC_PASSWD_SHA512=y
BR2_INIT_SYSTEMD=y
BR2_SYSTEM_BIN_SH_BASH=y
# BR2_TARGET_GENERIC_GETTY is not set
BR2_ROOTFS_USERS_TABLES="$(BR2_EXTERNAL)/board/coreos/minikube/users"
BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL)/board/coreos/minikube/rootfs-overlay"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL)/board/coreos/minikube/linux-4.7_defconfig"
BR2_PACKAGE_XZ=y
BR2_PACKAGE_E2FSPROGS=y
BR2_PACKAGE_PARTED=y
BR2_PACKAGE_CA_CERTIFICATES=y
BR2_PACKAGE_LIBFUSE=y
BR2_PACKAGE_BRIDGE_UTILS=y
BR2_PACKAGE_IPROUTE2=y
BR2_PACKAGE_IPTABLES=y
BR2_PACKAGE_OPENSSH=y
BR2_PACKAGE_SOCAT=y
BR2_PACKAGE_SUDO=y
BR2_PACKAGE_ACL=y
# BR2_PACKAGE_SYSTEMD_HWDB is not set
BR2_PACKAGE_SYSTEMD_LOGIND=y
BR2_PACKAGE_SYSTEMD_MACHINED=y
# BR2_PACKAGE_SYSTEMD_TIMESYNCD is not set
BR2_PACKAGE_UTIL_LINUX_NSENTER=y
BR2_TARGET_ROOTFS_CPIO_BZIP2=y
BR2_TARGET_ROOTFS_ISO9660=y
BR2_TARGET_SYSLINUX=y
BR2_PACKAGE_OPENVMTOOLS10=y
BR2_PACKAGE_OPENVMTOOLS10_PROCPS=y

View File

@ -0,0 +1 @@
include $(sort $(wildcard $(BR2_EXTERNAL)/package/*/*.mk))

View File

@ -0,0 +1,8 @@
menu "System tools"
source "$BR2_EXTERNAL/package/rkt-bin/Config.in"
source "$BR2_EXTERNAL/package/automount/Config.in"
source "$BR2_EXTERNAL/package/docker-bin/Config.in"
source "$BR2_EXTERNAL/package/cni-bin/Config.in"
source "$BR2_EXTERNAL/package/openvmtools10/Config.in"
source "$BR2_EXTERNAL/package/vbox-guest/Config.in"
endmenu

View File

@ -0,0 +1,3 @@
config BR2_PACKAGE_AUTOMOUNT
bool "automount"
default y

View File

@ -0,0 +1,22 @@
################################################################################
#
# minikube automount
#
################################################################################
define AUTOMOUNT_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 644 \
$(BR2_EXTERNAL)/package/automount/minikube-automount.service \
$(TARGET_DIR)/usr/lib/systemd/system/minikube-automount.service
ln -fs /usr/lib/systemd/system/minikube-automount.service \
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/minikube-automount.service
endef
define AUTOMOUNT_INSTALL_TARGET_CMDS
$(INSTALL) -Dm755 \
$(BR2_EXTERNAL)/package/automount/minikube-automount \
$(TARGET_DIR)/usr/sbin/minikube-automount
endef
$(eval $(generic-package))

View File

@ -0,0 +1,159 @@
#!/bin/bash
set -x
echo "automount ...";
LABEL=boot2docker-data
MAGIC="boot2docker, please format-me"
# If there is a partition with `boot2docker-data` as its label, use it and be
# very happy. Thus, you can come along if you feel like a room without a roof.
BOOT2DOCKER_DATA=`blkid -o device -l -t LABEL=$LABEL`
echo $BOOT2DOCKER_DATA
if [ ! -n "$BOOT2DOCKER_DATA" ]; then
echo "Is the disk unpartitioned?, test for the 'boot2docker format-me' string"
# Is the disk unpartitioned?, test for the 'boot2docker format-me' string
UNPARTITIONED_HD="/dev/$(lsblk | grep disk | cut -f1 -d' ')"
parted --script "$UNPARTITIONED_HD" print | grep "Partition Table: unknown"
if [ $? -eq 0 ]; then
# Test for our magic string (it means that the disk was made by ./boot2docker init)
HEADER=`dd if=$UNPARTITIONED_HD bs=1 count=${#MAGIC} 2>/dev/null`
if [ "$HEADER" = "$MAGIC" ]; then
# save the preload userdata.tar file
dd if=$UNPARTITIONED_HD of=/userdata.tar bs=1 count=4096 2>/dev/null
# Create the partition, format it and then mount it
echo "NEW boot2docker managed disk image ($UNPARTITIONED_HD): formatting it for use"
# Add a swap partition (so Docker doesn't complain about it missing)
(echo n; echo p; echo 2; echo ; echo +1000M ; echo w) | fdisk $UNPARTITIONED_HD
# Let kernel re-read partition table
partprobe
(echo t; echo 82; echo w) | fdisk $UNPARTITIONED_HD
# Let kernel re-read partition table
partprobe
# wait for the partition to actually exist, timeout after about 5 seconds
local timer=0
while [ "$timer" -lt 10 -a ! -b "${UNPARTITIONED_HD}2" ]; do
timer=$((timer + 1))
sleep 0.5
done
mkswap "${UNPARTITIONED_HD}2"
# Add the data partition
(echo n; echo p; echo 1; echo ; echo ; echo w) | fdisk $UNPARTITIONED_HD
# Let kernel re-read partition table
partprobe
# wait for the partition to actually exist, timeout after about 5 seconds
timer=0
while [ "$timer" -lt 10 -a ! -b "${UNPARTITIONED_HD}1" ]; do
timer=$((timer + 1))
sleep 0.5
done
BOOT2DOCKER_DATA=`echo "${UNPARTITIONED_HD}1"`
mkfs.ext4 -i 8192 -L $LABEL $BOOT2DOCKER_DATA
swapon "${UNPARTITIONED_HD}2"
fi
DISK_VENDOR=$(cat /sys/class/block/$(basename $UNPARTITIONED_HD /dev/)/device/vendor /sys/class/block/$(basename $UNPARTITIONED_HD /dev/)/device/model | tr -d "\n")
# Test if disk is "VMware, VMware Virtual S" and empty.
if [ "$DISK_VENDOR" = "VMware, VMware Virtual S" ] || [ "$DISK_VENDOR" = "VMware Virtual disk " ]; then
# Check whether the disk has any known partitions on it
blkid -o device $UNPARTITIONED_HD
if [ $? == 2 ]; then
# As there are no partitions, let's make sure the disk is empty for real
dd if=$UNPARTITIONED_HD of=device_test_file bs=1k count=256 > /dev/null 2>&1
NON_NUL=$(<device_test_file tr -d '\0\n' | wc -c)
if [ $NON_NUL == 0 ]; then
# Create the partition, format it and then mount it
echo "NEW VMware boot2docker managed disk image ($UNPARTITIONED_HD): formatting it for use"
# Add a swap partition (so Docker doesn't complain about it missing)
(echo n; echo p; echo 2; echo ; echo +1000M ; echo w) | fdisk $UNPARTITIONED_HD
(echo t; echo 82) | fdisk $UNPARTITIONED_HD
mkswap "${UNPARTITIONED_HD}2"
# Add the data partition
(echo n; echo p; echo 1; echo ; echo ; echo w) | fdisk $UNPARTITIONED_HD
BOOT2DOCKER_DATA=`echo "${UNPARTITIONED_HD}1"`
mkfs.ext4 -i 8192 -L $LABEL $BOOT2DOCKER_DATA
swapon "${UNPARTITIONED_HD}2"
else
echo "Disk unpartitioned but something is there... not doing anything"
fi
else
echo "Partition table found on disk, not doing anything"
fi
fi
else
# Pick the first ext4 as a fallback
# TODO: mount all Linux partitions and look for a /var/lib/docker...
BOOT2DOCKER_DATA=`blkid | grep -e 'TYPE="btrfs"' -e 'TYPE="ext4"' | head -n 1 | sed 's/:.*//'`
fi
fi
echo $BOOT2DOCKER_DATA
if [ -n "$BOOT2DOCKER_DATA" ]; then
PARTNAME=`echo "$BOOT2DOCKER_DATA" | sed 's/.*\///'`
echo "mount p:$PARTNAME ..."
mkdir -p /mnt/$PARTNAME
if ! mount $BOOT2DOCKER_DATA /mnt/$PARTNAME 2>/dev/null; then
# for some reason, mount doesn't like to modprobe btrfs
BOOT2DOCKER_FSTYPE=`blkid -o export $BOOT2DOCKER_DATA | grep TYPE= | cut -d= -f2`
modprobe $BOOT2DOCKER_FSTYPE || true
umount -f /mnt/$PARTNAME || true
mount $BOOT2DOCKER_DATA /mnt/$PARTNAME
fi
# Just in case, the links will fail if not
umount -f /var/lib/docker || true
rm -rf /var/lib/docker /var/lib/boot2docker
mkdir -p /var/lib
mkdir -p /mnt/$PARTNAME/var/lib/boot2docker
ln -s /mnt/$PARTNAME/var/lib/boot2docker /var/lib/boot2docker
mkdir -p /mnt/$PARTNAME/var/lib/docker
ln -s /mnt/$PARTNAME/var/lib/docker /var/lib/docker
mkdir -p /mnt/$PARTNAME/var/lib/kubelet
ln -s /mnt/$PARTNAME/var/lib/kubelet /var/lib/kubelet
mkdir -p /mnt/$PARTNAME/var/lib/cni
ln -s /mnt/$PARTNAME/var/lib/cni /var/lib/cni
rm -rf /var/lib/rkt
if [ ! -d /mnt/$PARTNAME/var/lib/rkt ]; then
mkdir -p /mnt/$PARTNAME/var/lib/rkt
chown root:rkt /mnt/$PARTNAME/var/lib/rkt
fi
ln -s /mnt/$PARTNAME/var/lib/rkt /var/lib/rkt
if [ ! -d /mnt/$PARTNAME/var/lib/rkt-etc ]; then
mkdir -p /mnt/$PARTNAME/var/lib/rkt-etc
cp -rp /etc/rkt/* /mnt/$PARTNAME/var/lib/rkt-etc
chown root:rkt-admin /mnt/$PARTNAME/var/lib/rkt-etc
chmod ug+rw /mnt/$PARTNAME/var/lib/rkt-etc
fi
rm -rf /etc/rkt
ln -s /mnt/$PARTNAME/var/lib/rkt-etc /etc/rkt
if [ ! -d /var/lib/rkt/pods ]; then
systemd-tmpfiles --create rkt.conf
fi
if [ -e "/userdata.tar" ]; then
mv /userdata.tar /var/lib/boot2docker/
fi
tar xf /var/lib/boot2docker/userdata.tar -C /home/docker/
chown -R docker:docker /home/docker/.ssh
rm -f '/home/docker/boot2docker, please format-me'
mkdir -p /mnt/$PARTNAME/var/lib/localkube
ln -s /mnt/$PARTNAME/var/lib/localkube /var/lib/localkube
fi
# /etc dirs are initialised from /usr/local, to allow the user/admin to customise
mkdir -p /var/lib/boot2docker/etc/

View File

@ -0,0 +1,8 @@
[Unit]
Description=minikube automount
Before=docker.service rkt-api.service rkt-metadata.service
[Service]
ExecStart=/usr/sbin/minikube-automount
Type=oneshot
RemainAfterExit=true

View File

@ -0,0 +1,4 @@
config BR2_PACKAGE_CNI_BIN
bool "cni-bin"
default y
depends on BR2_x86_64

View File

@ -0,0 +1 @@
sha256 b1ae09833a238c51161918a8849031efdb46cf0068ea5b752e362d9836e2af7d cni-v0.3.0.tgz

View File

@ -0,0 +1,37 @@
################################################################################
#
# cni-bin
#
################################################################################
CNI_BIN_VERSION = 0.3.0
CNI_BIN_SITE = https://github.com/containernetworking/cni/releases/download/v$(CNI_BIN_VERSION)
CNI_BIN_SOURCE = cni-v$(CNI_BIN_VERSION).tgz
define CNI_BIN_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 \
$(@D)/bridge \
$(TARGET_DIR)/opt/cni/bin/bridge
ln -sf \
../../opt/cni/bin/bridge \
$(TARGET_DIR)/usr/bin/bridge
$(INSTALL) -D -m 0755 \
$(@D)/host-local \
$(TARGET_DIR)/opt/cni/bin/host-local
ln -sf \
../../opt/cni/bin/host-local \
$(TARGET_DIR)/usr/bin/host-local
$(INSTALL) -D -m 0755 \
$(@D)/loopback \
$(TARGET_DIR)/opt/cni/bin/loopback
ln -sf \
../../opt/cni/bin/loopback \
$(TARGET_DIR)/usr/bin/loopback
endef
$(eval $(generic-package))

View File

@ -0,0 +1,4 @@
config BR2_PACKAGE_DOCKER_BIN
bool "docker-bin"
default y
depends on BR2_x86_64

View File

@ -0,0 +1 @@
sha256 893e3c6e89c0cd2c5f1e51ea41bc2dd97f5e791fcfa3cee28445df277836339d docker-1.11.1.tgz

View File

@ -0,0 +1,50 @@
################################################################################
#
# docker-bin
#
################################################################################
DOCKER_BIN_VERSION = 1.11.1
DOCKER_BIN_SITE = https://get.docker.com/builds/Linux/x86_64
DOCKER_BIN_SOURCE = docker-$(DOCKER_BIN_VERSION).tgz
define DOCKER_BIN_USERS
- -1 docker -1 - - - - -
endef
define DOCKER_BIN_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 \
$(@D)/docker \
$(TARGET_DIR)/bin/docker
$(INSTALL) -D -m 0755 \
$(@D)/docker-containerd-shim \
$(TARGET_DIR)/bin/docker-containerd-shim
$(INSTALL) -D -m 0755 \
$(@D)/docker-containerd \
$(TARGET_DIR)/bin/docker-containerd
$(INSTALL) -D -m 0755 \
$(@D)/docker-runc \
$(TARGET_DIR)/bin/docker-runc
$(INSTALL) -D -m 0755 \
$(@D)/docker-containerd-ctr \
$(TARGET_DIR)/bin/docker-containerd-ctr
endef
define DOCKER_BIN_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 644 \
$(BR2_EXTERNAL)/package/docker-bin/docker.service \
$(TARGET_DIR)/usr/lib/systemd/system/docker.service
$(INSTALL) -D -m 644 \
$(BR2_EXTERNAL)/package/docker-bin/docker.socket \
$(TARGET_DIR)/usr/lib/systemd/system/docker.socket
ln -fs /usr/lib/systemd/system/docker.service \
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/docker.service
endef
$(eval $(generic-package))

View File

@ -0,0 +1,33 @@
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network.target docker.socket
Requires=docker.socket
[Service]
Type=notify
# DOCKER_RAMDISK disable pivot_root in Docker, using MS_MOVE instead.
Environment=DOCKER_RAMDISK=yes
# the default is not to use systemd for cgroups because the delegate issues still
# exists and systemd currently does not support the cgroup feature set required
# for containers run by docker
ExecStart=/usr/bin/docker daemon -H fd://
ExecReload=/bin/kill -s HUP $MAINPID
# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
# Uncomment TasksMax if your systemd version supports it.
# Only systemd 226 and above support this version.
#TasksMax=infinity
TimeoutStartSec=0
# set delegate yes so that systemd does not reset the cgroups of docker containers
Delegate=yes
# kill only the docker process, not all processes in the cgroup
KillMode=process
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,12 @@
[Unit]
Description=Docker Socket for the API
PartOf=docker.service
[Socket]
ListenStream=/var/run/docker.sock
SocketMode=0660
SocketUser=root
SocketGroup=docker
[Install]
WantedBy=sockets.target

View File

@ -0,0 +1,54 @@
config BR2_PACKAGE_OPENVMTOOLS10
bool "openvmtools10"
depends on BR2_i386 || BR2_x86_64
depends on BR2_USE_MMU # libglib2
depends on BR2_USE_WCHAR # libglib2
depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC
depends on BR2_ENABLE_LOCALE
depends on !BR2_TOOLCHAIN_USES_UCLIBC
select BR2_PACKAGE_LIBGLIB2
select BR2_PACKAGE_LIBDNET
help
Open Virtual Machine Tools for VMware guest OS
http://open-vm-tools.sourceforge.net/
ICU locales, Xerces, and X11 tools are currently not supported.
NOTE: Support for vmblock-fuse will be enabled in openvmtools if the
libfuse package is selected.
if BR2_PACKAGE_OPENVMTOOLS10
config BR2_PACKAGE_OPENVMTOOLS10_PROCPS
bool "procps support"
depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
select BR2_PACKAGE_PROCPS_NG
help
Enable support for procps / meminfo
comment "procps support needs BR2_PACKAGE_BUSYBOX_SHOW_OTHERS"
depends on !BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
config BR2_PACKAGE_OPENVMTOOLS10_PAM
bool "PAM support"
select BR2_PACKAGE_LINUX_PAM
# linux-pam needs locale and wchar, but we already have this
# dependency on the main symbol, above.
depends on !BR2_STATIC_LIBS
depends on !BR2_TOOLCHAIN_USES_MUSL # linux-pam
help
Support for PAM in openvmtools
comment "PAM support needs a glibc toolchain w/ dynamic library"
depends on BR2_STATIC_LIBS || BR2_TOOLCHAIN_USES_MUSL
endif
comment "openvmtools needs a glibc or musl toolchain w/ wchar, threads, RPC, locale"
depends on BR2_i386 || BR2_x86_64
depends on BR2_USE_MMU
depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
!BR2_TOOLCHAIN_HAS_NATIVE_RPC || !BR2_ENABLE_LOCALE || \
BR2_TOOLCHAIN_USES_UCLIBC

View File

@ -0,0 +1,33 @@
#!/bin/sh
#
# Starts vmtoolsd for openvmtools
#
EXEC="/usr/bin/vmtoolsd"
ARGS="-b"
PID="/var/run/vmtoolsd.pid"
case "$1" in
start)
printf "Starting vmtoolsd: "
start-stop-daemon -S -q -x $EXEC -- $ARGS $PID
if [ $? != 0 ]; then
echo "FAILED"
exit 1
else
echo "OK"
fi
;;
stop)
printf "Stopping vmtoolsd: "
start-stop-daemon -K -q -p $PID
echo "OK"
;;
restart|reload)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac

View File

@ -0,0 +1,2 @@
# locally computed
sha256 87d76dc3affd39dccfae80c7210ac89e8f14cb493a651709780f67b1b5a92ec8 open-vm-tools-stable-10.0.7.tar.gz

View File

@ -0,0 +1,92 @@
################################################################################
#
# openvmtools
#
################################################################################
OPENVMTOOLS10_VERSION = stable-10.0.7
OPENVMTOOLS10_SITE = $(call github,vmware,open-vm-tools,$(OPENVMTOOLS10_VERSION))
OPENVMTOOLS10_SUBDIR = open-vm-tools
OPENVMTOOLS10_LICENSE = LGPLv2.1
OPENVMTOOLS10_LICENSE_FILES = $(OPENVMTOOLS10_SUBDIR)/COPYING
# Autoreconf needed or config/missing will run configure again at buildtime
define OPENVMTOOLS10_RUN_AUTOCONF
cd $(@D)/open-vm-tools; $(HOST_DIR)/usr/bin/autoreconf -i
endef
OPENVMTOOLS10_PRE_PATCH_HOOKS += OPENVMTOOLS10_RUN_AUTOCONF
OPENVMTOOLS10_CONF_OPTS = --with-dnet \
--without-icu --without-x --without-gtk2 \
--without-gtkmm --without-kernel-modules \
--disable-deploypkg --without-xerces
OPENVMTOOLS10_CONF_ENV += CUSTOM_DNET_CPPFLAGS=" "
OPENVMTOOLS10_DEPENDENCIES = libglib2 libdnet
# When libfuse is available, openvmtools can build vmblock-fuse, so
# make sure that libfuse gets built first
ifeq ($(BR2_PACKAGE_LIBFUSE),y)
OPENVMTOOLS10_DEPENDENCIES += libfuse
endif
ifeq ($(BR2_PACKAGE_OPENSSL),y)
OPENVMTOOLS10_CONF_OPTS += --with-ssl
OPENVMTOOLS10_DEPENDENCIES += openssl
else
OPENVMTOOLS10_CONF_OPTS += --without-ssl
endif
ifeq ($(BR2_PACKAGE_OPENVMTOOLS10_PROCPS),y)
OPENVMTOOLS10_CONF_OPTS += --with-procps
OPENVMTOOLS10_DEPENDENCIES += procps-ng
else
OPENVMTOOLS10_CONF_OPTS += --without-procps
endif
ifeq ($(BR2_PACKAGE_OPENVMTOOLS10_PAM),y)
OPENVMTOOLS10_CONF_OPTS += --with-pam
OPENVMTOOLS10_DEPENDENCIES += linux-pam
else
OPENVMTOOLS10_CONF_OPTS += --without-pam
endif
# configure needs execution permission
define OPENVMTOOLS10_PRE_CONFIGURE_CHMOD
chmod 0755 $(@D)/$(OPENVMTOOLS10_SUBDIR)/configure
endef
OPENVMTOOLS10_PRE_CONFIGURE_HOOKS += OPENVMTOOLS10_PRE_CONFIGURE_CHMOD
# symlink needed by lib/system/systemLinux.c (or will cry in /var/log/messages)
# defined in lib/misc/hostinfoPosix.c
# /sbin/shutdown needed for Guest OS restart/shutdown from hypervisor
define OPENVMTOOLS10_POST_INSTALL_TARGET_THINGIES
ln -fs os-release $(TARGET_DIR)/etc/lfs-release
if [ ! -e $(TARGET_DIR)/sbin/shutdown ]; then \
$(INSTALL) -D -m 755 package/openvmtools/shutdown \
$(TARGET_DIR)/sbin/shutdown; \
fi
mkdir -p $(TARGET_DIR)/usr/local/bin
ln -fs ../../bin/vmhgfs-fuse \
$(TARGET_DIR)/usr/local/bin/vmhgfs-fuse
endef
OPENVMTOOLS10_POST_INSTALL_TARGET_HOOKS += OPENVMTOOLS10_POST_INSTALL_TARGET_THINGIES
define OPENVMTOOLS10_INSTALL_INIT_SYSV
$(INSTALL) -D -m 755 package/openvmtools/S10vmtoolsd \
$(TARGET_DIR)/etc/init.d/S10vmtoolsd
endef
define OPENVMTOOLS10_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 644 package/openvmtools/vmtoolsd.service \
$(TARGET_DIR)/usr/lib/systemd/system/vmtoolsd.service
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
ln -fs ../../../../usr/lib/systemd/system/vmtoolsd.service \
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/vmtoolsd.service
endef
$(eval $(autotools-package))

View File

@ -0,0 +1,7 @@
#!/bin/sh
#compatibility script for openvmtools
if [ "$1" == "-r" ]; then
/sbin/reboot
else
/sbin/poweroff
fi

View File

@ -0,0 +1,14 @@
[Unit]
Description=vmtoolsd for openvmtools
After=syslog.target network.target
[Service]
Type=forking
PIDFile=/var/run/vmtoolsd.pid
ExecStart=/usr/bin/vmtoolsd -b /var/run/vmtoolsd.pid
Restart=on-failure
KillMode=process
KillSignal=SIGKILL
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,4 @@
config BR2_PACKAGE_RKT_BIN
bool "rkt-bin"
default y
depends on BR2_x86_64

View File

@ -0,0 +1,3 @@
sha256 7e7c122f92f1dd8e621580869903a367e6ba2dd80f3ab9bf40b089d972d0c827 rkt-v1.14.0.tar.gz
sha256 dd514db743e9f8bdae9169bf416d6ed8a83e862e0621ce57a9d20a4f7bb1adbb rkt-v1.14.0.tar.gz.asc
sha256 56eb40918ba8dfbfc30bfddb3d235c3485825af1e7bd9816bdc478716d40544b app-signing-pubkey.gpg

View File

@ -0,0 +1,71 @@
################################################################################
#
# rkt
#
################################################################################
RKT_BIN_VERSION = 1.14.0
RKT_BIN_SITE = https://github.com/coreos/rkt/releases/download/v$(RKT_BIN_VERSION)
RKT_BIN_SOURCE = rkt-v$(RKT_BIN_VERSION).tar.gz
RKT_BIN_EXTRA_DOWNLOADS = \
https://github.com/coreos/rkt/releases/download/v$(RKT_BIN_VERSION)/rkt-v$(RKT_BIN_VERSION).tar.gz.asc \
https://coreos.com/dist/pubkeys/app-signing-pubkey.gpg
define RKT_BIN_USERS
- -1 rkt-admin -1 - - - - -
- -1 rkt -1 - - - - -
endef
define RKT_BIN_BUILD_CMDS
gpg2 --import $(BR2_DL_DIR)/app-signing-pubkey.gpg
gpg2 \
--trusted-key $(shell gpg2 --with-colons --keyid-format LONG -k security@coreos.com | egrep ^pub | cut -d ':' -f5) \
--verify-files $(BR2_DL_DIR)/rkt-v$(RKT_BIN_VERSION).tar.gz.asc
mkdir -p $(TARGET_DIR)/var/lib/rkt
endef
define RKT_BIN_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 \
$(@D)/rkt \
$(TARGET_DIR)/bin/rkt
mkdir -p $(TARGET_DIR)/etc/bash_completion.d
$(INSTALL) -D -m 644 \
$(@D)/bash_completion/rkt.bash \
$(TARGET_DIR)/etc/bash_completion.d/rkt
mkdir -p $(TARGET_DIR)/usr/lib/rkt/stage1-images
install -Dm644 \
$(@D)/stage1-coreos.aci \
$(TARGET_DIR)/usr/lib/rkt/stage1-images/stage1-coreos.aci
endef
define RKT_BIN_INSTALL_INIT_SYSTEMD
mkdir -p $(TARGET_DIR)/usr/lib/tmpfiles.d
$(INSTALL) -D -m 644 \
$(@D)/init/systemd/tmpfiles.d/rkt.conf \
$(TARGET_DIR)/usr/lib/tmpfiles.d/rkt.conf
$(call install-service,rkt-api.service)
$(call install-service,rkt-gc.timer)
$(call install-service,rkt-gc.service)
$(call install-service,rkt-metadata.socket)
$(call install-service,rkt-metadata.service)
endef
define install-service
$(INSTALL) -D -m 644 \
$(@D)/init/systemd/$(1) \
$(TARGET_DIR)/usr/lib/systemd/system/$(1)
ln -fs /usr/lib/systemd/system/$(1) \
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/$(1)
endef
$(eval $(generic-package))

View File

@ -0,0 +1,4 @@
config BR2_PACKAGE_VBOX_GUEST
bool "vbox-guest"
default y
depends on BR2_LINUX_KERNEL

View File

@ -0,0 +1,5 @@
# From http://download.virtualbox.org/virtualbox/5.1.6/MD5SUMS
md5 8c2331a718cfc038963c1214c2ba9811 VirtualBox-5.1.6.tar.bz2
# From http://download.virtualbox.org/virtualbox/5.1.6/SHA256SUMS
sha256 2e0112b0d85841587b8f212e6ba8f6c35b31e1cce6b6999497dc917cd37e6911 VirtualBox-5.1.6.tar.bz2
sha256 cbcf9b9b1000e09911b3d20e1efe529aef8a945cf130f6abffc14a39522cc1ed VBoxGuestAdditions_5.1.6.iso

View File

@ -0,0 +1,62 @@
################################################################################
#
# VirtualBox Linux Guest Drivers
#
################################################################################
VBOX_GUEST_VERSION = 5.1.6
VBOX_GUEST_SITE = http://download.virtualbox.org/virtualbox/$(VBOX_GUEST_VERSION)
VBOX_GUEST_LICENSE = GPLv2
VBOX_GUEST_LICENSE_FILES = COPYING
VBOX_GUEST_SOURCE = VirtualBox-$(VBOX_GUEST_VERSION).tar.bz2
VBOX_GUEST_EXTRA_DOWNLOADS = http://download.virtualbox.org/virtualbox/${VBOX_GUEST_VERSION}/VBoxGuestAdditions_${VBOX_GUEST_VERSION}.iso
define VBOX_GUEST_EXPORT_MODULES
( cd $(@D)/src/VBox/Additions/linux; ./export_modules modules.tar.gz )
mkdir -p $(@D)/vbox-modules
tar -C $(@D)/vbox-modules -xzf $(@D)/src/VBox/Additions/linux/modules.tar.gz
endef
VBOX_GUEST_POST_EXTRACT_HOOKS += VBOX_GUEST_EXPORT_MODULES
VBOX_GUEST_MODULE_SUBDIRS = vbox-modules
VBOX_GUEST_MODULE_MAKE_OPTS = KVERSION=$(LINUX_VERSION_PROBED)
define VBOX_GUEST_USERS
- -1 vboxsf -1 - - - - -
endef
define VBOX_GUEST_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 644 \
$(BR2_EXTERNAL)/package/vbox-guest/vboxservice.service \
$(TARGET_DIR)/usr/lib/systemd/system/vboxservice.service
ln -fs /usr/lib/systemd/system/vboxservice.service \
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/vboxservice.service
endef
define VBOX_GUEST_BUILD_CMDS
7z x $(BR2_DL_DIR)/VBoxGuestAdditions_${VBOX_GUEST_VERSION}.iso -ir'!VBoxLinuxAdditions.run' -o"$(@D)"
sh $(@D)/VBoxLinuxAdditions.run --noexec --target $(@D)
tar -C $(@D) -xjf $(@D)/VBoxGuestAdditions-amd64.tar.bz2 sbin/VBoxService
$(TARGET_CC) -Wall -O2 -D_GNU_SOURCE -DIN_RING3 \
-I$(@D)/vbox-modules/vboxsf/include \
-I$(@D)/vbox-modules/vboxsf \
-o $(@D)/vbox-modules/mount.vboxsf \
$(@D)/src/VBox/Additions/linux/sharedfolders/vbsfmount.c \
$(@D)/src/VBox/Additions/linux/sharedfolders/mount.vboxsf.c
endef
define VBOX_GUEST_INSTALL_TARGET_CMDS
$(INSTALL) -Dm755 \
$(@D)/vbox-modules/mount.vboxsf \
$(TARGET_DIR)/sbin
$(INSTALL) -Dm755 \
$(@D)/sbin/VBoxService \
$(TARGET_DIR)/sbin
endef
$(eval $(kernel-module))
$(eval $(generic-package))

View File

@ -0,0 +1,12 @@
[Unit]
Description=VirtualBox Guest Service
ConditionVirtualization=oracle
[Service]
ExecStartPre=-/usr/sbin/modprobe vboxguest
ExecStartPre=-/usr/sbin/modprobe vboxvideo
ExecStartPre=-/usr/sbin/modprobe vboxsf
ExecStart=/usr/sbin/VBoxService -f
[Install]
WantedBy=multi-user.target