anchor.diff:      gpg2 --verify linux-${KERNEL_VERSION}.tar.sign linux-${KERNEL_VERSION}.tar && \
       cat linux-${KERNEL_VERSION}.tar | tar --absolute-names -x && mv /linux-${KERNEL_VERSION} /linux
   
  -COPY kernel_config-${KERNEL_SERIES} /linux/arch/x86/configs/x86_64_defconfig
  +# When using COPY with more than one source file, the destination must be a directory and end with a /
  +COPY kernel_config-${KERNEL_SERIES}* /linux/
   COPY kernel_config.debug /linux/debug_config
   
  -RUN if [ -n "${DEBUG}" ]; then \
  -    sed -i 's/CONFIG_PANIC_ON_OOPS=y/# CONFIG_PANIC_ON_OOPS is not set/' /linux/arch/x86/configs/x86_64_defconfig; \
  -    cat /linux/debug_config >> /linux/arch/x86/configs/x86_64_defconfig; \
  -    fi
  +RUN case $(uname -m) in \
  +    x86_64) \
  +        KERNEL_DEF_CONF=/linux/arch/x86/configs/x86_64_defconfig; \
  +        cp /linux/kernel_config-${KERNEL_SERIES} ${KERNEL_DEF_CONF}; \
  +        ;; \
  +    aarch64) \
  +        KERNEL_DEF_CONF=/linux/arch/arm64/configs/defconfig; \
  +        cp /linux/kernel_config-${KERNEL_SERIES}-aarch64 ${KERNEL_DEF_CONF}; \
  +        ;; \
  +    esac  && \
  +    if [ -n "${DEBUG}" ]; then \
  +        sed -i 's/CONFIG_PANIC_ON_OOPS=y/# CONFIG_PANIC_ON_OOPS is not set/' ${KERNEL_DEF_CONF}; \
  +        cat /linux/debug_config >> ${KERNEL_DEF_CONF}; \
  +    fi && \
  +    rm /linux/kernel_config-${KERNEL_SERIES}*
   
   # Apply local patches
   COPY patches-${KERNEL_SERIES} /patches
  
positive.code:     kmod \
      libelf-dev \
      libressl-dev \
      libunwind-dev \
      linux-headers \
      ncurses-dev \
      sed \
  
negative.code: RUN make defconfig && \
      make oldconfig && \
      make -j "$(getconf _NPROCESSORS_ONLN)" KCFLAGS="-fno-pie" && \
      case $(uname -m) in \
      x86_64) \
          cp arch/x86_64/boot/bzImage /out/kernel; \
          ;; \
      aarch64) \
          cp arch/arm64/boot/Image.gz /out/kernel; \
          ;; \
      esac && \
      cp System.map /out && \
      ([ -n "${DEBUG}" ] && cp vmlinux /out || true)
  
  