How can I debug kernel source code in armbian build system very simply?

Recommended Posts

Armbian is a community driven open source project. Do you like to contribute your code?



unsure if you want to debug the kernel or want to patch a kernel


if you are using "lib" tool to create kernel or image, have a look at the  "userpatches" folder


on my VM dedicated to Armbian tool, look at my sections related to lamobo-r1 "sunxi-next" (patch & kernel config)




root@server1404:~/armbian# ls  lib  output  sources  toolchains  userpatches

root@server1404:~/armbian# tree userpatches/
|-- kernel
|   |-- sunxi-next
|   |   |-- 0001-crypto-sun4i-ss-support-the-Security-System-PRNG.patch
|   |   |-- X101-golfromeo.cpu.gmac.patch
|   |   |-- lamobo-r1
|   |-- udoo-default
|   `-- udoo-next
|-- linux-sunxi-next.config -> ../sources/linux-vanilla/config-sunxi
|-- misc
|-- overlay
|-- patch
`-- u-boot
    |-- u-boot-default
    |-- u-boot-dev
    |-- u-boot-neo-default
    |-- u-boot-next



Link to post
Share on other sites

@zhao_steven, you can avoid the github checkout if you wish to do incremental builds using "FORCE_CHECKOUT=no".


Than our patches doesn't work since we don't start with clean code.  :huh:


So we added debug mode, which stops the compilation and waits that user made some changes and produce a patch afterwards. This is o.k. for tiny and known changes, but when there is a lot to do?

Link to post
Share on other sites

I reworked this part. How it works?


1. Compile with DEBUG_MODE=yes

2. You are prompted to make u-boot changes. Your previous created patch in this process is already included.

3. Patch is (re)created in:


4. You are prompted to make kernel changes. Your previous created patch in this process is already included.

5. Patch is (re)created in:




When you are satisfied with your work, move this patch set to your:

# or

or eventually sent patches to include them into regular build.



Link to post
Share on other sites
This topic is now closed to further replies.