Jump to content

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


Recommended Posts

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

Each build will need to download source code from the git hub , if add a line of source code,also need  patch again,  but the process need very super time, what is the simple method?

Link to comment
Share on other sites

@zhao_steven

 

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
compile.sh  compile.sh~  lib  output  sources  toolchains  userpatches

root@server1404:~/armbian# tree userpatches/
userpatches/
|-- README
|-- customize-image.sh
|-- 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 comment
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 comment
Share on other sites

https://github.com/igorpecovnik/lib/commit/e49c01a8230509fc3f92ceb77d5db51a46e640c2

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:

userpatches/patch/u-boot-UBOOTFAMILY-UBOOTBRANCH.patch

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

5. Patch is (re)created in:

userpatches/patch/kernel-KERNELFAMILY-KERNELBRANCH.patch

-

 

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

userpatches/kernel/KERNELFAMILY-KERNELBRANCH
# or
userpatches/u-boot/UBOOTFAMILY-UBOOTBRANCH

or eventually sent patches to include them into regular build.

 

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines