Updates and fixes
Some checks reported errors
continuous-integration/drone Build encountered an error
Some checks reported errors
continuous-integration/drone Build encountered an error
This commit is contained in:
parent
f3d01845be
commit
ee987dc516
50
.drone.yml
50
.drone.yml
@ -6,6 +6,9 @@ name: default
|
|||||||
steps:
|
steps:
|
||||||
- name: build
|
- name: build
|
||||||
image: ubuntu
|
image: ubuntu
|
||||||
|
volumes:
|
||||||
|
- name: ramdisk
|
||||||
|
path: /build
|
||||||
settings:
|
settings:
|
||||||
mtu: 1300
|
mtu: 1300
|
||||||
environment:
|
environment:
|
||||||
@ -13,25 +16,54 @@ steps:
|
|||||||
FORCE_UNSAFE_CONFIGURE: 1
|
FORCE_UNSAFE_CONFIGURE: 1
|
||||||
commands:
|
commands:
|
||||||
- apt-get update
|
- apt-get update
|
||||||
- apt-get install -yq wget build-essential file cpio rsync bc unzip
|
- apt-get install -yq wget build-essential file cpio rsync bc unzip python3
|
||||||
- wget https://github.com/buildroot/buildroot/archive/2020.02.10.tar.gz
|
- cd /build
|
||||||
|
- wget https://github.com/buildroot/buildroot/archive/2022.02.tar.gz
|
||||||
- tar xf *.gz
|
- tar xf *.gz
|
||||||
- rm -fv *.gz
|
- rm -fv *.gz
|
||||||
- cd buildroot-*/
|
- cd buildroot-*/
|
||||||
- cat board/pc/linux.config /drone/src/linux-defconfig > linux-defconfig
|
|
||||||
- cp /drone/src/config-seed .config
|
- cp /drone/src/config-seed .config
|
||||||
- make olddefconfig
|
- make olddefconfig
|
||||||
- nice ionice make -j `nproc`
|
- nice ionice make -j `nproc` -s
|
||||||
- cp output/images/bzImage /drone/src/provisioning-image-amd64
|
- ls -lash output/images
|
||||||
- name: deliver
|
- cp output/images/bzImage /drone/src/butterknife-amd64.bin
|
||||||
|
- cp output/images/rootfs.iso9660 /drone/src/butterknife-amd64.iso
|
||||||
|
- name: deliver-pxe
|
||||||
image: drillster/drone-email
|
image: drillster/drone-email
|
||||||
settings:
|
settings:
|
||||||
from: jenkins@k-space.ee
|
from: jenkins@k-space.ee
|
||||||
subject: OpenWrt image
|
subject: Butterknife provisioning image (PXE)
|
||||||
body: OpenWrt image
|
body: This is kernel with bundled initramfs suitable for PXE booting
|
||||||
host: mail.k-space.ee
|
host: mail.k-space.ee
|
||||||
port: 465
|
port: 465
|
||||||
username: jenkins
|
username: jenkins
|
||||||
password:
|
password:
|
||||||
from_secret: email_password
|
from_secret: email_password
|
||||||
attachments: provisioning-image-amd64
|
attachments: butterknife-amd64.bin
|
||||||
|
- name: deliver-iso
|
||||||
|
image: drillster/drone-email
|
||||||
|
settings:
|
||||||
|
from: jenkins@k-space.ee
|
||||||
|
subject: Butterknife provisioning image (ISO)
|
||||||
|
body: This is ISO file suitable for writing to USB keys directly with dd
|
||||||
|
host: mail.k-space.ee
|
||||||
|
port: 465
|
||||||
|
username: jenkins
|
||||||
|
password:
|
||||||
|
from_secret: email_password
|
||||||
|
attachments: butterknife-amd64.iso
|
||||||
|
volumes:
|
||||||
|
- name: ramdisk
|
||||||
|
temp:
|
||||||
|
medium: memory
|
||||||
|
- name: test
|
||||||
|
image: ubuntu
|
||||||
|
commands:
|
||||||
|
- apt-get update
|
||||||
|
- apt-get install -yq qemu-system-x86
|
||||||
|
- qemu-system-x86_64 \
|
||||||
|
-kernel /drone/src/provisioning-image-amd64 \
|
||||||
|
-serial stdio \
|
||||||
|
-nographic \
|
||||||
|
-monitor none \
|
||||||
|
-append "console=ttyS0 bk_action=poweroff"
|
||||||
|
69
config-seed
69
config-seed
@ -1,39 +1,44 @@
|
|||||||
# Buildroot configuration seed
|
# Buildroot configuration seed
|
||||||
BR2_x86_64=y
|
|
||||||
BR2_INIT_NONE=y
|
BR2_INIT_NONE=y
|
||||||
BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
|
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="/drone/src/linux-defconfig"
|
||||||
BR2_TOOLCHAIN_BUILDROOT_CXX=y
|
BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF=y
|
||||||
|
BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
|
||||||
|
BR2_LINUX_KERNEL_XZ=y
|
||||||
BR2_LINUX_KERNEL=y
|
BR2_LINUX_KERNEL=y
|
||||||
BR2_TARGET_SYSLINUX=y
|
|
||||||
BR2_TARGET_SYSLINUX_EFI=y
|
|
||||||
BR2_TARGET_ROOTFS_INITRAMFS=y
|
|
||||||
BR2_TARGET_ROOTFS_ISO9660=y
|
|
||||||
BR2_TARGET_ROOTFS_ISO9660_HYBRID=y
|
|
||||||
BR2_TARGET_GENERIC_ISSUE="Welcome to Butterknife provisioning tool"
|
|
||||||
BR2_PACKAGE_DIALOG=y
|
|
||||||
BR2_PACKAGE_JQ=y
|
|
||||||
BR2_PACKAGE_BIND=y
|
|
||||||
BR2_PACKAGE_BIND_TOOLS=y
|
BR2_PACKAGE_BIND_TOOLS=y
|
||||||
BR2_PACKAGE_NTP=y
|
BR2_PACKAGE_BIND=y
|
||||||
BR2_PACKAGE_NTP_NTPDATE=y
|
|
||||||
BR2_PACKAGE_UDPCAST=y
|
|
||||||
BR2_PACKAGE_UDPCAST_SENDER=y
|
|
||||||
BR2_PACKAGE_UDPCAST_RECEIVER=y
|
|
||||||
BR2_PACKAGE_CA_CERTIFICATES=y
|
|
||||||
BR2_PACKAGE_OPENSSL=y
|
|
||||||
BR2_PACKAGE_LIBCURL=y
|
|
||||||
BR2_PACKAGE_LIBCURL_CURL=y
|
|
||||||
BR2_PACKAGE_BTRFS_PROGS=y
|
BR2_PACKAGE_BTRFS_PROGS=y
|
||||||
BR2_PACKAGE_NTFS_3G=y
|
BR2_PACKAGE_CA_CERTIFICATES=y
|
||||||
BR2_PACKAGE_NTFS_3G_NTFSPROGS=y
|
BR2_PACKAGE_DIALOG=y
|
||||||
BR2_PACKAGE_PCIUTILS=y
|
|
||||||
BR2_PACKAGE_GPTFDISK=y
|
|
||||||
BR2_PACKAGE_GPTFDISK_SGDISK=y
|
|
||||||
BR2_PACKAGE_MS_SYS=y
|
|
||||||
BR2_PACKAGE_UTIL_LINUX_LIBFDISK=y
|
|
||||||
BR2_PACKAGE_UTIL_LINUX_BINARIES=y
|
|
||||||
BR2_PACKAGE_DOSFSTOOLS=y
|
|
||||||
BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT=y
|
BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT=y
|
||||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
BR2_PACKAGE_DOSFSTOOLS=y
|
||||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="linux-defconfig"
|
BR2_PACKAGE_GPTFDISK_SGDISK=y
|
||||||
|
BR2_PACKAGE_GPTFDISK=y
|
||||||
|
BR2_PACKAGE_JQ=y
|
||||||
|
BR2_PACKAGE_LIBCURL_CURL=y
|
||||||
|
BR2_PACKAGE_LIBCURL_EXTRA_PROTOCOLS_FEATURES=n
|
||||||
|
BR2_PACKAGE_LIBCURL=y
|
||||||
|
BR2_PACKAGE_NTFS_3G_NTFSPROGS=y
|
||||||
|
BR2_PACKAGE_NTFS_3G=y
|
||||||
|
BR2_PACKAGE_NTP_NTPDATE=y
|
||||||
|
BR2_PACKAGE_NTP_NTPD=n
|
||||||
|
BR2_PACKAGE_NTP=y
|
||||||
|
BR2_PACKAGE_OPENSSL=y
|
||||||
|
BR2_PACKAGE_PCIUTILS=y
|
||||||
|
BR2_PACKAGE_UDPCAST_RECEIVER=y
|
||||||
|
BR2_PACKAGE_UDPCAST_SENDER=y
|
||||||
|
BR2_PACKAGE_UDPCAST=y
|
||||||
|
BR2_PACKAGE_UTIL_LINUX_BINARIES=y
|
||||||
|
BR2_PACKAGE_UTIL_LINUX_LIBFDISK=y
|
||||||
BR2_ROOTFS_OVERLAY="/drone/src/overlay/"
|
BR2_ROOTFS_OVERLAY="/drone/src/overlay/"
|
||||||
|
BR2_TARGET_GENERIC_ISSUE="Welcome to Butterknife provisioning tool"
|
||||||
|
BR2_TARGET_ROOTFS_INITRAMFS=y
|
||||||
|
BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU="/drone/src/isolinux.cfg"
|
||||||
|
BR2_TARGET_ROOTFS_ISO9660_HYBRID=y
|
||||||
|
BR2_TARGET_ROOTFS_ISO9660=y
|
||||||
|
BR2_TARGET_SYSLINUX_EFI=y
|
||||||
|
BR2_TARGET_SYSLINUX_ISOLINUX=y
|
||||||
|
BR2_TARGET_SYSLINUX=y
|
||||||
|
BR2_TOOLCHAIN_BUILDROOT_CXX=y
|
||||||
|
BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
|
||||||
|
BR2_x86_64=y
|
||||||
|
7
isolinux.cfg
Normal file
7
isolinux.cfg
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
default butterknife
|
||||||
|
prompt 0
|
||||||
|
|
||||||
|
label butterknife
|
||||||
|
menu Butterknife provisioning
|
||||||
|
kernel __KERNEL_PATH__
|
||||||
|
append bk_image=harbor.k-space.ee/k-space/ubuntu-desktop bk_timeserver=ntp.ubuntu.com quiet
|
113
linux-defconfig
113
linux-defconfig
@ -1,45 +1,82 @@
|
|||||||
# Linux kernel configuration seed
|
# Linux kernel configuration seed
|
||||||
CONFIG_EFI_STUB=y
|
CONFIG_ALX=y
|
||||||
CONFIG_VIRT_DRIVERS=y
|
CONFIG_ATL1C=y
|
||||||
CONFIG_HYPERV=y
|
CONFIG_ATL1E=y
|
||||||
CONFIG_PCI=y
|
CONFIG_ATL1=y
|
||||||
CONFIG_BTRFS_FS=y
|
CONFIG_ATL2=y
|
||||||
CONFIG_VFAT_FS=y
|
|
||||||
CONFIG_NLS_CODEPAGE_437=y
|
|
||||||
CONFIG_NLS_ISO8859_1=y
|
|
||||||
CONFIG_HYPERV_NET=y
|
|
||||||
CONFIG_VMXNET3=y
|
|
||||||
CONFIG_VMWARE_PVSCSI=y
|
|
||||||
CONFIG_BLK_DEV_NVME=y
|
CONFIG_BLK_DEV_NVME=y
|
||||||
CONFIG_SATA_AHCI=y
|
CONFIG_BLK_DEV_SD=y
|
||||||
|
CONFIG_BTRFS_FS_POSIX_ACL=y
|
||||||
|
CONFIG_BTRFS_FS=y
|
||||||
|
CONFIG_CHELSIO_T1_1G=y
|
||||||
|
CONFIG_CHELSIO_T1=y
|
||||||
|
CONFIG_CHELSIO_T3=y
|
||||||
|
CONFIG_CHELSIO_T4VF=y
|
||||||
|
CONFIG_CHELSIO_T4=y
|
||||||
|
CONFIG_FB=y
|
||||||
|
CONFIG_FB_EFI=y
|
||||||
|
CONFIG_FORCEDETH=y
|
||||||
|
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||||
|
CONFIG_FUSE_FS=y
|
||||||
|
CONFIG_HW_RANDOM_VIRTIO=y
|
||||||
|
CONFIG_HYPERVISOR_GUEST=y
|
||||||
|
CONFIG_HYPERV_NET=y
|
||||||
|
CONFIG_HYPERV=y
|
||||||
|
CONFIG_IGB=y
|
||||||
|
CONFIG_IKCONFIG_PROC=y
|
||||||
|
CONFIG_IKCONFIG=y
|
||||||
|
CONFIG_INET=y
|
||||||
|
CONFIG_INPUT_EVDEV=y
|
||||||
|
CONFIG_IP_NF_FILTER=y
|
||||||
|
CONFIG_IP_NF_IPTABLES=y
|
||||||
|
CONFIG_MLX4_EN=y
|
||||||
|
CONFIG_MLX5_CORE_EN=y
|
||||||
|
CONFIG_MLX5_CORE=y
|
||||||
|
CONFIG_MODULES=n
|
||||||
|
CONFIG_MVMDIO=y
|
||||||
|
CONFIG_NE2K_PCI=y
|
||||||
|
CONFIG_NETDEVICES=y
|
||||||
|
CONFIG_NETFILTER=n
|
||||||
CONFIG_NET_VENDOR_CAVIUM=n
|
CONFIG_NET_VENDOR_CAVIUM=n
|
||||||
CONFIG_NET_VENDOR_XILINX=n
|
CONFIG_NET_VENDOR_XILINX=n
|
||||||
CONFIG_IGB=y
|
CONFIG_NET=y
|
||||||
CONFIG_ATL2=y
|
CONFIG_NLS_CODEPAGE_437=y
|
||||||
CONFIG_ATL1=y
|
CONFIG_NLS_ISO8859_1=y
|
||||||
CONFIG_ATL1E=y
|
CONFIG_PACKET=y
|
||||||
CONFIG_ATL1C=y
|
CONFIG_PARAVIRT=y
|
||||||
CONFIG_ALX=y
|
CONFIG_PARTITION_ADVANCED=y
|
||||||
CONFIG_CHELSIO_T1=y
|
CONFIG_PCCARD=n
|
||||||
CONFIG_CHELSIO_T1_1G=y
|
CONFIG_RFKILL=n
|
||||||
CONFIG_CHELSIO_T3=y
|
CONFIG_SATA_AHCI=y
|
||||||
CONFIG_CHELSIO_T4=y
|
CONFIG_SCSI_VIRTIO=y
|
||||||
CONFIG_CHELSIO_T4VF=y
|
CONFIG_SECURITY_SELINUX=n
|
||||||
CONFIG_CHELSIO_MVMDIO=y
|
CONFIG_SERIAL_8250_CONSOLE=y
|
||||||
CONFIG_CHELSIO_SKGE=y
|
CONFIG_SERIAL_8250=y
|
||||||
CONFIG_CHELSIO_SKY2=y
|
CONFIG_SIS190=y
|
||||||
CONFIG_CHELSIO_MLX4_EN=y
|
CONFIG_SIS900=y
|
||||||
CONFIG_CHELSIO_MLX5_CORE=y
|
CONFIG_SKGE=y
|
||||||
CONFIG_CHELSIO_MLX5_CORE_EN=y
|
CONFIG_SOUND=n
|
||||||
CONFIG_E100=y
|
CONFIG_USB_EHCI_HCD=y
|
||||||
CONFIG_E1000=y
|
CONFIG_USB_STORAGE=y
|
||||||
CONFIG_E1000E=y
|
CONFIG_USB_UHCI_HCD=y
|
||||||
CONFIG_FORCEDETH=y
|
CONFIG_USB_XHCI_HCD=y
|
||||||
CONFIG_8139TOO=y
|
CONFIG_USB=y
|
||||||
CONFIG_R8169=y
|
CONFIG_VFAT_FS=y
|
||||||
CONFIG_VIA_RHINE=y
|
CONFIG_VIA_RHINE=y
|
||||||
CONFIG_VIA_VELOCITY=y
|
CONFIG_VIA_VELOCITY=y
|
||||||
CONFIG_SIS900=y
|
CONFIG_VIRT_DRIVERS=y
|
||||||
CONFIG_SIS190=y
|
CONFIG_VIRTIO_BALLOON=y
|
||||||
CONFIG_PARTITION_ADVANCED=y
|
|
||||||
CONFIG_VIRTIO_BLK_SCSI=y
|
CONFIG_VIRTIO_BLK_SCSI=y
|
||||||
|
CONFIG_VIRTIO_BLK=y
|
||||||
|
CONFIG_VIRTIO_CONSOLE=y
|
||||||
|
CONFIG_VIRTIO_INPUT=y
|
||||||
|
CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
|
||||||
|
CONFIG_VIRTIO_MMIO=y
|
||||||
|
CONFIG_VIRTIO_NET=y
|
||||||
|
CONFIG_VIRTIO_PCI=y
|
||||||
|
CONFIG_VIRTUALIZATION=n
|
||||||
|
CONFIG_VMWARE_PVSCSI=y
|
||||||
|
CONFIG_VMXNET3=y
|
||||||
|
CONFIG_WIRELESS=n
|
||||||
|
CONFIG_WLAN=n
|
||||||
|
CONFIG_DRM_QXL=y
|
||||||
|
@ -6,7 +6,6 @@ action=$(dialog --menu "Advanced options, consider your warranty VOID!" 0 0 0 \
|
|||||||
shell "Drop to shell" \
|
shell "Drop to shell" \
|
||||||
instance "Instance maintenance and recovery" \
|
instance "Instance maintenance and recovery" \
|
||||||
subvol "Delete instances/templates" \
|
subvol "Delete instances/templates" \
|
||||||
restore "Restore Windows master boot record" \
|
|
||||||
2>&1 >$(tty))
|
2>&1 >$(tty))
|
||||||
clear
|
clear
|
||||||
|
|
||||||
@ -72,19 +71,5 @@ case $action in
|
|||||||
umount $mountpoint
|
umount $mountpoint
|
||||||
rmdir $mountpoint
|
rmdir $mountpoint
|
||||||
;;
|
;;
|
||||||
restore)
|
|
||||||
disk=$(butterknife-select-disk 2>&1 >$(tty))
|
|
||||||
|
|
||||||
# Select MBR type
|
|
||||||
action=$(dialog --menu "What kind of master boot record would you like to restore? You might have to mark partition bootable using fdisk." 0 0 0 \
|
|
||||||
mbr7 "Windows 7/8/10" \
|
|
||||||
mbrvista "Windows Vista" \
|
|
||||||
mbr "Windows 2000/XP/2003" \
|
|
||||||
2>&1 >$(tty))
|
|
||||||
|
|
||||||
cmd="ms-sys --$action /dev/$disk"
|
|
||||||
$cmd | dialog --programbox "$cmd" 10 76
|
|
||||||
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -3,6 +3,19 @@
|
|||||||
# TODO: Make sure fdisk from busybox is NOT used, it's counting sectors incorrectly (?!)
|
# TODO: Make sure fdisk from busybox is NOT used, it's counting sectors incorrectly (?!)
|
||||||
# TODO: Check connectivity with API server
|
# TODO: Check connectivity with API server
|
||||||
|
|
||||||
|
#######################################
|
||||||
|
### Check for presence of utilities ###
|
||||||
|
#######################################
|
||||||
|
for util in btrfs jq fdisk find ntfsresize udp-sender udp-receiver ntpdate curl mktemp sgdisk test true sort uniq dig; do
|
||||||
|
if [ -z "$(which $util)" ]; then
|
||||||
|
echo "Butterknife was unable to locate $util," \
|
||||||
|
"are you sure the provisioning image was compiled properly?"
|
||||||
|
exit 253
|
||||||
|
else
|
||||||
|
echo "Found $util..."
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
BUTTERKNIFE_POOL_MOUNTPOINT=/var/lib/butterknife/pool
|
BUTTERKNIFE_POOL_MOUNTPOINT=/var/lib/butterknife/pool
|
||||||
TARGET_MOUNTPOINT=/mnt/target
|
TARGET_MOUNTPOINT=/mnt/target
|
||||||
|
|
||||||
|
@ -42,6 +42,11 @@ if [ $bk_action == "provision" ]; then
|
|||||||
poweroff -f
|
poweroff -f
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $bk_action == "poweroff" ]; then
|
||||||
|
poweroff -f
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
while [ 1 ]; do
|
while [ 1 ]; do
|
||||||
action=$(dialog --no-cancel --menu "What do you want to do" 0 0 0 \
|
action=$(dialog --no-cancel --menu "What do you want to do" 0 0 0 \
|
||||||
provision "Provision this machine" \
|
provision "Provision this machine" \
|
||||||
|
Loading…
Reference in New Issue
Block a user