Skip to content

Commit

Permalink
Updates the hook kernel config, and fixes makefile (#42)
Browse files Browse the repository at this point in the history
## Description

This does two things (apologies, but one needed fixing for the other):
- Adds a `local` build to the Makefile, we shouldn't need to always push a kernel kconfig to a registry to build a local kernel
- Updates the readme to reference the correctly tagged kconfig kernel and displays usage of local build.
- Adds intel GFX support

## Why is this needed

Currently an intel Nuc / Gigabyte brix will hang on boot

Fixes: #

#38 

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->
Ran locally on a nuc

## How are existing users impacted? What migration steps/scripts do we need?

<!--- Fixes a bug, unblocks installation, removes a component of the stack etc -->
<!--- Requires a DB migration script, etc. -->


## Checklist:

I have:

- [x] updated the documentation and/or roadmap (if required)
- [ ] added unit or e2e tests
- [ ] provided instructions on how to upgrade
  • Loading branch information
mergify[bot] authored Mar 18, 2021
2 parents 7e9b43b + b9996bc commit a479f53
Show file tree
Hide file tree
Showing 3 changed files with 164 additions and 7 deletions.
30 changes: 30 additions & 0 deletions kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -267,3 +267,33 @@ else
--build-arg KERNEL_VERSIONS="$(KERNEL_VERSIONS)" \
-t $(ORG)/kconfig:${KCONFIG_TAG} .
endif

kconfig_amd64:
ifeq (${KCONFIG_TAG},)
docker buildx build --no-cache -f Dockerfile.kconfig \
--platform linux/amd64 \
--load \
--build-arg KERNEL_VERSIONS="$(KERNEL_VERSIONS)" \
-t $(ORG)/kconfig .
else
docker buildx build --no-cache -f Dockerfile.kconfig \
--platform linux/arm64 \
-o type=local,dest=out/kconfig \
--build-arg KERNEL_VERSIONS="$(KERNEL_VERSIONS)" \
-t $(ORG)/kconfig:${KCONFIG_TAG} .
endif

kconfig_arm64:
ifeq (${KCONFIG_TAG},)
docker buildx build --no-cache -f Dockerfile.kconfig \
--platform linux/arm64 \
--load \
--build-arg KERNEL_VERSIONS="$(KERNEL_VERSIONS)" \
-t $(ORG)/kconfig .
else
docker buildx build --no-cache -f Dockerfile.kconfig \
--platform linux/arm64 \
-o type=local,dest=out/kconfig \
--build-arg KERNEL_VERSIONS="$(KERNEL_VERSIONS)" \
-t $(ORG)/kconfig:${KCONFIG_TAG} .
endif
16 changes: 13 additions & 3 deletions kernel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,33 @@ make devbuild_5.10.x

## Modify the kernel

The Makefile can build a docker environment to configure a new kernel.
The Makefile can build a docker environment to configure a new kernel, it can generate a docker image and push it to the tinkerbell repository or build a local image.

**NOTE** This builder makes use of the docker `buildx` functionality that can be enabled with `docker buildx create --use`

Making a **multi-arch** image and pushing to the quay.io repository:

```
make kconfig
```

Making a **local** image (multi-arch isn't supported locally, so generate the kernel config for your local architecture [amd64/arm64])

```
make kconfig_amd64
```

We can now run this image:

```
docker run --rm -ti -v $(pwd):/src:z tinkerbell/kconfig
docker run --rm -ti -v $(pwd):/src:z quay.io/tinkerbell/kconfig
```

If modifying the config for a different architecture, it is best to specify the platform to
avoid any surprises when attempting to build the kernel later.

```
docker run --rm -ti -v $(pwd):/src:z --platform=linux/arm64 tinkerbell/kconfig
docker run --rm -ti -v $(pwd):/src:z --platform=linux/arm64 quay.io/tinkerbell/kconfig
```

We can now navigate to the source code and run the UI for configuring the kernel:
Expand Down
125 changes: 121 additions & 4 deletions kernel/config-5.10.x-x86_64
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,7 @@ CONFIG_ACPI_LPIT=y
CONFIG_ACPI_AC=y
CONFIG_ACPI_BATTERY=y
CONFIG_ACPI_BUTTON=y
CONFIG_ACPI_VIDEO=y
CONFIG_ACPI_FAN=y
# CONFIG_ACPI_TAD is not set
CONFIG_ACPI_DOCK=y
Expand Down Expand Up @@ -943,6 +944,7 @@ CONFIG_ARCH_HAS_PTE_DEVMAP=y
CONFIG_ZONE_DEVICE=y
CONFIG_DEV_PAGEMAP_OPS=y
# CONFIG_DEVICE_PRIVATE is not set
CONFIG_VMAP_PFN=y
CONFIG_ARCH_USES_HIGH_VMA_FLAGS=y
CONFIG_ARCH_HAS_PKEYS=y
# CONFIG_PERCPU_STATS is not set
Expand Down Expand Up @@ -1713,6 +1715,8 @@ CONFIG_ALLOW_DEV_COREDUMP=y
CONFIG_SYS_HYPERVISOR=y
CONFIG_GENERIC_CPU_AUTOPROBE=y
CONFIG_GENERIC_CPU_VULNERABILITIES=y
CONFIG_DMA_SHARED_BUFFER=y
# CONFIG_DMA_FENCE_TRACE is not set
# end of Generic Driver Options

#
Expand Down Expand Up @@ -1818,6 +1822,7 @@ CONFIG_BLK_DEV_NVME=y
# CONFIG_INTEL_MEI is not set
# CONFIG_INTEL_MEI_ME is not set
# CONFIG_INTEL_MEI_TXE is not set
# CONFIG_INTEL_MEI_HDCP is not set
# CONFIG_VMWARE_VMCI is not set
# CONFIG_GENWQE is not set
# CONFIG_ECHO is not set
Expand Down Expand Up @@ -2580,7 +2585,7 @@ CONFIG_I2C_MUX=y
# end of Multiplexer I2C Chip support

CONFIG_I2C_HELPER_AUTO=y
CONFIG_I2C_ALGOBIT=m
CONFIG_I2C_ALGOBIT=y

#
# I2C Hardware Bus support
Expand Down Expand Up @@ -3001,16 +3006,107 @@ CONFIG_MFD_VX855=y
# Graphics support
#
# CONFIG_AGP is not set
CONFIG_INTEL_GTT=y
# CONFIG_VGA_ARB is not set
# CONFIG_VGA_SWITCHEROO is not set
# CONFIG_DRM is not set
CONFIG_DRM=y
CONFIG_DRM_MIPI_DSI=y
# CONFIG_DRM_DP_AUX_CHARDEV is not set
# CONFIG_DRM_DEBUG_MM is not set
# CONFIG_DRM_DEBUG_SELFTEST is not set
CONFIG_DRM_KMS_HELPER=y
CONFIG_DRM_KMS_FB_HELPER=y
# CONFIG_DRM_DEBUG_DP_MST_TOPOLOGY_REFS is not set
CONFIG_DRM_FBDEV_EMULATION=y
CONFIG_DRM_FBDEV_OVERALLOC=100
# CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM is not set
# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
# CONFIG_DRM_DP_CEC is not set

#
# I2C encoder or helper chips
#
# CONFIG_DRM_I2C_CH7006 is not set
# CONFIG_DRM_I2C_SIL164 is not set
# CONFIG_DRM_I2C_NXP_TDA998X is not set
# CONFIG_DRM_I2C_NXP_TDA9950 is not set
# end of I2C encoder or helper chips

#
# ARM devices
#
# end of ARM devices

# CONFIG_DRM_RADEON is not set
# CONFIG_DRM_AMDGPU is not set
# CONFIG_DRM_NOUVEAU is not set
CONFIG_DRM_I915=y
CONFIG_DRM_I915_FORCE_PROBE=""
CONFIG_DRM_I915_CAPTURE_ERROR=y
CONFIG_DRM_I915_COMPRESS_ERROR=y
CONFIG_DRM_I915_USERPTR=y
# CONFIG_DRM_I915_GVT is not set

#
# drm/i915 Debugging
#
# CONFIG_DRM_I915_WERROR is not set
# CONFIG_DRM_I915_DEBUG is not set
# CONFIG_DRM_I915_DEBUG_MMIO is not set
# CONFIG_DRM_I915_SW_FENCE_DEBUG_OBJECTS is not set
# CONFIG_DRM_I915_SW_FENCE_CHECK_DAG is not set
# CONFIG_DRM_I915_DEBUG_GUC is not set
# CONFIG_DRM_I915_SELFTEST is not set
# CONFIG_DRM_I915_LOW_LEVEL_TRACEPOINTS is not set
# CONFIG_DRM_I915_DEBUG_VBLANK_EVADE is not set
# CONFIG_DRM_I915_DEBUG_RUNTIME_PM is not set
# end of drm/i915 Debugging

#
# drm/i915 Profile Guided Optimisation
#
CONFIG_DRM_I915_FENCE_TIMEOUT=10000
CONFIG_DRM_I915_USERFAULT_AUTOSUSPEND=250
CONFIG_DRM_I915_HEARTBEAT_INTERVAL=2500
CONFIG_DRM_I915_PREEMPT_TIMEOUT=640
CONFIG_DRM_I915_MAX_REQUEST_BUSYWAIT=8000
CONFIG_DRM_I915_STOP_TIMEOUT=100
CONFIG_DRM_I915_TIMESLICE_DURATION=1
# end of drm/i915 Profile Guided Optimisation

# CONFIG_DRM_VGEM is not set
# CONFIG_DRM_VKMS is not set
# CONFIG_DRM_VMWGFX is not set
# CONFIG_DRM_GMA500 is not set
# CONFIG_DRM_UDL is not set
# CONFIG_DRM_AST is not set
# CONFIG_DRM_MGAG200 is not set
# CONFIG_DRM_QXL is not set
# CONFIG_DRM_BOCHS is not set
# CONFIG_DRM_VIRTIO_GPU is not set
CONFIG_DRM_PANEL=y

#
# Display Panels
#
# CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN is not set
# end of Display Panels

CONFIG_DRM_BRIDGE=y
CONFIG_DRM_PANEL_BRIDGE=y

#
# Display Interface Bridges
#
# CONFIG_DRM_ANALOGIX_ANX78XX is not set
# end of Display Interface Bridges

# CONFIG_DRM_ETNAVIV is not set
# CONFIG_DRM_CIRRUS_QEMU is not set
# CONFIG_DRM_GM12U320 is not set
# CONFIG_DRM_XEN is not set
# CONFIG_DRM_VBOXVIDEO is not set
# CONFIG_DRM_LEGACY is not set
CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y

#
Expand Down Expand Up @@ -3087,9 +3183,20 @@ CONFIG_FB_HYPERV=y
# Backlight & LCD device support
#
# CONFIG_LCD_CLASS_DEVICE is not set
# CONFIG_BACKLIGHT_CLASS_DEVICE is not set
CONFIG_BACKLIGHT_CLASS_DEVICE=y
# CONFIG_BACKLIGHT_APPLE is not set
# CONFIG_BACKLIGHT_QCOM_WLED is not set
# CONFIG_BACKLIGHT_SAHARA is not set
# CONFIG_BACKLIGHT_ADP8860 is not set
# CONFIG_BACKLIGHT_ADP8870 is not set
# CONFIG_BACKLIGHT_LM3639 is not set
# CONFIG_BACKLIGHT_LV5207LP is not set
# CONFIG_BACKLIGHT_BD6107 is not set
# CONFIG_BACKLIGHT_ARCXCNN is not set
# end of Backlight & LCD device support

CONFIG_HDMI=y

#
# Console display driver support
#
Expand Down Expand Up @@ -3513,8 +3620,11 @@ CONFIG_DW_DMAC_PCI=y
#
# DMABUF options
#
# CONFIG_SYNC_FILE is not set
CONFIG_SYNC_FILE=y
# CONFIG_SW_SYNC is not set
# CONFIG_UDMABUF is not set
# CONFIG_DMABUF_MOVE_NOTIFY is not set
# CONFIG_DMABUF_SELFTESTS is not set
# CONFIG_DMABUF_HEAPS is not set
# end of DMABUF options

Expand Down Expand Up @@ -3594,27 +3704,34 @@ CONFIG_X86_PLATFORM_DEVICES=y
# CONFIG_ACPI_WMI is not set
# CONFIG_ACERHDF is not set
# CONFIG_ACER_WIRELESS is not set
# CONFIG_APPLE_GMUX is not set
# CONFIG_ASUS_LAPTOP is not set
# CONFIG_ASUS_WIRELESS is not set
# CONFIG_EEEPC_LAPTOP is not set
# CONFIG_DCDBAS is not set
# CONFIG_DELL_SMBIOS is not set
# CONFIG_DELL_RBU is not set
# CONFIG_DELL_SMO8800 is not set
# CONFIG_FUJITSU_LAPTOP is not set
# CONFIG_FUJITSU_TABLET is not set
# CONFIG_GPD_POCKET_FAN is not set
# CONFIG_HP_ACCEL is not set
# CONFIG_HP_WIRELESS is not set
# CONFIG_IBM_RTL is not set
# CONFIG_SENSORS_HDAPS is not set
# CONFIG_THINKPAD_ACPI is not set
# CONFIG_INTEL_ATOMISP2_PM is not set
# CONFIG_INTEL_HID_EVENT is not set
# CONFIG_INTEL_MENLOW is not set
# CONFIG_INTEL_VBTN is not set
# CONFIG_SURFACE_3_POWER_OPREGION is not set
# CONFIG_SURFACE_PRO3_BUTTON is not set
# CONFIG_SAMSUNG_LAPTOP is not set
# CONFIG_SAMSUNG_Q10 is not set
# CONFIG_TOSHIBA_BT_RFKILL is not set
# CONFIG_TOSHIBA_HAPS is not set
# CONFIG_ACPI_CMPC is not set
# CONFIG_PANASONIC_LAPTOP is not set
# CONFIG_SYSTEM76_ACPI is not set
# CONFIG_TOPSTAR_LAPTOP is not set
# CONFIG_I2C_MULTI_INSTANTIATE is not set
Expand Down

0 comments on commit a479f53

Please sign in to comment.