Add scripts and overlay fs

This commit is contained in:
Madis Mägi 2021-02-22 00:51:08 +02:00
commit c4fd9adaf3
5 changed files with 130 additions and 0 deletions

13
00-deps.sh Normal file
View File

@ -0,0 +1,13 @@
#!/bin/bash
set -e
set -x
#Dependency stage
if [ ! -f overlay.tar ]; then
echo "ERROR: overlay.tar does not exist, terminating"
exit 1
fi
curl -JLO https://github.com/buildroot/buildroot/archive/2020.02.10.tar.gz
tar xvf buildroot-2020.02.10.tar.gz
mkdir bin/

100
10-configure.sh Normal file
View File

@ -0,0 +1,100 @@
#!/bin/bash
set -e
set -x
#Configure stage
cd buildroot-2020.02.10/
cat << EOF > .config
BR2_x86_64=y
BR2_INIT_NONE=y
BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
BR2_TOOLCHAIN_BUILDROOT_CXX=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_NTP=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_NTFS_3G=y
BR2_PACKAGE_NTFS_3G_NTFSPROGS=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_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="linux-defconfig"
BR2_ROOTFS_OVERLAY="butterknife/overlay/"
EOF
cat << EOF > customization
CONFIG_EFI_STUB=y
CONFIG_VIRT_DRIVERS=y
CONFIG_HYPERV=y
CONFIG_PCI=y
CONFIG_BTRFS_FS=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_SATA_AHCI=y
CONFIG_NET_VENDOR_CAVIUM=n
CONFIG_NET_VENDOR_XILINX=n
CONFIG_IGB=y
CONFIG_ATL2=y
CONFIG_ATL1=y
CONFIG_ATL1E=y
CONFIG_ATL1C=y
CONFIG_ALX=y
CONFIG_CHELSIO_T1=y
CONFIG_CHELSIO_T1_1G=y
CONFIG_CHELSIO_T3=y
CONFIG_CHELSIO_T4=y
CONFIG_CHELSIO_T4VF=y
CONFIG_CHELSIO_MVMDIO=y
CONFIG_CHELSIO_SKGE=y
CONFIG_CHELSIO_SKY2=y
CONFIG_CHELSIO_MLX4_EN=y
CONFIG_CHELSIO_MLX5_CORE=y
CONFIG_CHELSIO_MLX5_CORE_EN=y
CONFIG_E100=y
CONFIG_E1000=y
CONFIG_E1000E=y
CONFIG_FORCEDETH=y
CONFIG_8139TOO=y
CONFIG_R8169=y
CONFIG_VIA_RHINE=y
CONFIG_VIA_VELOCITY=y
CONFIG_SIS900=y
CONFIG_SIS190=y
CONFIG_PARTITION_ADVANCED=y
CONFIG_VIRTIO_BLK_SCSI=y
EOF
cat board/pc/linux.config customization > linux-defconfig
make olddefconfig
cd -

10
20-build.sh Normal file
View File

@ -0,0 +1,10 @@
#!/bin/bash
set -e
set -x
#Build stage
cd buildroot-2020.02.10/
ionice nice make -j`nproc`
cd -

7
30-deliver.sh Normal file
View File

@ -0,0 +1,7 @@
#!/bin/bash
set -e
set -x
#Deliver stage
cp buildroot-2020.02.10/output/images/bzImage bin/provisioning-image-amd64

BIN
overlay.tar Normal file

Binary file not shown.