zhao_steven Posted June 17, 2016 Posted June 17, 2016 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?
wildcat_paris Posted June 17, 2016 Posted June 17, 2016 @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
martinayotte Posted June 17, 2016 Posted June 17, 2016 @zhao_steven, you can avoid the github checkout if you wish to do incremental builds using "FORCE_CHECKOUT=no".
Igor Posted June 17, 2016 Posted June 17, 2016 @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. 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? 1
zhao_steven Posted June 19, 2016 Author Posted June 19, 2016 @wildcat_paris I'm talking about debug kernel driver source code.
zhao_steven Posted June 19, 2016 Author Posted June 19, 2016 @Igor I need a option for Stopping sync source from git hub and repatch u-boot and kernel. This will save my build system time.
zhao_steven Posted June 19, 2016 Author Posted June 19, 2016 @Igor one option is for Stopping sync source from git hub. other option is prevent clean,repatch u-boot and kernel.
Igor Posted June 19, 2016 Posted June 19, 2016 https://github.com/igorpecovnik/lib/commit/cdcfd97e5f36dc4914ed20f25ae1e430e487d752 Try this way: When FORCE_CHECKOUT is disabled, we don't apply patches.
Igor Posted June 19, 2016 Posted June 19, 2016 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.
Recommended Posts