Skip to content

Commit

Permalink
Modify kernel build to include Delphix's custom annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
palash-gandhi committed Sep 11, 2023
1 parent 961cad7 commit 4baa326
Show file tree
Hide file tree
Showing 3 changed files with 237 additions and 1 deletion.
6 changes: 6 additions & 0 deletions default-package-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,12 @@ function kernel_build() {
# kernel config options via an annotations file, which we use to
# disable various kernel modules that we don't need or want.
#
. debian/debian.env
local architecture
architecture=$(dpkg-architecture -q DEB_HOST_ARCH 2>/dev/null)
logmust debian/scripts/misc/annotations -f "../../../resources/delphix_kernel_annotations" --arch "${architecture}" --flavour "${platform}" --export >delphix.config
logmust debian/scripts/misc/annotations -f ${DEBIAN}/config/annotations --arch "${architecture}" --flavour "${platform}" --update delphix.config

logmust fakeroot debian/rules updateconfigs "${debian_rules_args[@]}" do_skip_checks=true

logmust fakeroot debian/rules "binary" "${debian_rules_args[@]}"
Expand Down
2 changes: 1 addition & 1 deletion packages/linux-kernel-aws/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#
# We currently support getting the linux kernel from 3 different sources:
# 1. Building it from code: see config.delphix.sh
# 2. Dowloading from apt: see config.archive.sh
# 2. Downloading from apt: see config.archive.sh
# 3. Pre-built kernel stored in artifactory: see config.prebuilt.sh
#

Expand Down
230 changes: 230 additions & 0 deletions resources/delphix_kernel_annotations
Original file line number Diff line number Diff line change
@@ -0,0 +1,230 @@
# Menu: HEADER
# FORMAT: 4
# ARCH: amd64
# FLAVOUR: amd64-aws

#
# Disable various "net" modules which we don't use.
#
CONFIG_6LOWPAN policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_6LOWPAN_NHC policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_BT policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_CAIF policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_HAMRADIO policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_IEEE802154 policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_NET_9P policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_NET_DSA policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_NFC policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_RFKILL policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_WIMAX policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_WIRELESS policy<{'amd64': 'n', 'arm64': 'n'}>

#
# Disable various "drivers" modules which we don't use.
#
CONFIG_ACCESSIBILITY policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_AMD_PMC policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_ATA policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_ATM_DRIVERS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_AUXDISPLAY policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_BCMA policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_CONNECTOR policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_DAX policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_EISA policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_EXTCON policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_FB policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_FPGA policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_FSI policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_GNSS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_GPIOLIB policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_GREYBUS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_HSI policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_I3C policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_IDE policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_IIO policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_INFINIBAND policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_INTERCONNECT policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_IPACK_BUS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_LIBNVDIMM policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_MAILBOX policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_MCB policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_MEDIA_SUPPORT policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_MEMSTICK policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_MMC policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_MTD policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_NEW_LEDS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_NTB policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_NVM policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_NVMEM policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_OF policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_PARPORT policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_PARPORT_PANEL policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_PCCARD policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_PINCTRL policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_PMIC_OPREGION policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_PM_DEVFREQ policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_POWERCAP policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_PPS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_RAPIDIO policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_REGULATOR policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_RESET_CONTROLLER policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_RTC_CLASS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_SFI policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_SIOX policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_SLIMBUS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_SOUNDWIRE policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_SPMI policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_STAGING policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_THERMAL policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_THUNDERBOLT policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_UIO policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_USB_SUPPORT policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_VFIO policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_W1 policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_WLAN policy<{'amd64': 'n', 'arm64': 'n'}>

#
# Disable various filesystem which we don't use.
#
CONFIG_9P_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_ADFS_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_AFFS_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_AFS_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_AUFS_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_BEFS_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_BFS_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_BTRFS_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_CEPH_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_CODA_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_ECRYPT_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_EFS_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_EROFS_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_EXFAT_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_EXT2_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_EXT3_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_F2FS_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_FAT_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_GFS2_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_HFSPLUS_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_HFS_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_HPFS_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_JFFS2_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_JFS_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_MINIX_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_MSDOS_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_NILFS2_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_OCFS2_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_OMFS_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_ORANGEFS_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_QNX4FS_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_QNX6FS_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_REISERFS_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_REISERFS_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_ROMFS_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_SYSV_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_UBIFS_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_UDF_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_UFS_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_VFAT_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_VXFS_FS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_XFS_FS policy<{'amd64': 'n', 'arm64': 'n'}>

#
# Disable other misc. modules which we don't use.
#
CONFIG_AGP policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_ANDROID policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_AQUANTIA_PHY policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_ATALK policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_BATMAN_ADV policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_BCACHE policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_BE2ISCSI policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_BE2NET policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_BLK_DEV_PCIESSD_MTIP32XX policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_BLK_DEV_RSXX policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_BNA policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_BNX2 policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_BNX2X policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_BNXT policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_BROADCOM_PHY policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_CASSINI policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_CDROM policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_CEPH_LIB policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_CRAMFS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_CYCLADES policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_DRM policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_ENIC policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_FM10K policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_FORCEDETH policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_GENWQE policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_GVE policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_HABANA_AI policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_HID policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_HIO policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_HWMON policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_IAVF policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_ICE policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_INTEL_IOATDMA policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_INTEL_MEI policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_IONIC policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_JME policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_KVM policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_LIBFC policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_LIQUIDIO policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_MEGARAID_LEGACY policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_MEGARAID_MAILBOX policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_MEGARAID_MM policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_MEGARAID_NEWGEN policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_MEGARAID_SAS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_MFD_MADERA policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_MSCC_OCELOT_SWITCH policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_MWAVE policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_NETXEN_NIC policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_NET_TEAM policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_NET_VENDOR_AQUANTIA policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_NET_VENDOR_ATHEROS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_NET_VENDOR_CAVIUM policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_NET_VENDOR_CHELSIO policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_NET_VENDOR_CHELSIO policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_NET_VENDOR_MARVELL policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_NET_VENDOR_MICREL policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_NET_VENDOR_MYRI policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_NET_VENDOR_NETERION policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_NET_VENDOR_ROCKER policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_NFP policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_NOZOMI policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_QED policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_QLCNIC policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_RDS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_REALTEK_PHY policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_SCIF policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_SCSI_ADVANSYS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_SCSI_AIC7XXX policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_SCSI_AIC94XX policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_SCSI_ARCMSR policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_SCSI_BFA_FC policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_SCSI_ESAS2R policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_SCSI_GDTH policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_SCSI_HPSA policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_SCSI_IPS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_SCSI_LPFC policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_SCSI_MVSAS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_SCSI_MYRB policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_SCSI_MYRS policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_SCSI_PM8001 policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_SCSI_PMCRAID policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_SCSI_QLA_FC policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_SCSI_SMARTPQI policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_SCSI_SNIC policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_SCSI_SYM53C8XX_2 policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_SCSI_UFSHCD policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_SENSORS_LM93 policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_SFC policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_SOUND policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_SSB policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_STMMAC_ETH policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_SXGBE_ETH policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_SYNCLINK policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_USB policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_VBOXGUEST policy<{'amd64': 'n', 'arm64': 'n'}>
CONFIG_VOP policy<{'amd64': 'n', 'arm64': 'n'}>

0 comments on commit 4baa326

Please sign in to comment.