How to rebuild the kernel


I’d like to rebuild the NanoPI kernel in order to embed the patches allowing to detect my USB XMOS U2018 interface with my NanoPI Neo as a native DSD enabled.

I’ve never built a Linux Kernel, have good notions in software compilation, is there a tutorial especially for DietPI which could help ?
I’ve tried to apply some tuto for Debian, but seems DietPI architecture is slightly different.

The ideal, would be to have the kernels built by DietPI team ready on-the-shelf for NanoPI with these patches, but it seems not possible.
If I could be helped a bit, I’d be happy to share .

Thanks in advance.

I’m not an expert in these matters but I know the DietPi team do not build kernels, they use those from other sources i.e. the Raspberry Pi version is based on Rasbian, the Odroid version based on Meveric’s distro and so on. So I doubt you’ll get the info you want in this forum.


@John Thanks

Ok, my question would be. Is it possible/easy to boot on another kernel than the one selected by DiePI team?

My aim, would be to pick up the same version than the official kernel for DietPI and to patch it with the native DSD support in the file sound/usb/quirks.c

It seems to be only a matter of a missing case in the switch section with the Armature Hecate values, see:

I would appreciate to have the patch delivered in the Linux mainline but I have no idea on how to proceed…

Thanks John for helping.


First have to say, I personally have null,zero, nada skill in kernel building from source or patching source code.

Kernel is not selected by DiePI team. It only depend on what base line destribution maintainer have build in.

So in your case have a look on login screen:


root@NanoPi-Neo:~# cat /proc/version
Linux version 3.4.113-sun8i (root@armbian) (gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) ) #4 SMP PREEMPT Wed Nov 22 13:45:28 CET 2017

Have never ever read a single word here, that DietPi build his own Kernel, Firmware, Device Tree, u-boot, uImage, …
This, for your particular device, was done by ARMbian .
And they use, in your example, Debian as base Distro system.

root@NanoPi-Neo:~# cat /etc/debian_version

root@NanoPi-Neo:~# cat /etc/apt/sources.list
deb jessie main contrib non-free
deb jessie-updates main contrib non-free
deb jessie/updates main contrib non-free
deb jessie-backports main contrib non-free

To get it clear: (have quote it now more then twenty times)

Sorry, where is no and never ever was a “official kernel for DietPI”. It was a ARMbian kernel, build with armbian build tools.

Because the manufactor is incapable, to give you a working Debian base OS image, with a working Kernel, Firmware, Device Tree, u-boot, uImage, … BUT he is able to take YOUR money!
And he is not willing to give you any pursue software support.
This work have be done by ARMbian.
So DietPi was able to get some running application software on it, with user friendly and easy config- and install-managment.

But back to you base question.

You can simple install a other kernel version via

 apt-get install

see and reboot.

Hmm … I think a starting point can be here:

More and continuative infos can be found here:

Sorry, if all this sound a bit pissed, but all infos can be found on your device, by searching or inside this forum.
This never has been a secrect or something DietPi have to deceit and fraudulent concealment.
But please keep a eye on this:

The subject ARMbian based images is for DietPi now history.

@k-plan Many thanks for your links, very helpful.
I better understand now the removal of the NanoPI Neo in the download list. It’s a pity, however I respect the project decision.
Anyway I ordered a NanoPI Neo 2 that would arrive soon.
I’ll focus my efforts to get the Native DSD support for my USB interface (XMOS U208) on the Neo2.

I’m not a fan of the PREP process proposed by DietPI. I’ve tried it to setup an AMD Ryzen x86 platform with DietPI and had few issues to complete the installation, the description still lack from some information. Yes the procedure is still in beta stage thought…


Hello NanoPat.

Did you get Native DSD working on Neo 2 ??

Let me know.