0

I am attempting to build a custom kernel for the i386 architecture and I have been trying to target the kernel at the 586 processor.

I have a kernel configuration, which defines CONFIG_M586=y, in the kernel source tree: ./arch/x86/configs/i386_vyos_defconfig

I then run make i386_vyos_defconfig followed by make-kpkg kernel_image. However at some point during the build process the .config file is updated to set CONFIG_M686=y instead.

I have attempted to set '--subarch i586' but it doesn't seem to help.

What is going on and how I configure it to target 586 instead, or not update the .config file?

My Kernel configuration is here: https://gist.github.com/njh/d6191ee130620ccd190e9273864775bd

I am using kernel-package version 13.014+nmu1 on Debian 8 (jessie).

  • If you are doing it because you need CPU support, have a look at Antix – Rui F Ribeiro Feb 3 at 18:42
  • I am going to it add i386 support to VyOS 1.2.0 (which is based on Debian Jessie) – njh Feb 3 at 19:14
0

I have not worked out how to fix it but I am now confident that my issue is a bug, not a feature of Debian kernel building.

I traced the kernel change back to the following chain of events:

  1. Run: make-kpkg kernel_image
  2. This executes make -f /usr/share/kernel-package/ruleset/minimal.mk debian
  3. Which ends uo triggering the target: debian/stamp/pre-build-common
  4. Which depends on the target: debian/stamp/conf/vars
  5. Which executes: make -f ./debian/ruleset/kernel_version.mk debian_conf_var
  6. kernel_version.mk includes the main Linux kernel Makefile
  7. For some reason this causes the Linux Makefile to run make syncconfig - I don't think it is supposed to

As far as I understand from reading an article about Kconfig/kbuild, the syncconfig target is just supposed to take the current configuration and generate some derived files from it. But for some reason it is changing my .config file too.

I think I have been far enough down this rabbit hole - time to escape.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.