jakeday / linux-surface

Linux Kernel for Surface Devices
2.59k stars 242 forks source link

Compiling kernel [debian/rules:6: build] Error 2 #593

Open ardynn opened 5 years ago

ardynn commented 5 years ago

I'm pretty green at this, but I've been on Linux a couple of years so help and patience would be really appreciated.

I'm trying to build Qzed's kernel on Debian testing as per the instructions, but I keep getting a [debian/rules:6: build] Error 2. No errors applying the patches or anything.

When I ran make -jgetconf _NPROCESSORS_ONLNdeb-pkg LOCALVERSION=-linux-surface for the first time it asked me dozens of questions about what support to include, so I tried generating the .config file using make ARCH=x86_64 defconfig and then make menuconfig. In both cases compiling seemed to finish and give me .debs which installed, but after loading the installed kernels with grub, the screen went blank.

If anyone could point me in the right direction I'd be grateful.

git checkout v5.3.6 cd linux-stable/ for i in ~/linux-surface/patches/5.3/*.patch; do patch -p1 < $i; done cp ~/linux-surface/configs/5.1/config .config make -j getconf _NPROCESSORS_ONLN deb-pkg LOCALVERSION=-linux-surface

AR drivers/net/built-in.a AR drivers/built-in.a make[2]: [debian/rules:6: build] Error 2 dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 make[1]: [scripts/package/Makefile:75: deb-pkg] Error 2 make: *** [Makefile:1451: deb-pkg] Error 2

chasecovello commented 5 years ago

This happens because the .config you're using was from a 5.1 kernel and doesn't have all the options defined for 5.3.6, so the build system breaks. Run 'make oldconfig' whenever you change the kernel version (even a minor release), and it will ask you questions only for the new options. The kernel should then compile without issues.

You may want to double-check that the surface drivers are enabled. 'make menuconfig' (or 'make nconfig' which is a little nicer) and go to Device Drivers -> x86 Platform Specific Drivers and make sure all the Surface drivers are enabled.

Heath123 commented 3 years ago

See https://forums.debian.net//viewtopic.php?f=5&t=143515

The actual build error was further up in the terminal readout. Since you had four threads, the others kept going until they finished, so the actual error is behind all those.

I had this issue (with the mainline Linux kernel, not this project) so try scrolling back or using one thread so you can see the error

roadapathy commented 2 years ago

If this is the same error that I got then I have the solution:

SYSTEM_BLACKLIST_KEYRING = N