From: Lucas Tanure <tanure@linux.com>
To: kernelnewbies <kernelnewbies@kernelnewbies.org>
Subject: Release of my Kernel Development Tool
Date: Sat, 27 May 2023 08:19:42 +0100 [thread overview]
Message-ID: <CAJX_Q+0kax71Xxou4x5P2bW=OdCjZQsr8Htzyzvq4awx2ghD6A@mail.gmail.com> (raw)
In-Reply-To: <20230519063029.GA1250807@hu-pbaronia-blr.qualcomm.com>
Hi,
I have been working with Kernel development and single-board computers
for a few years now, and to help me with my development, I created
this tool:
https://github.com/lucastanure/kernel_dev_tools (GPLv2)
It helps me to build and test the kernel in a faster and easy way. But
it also helps me to switch between boards (Rpi4, Vim4, Vim3, rk399) in
a reliable way.
The aim of this tool is to centralize the configuration of a
particular board (cross-compiler, kernel configuration, make targets,
etc.) in a config file and expose a simple workflow.
Example:
I have my VIM4 board configuration:
[vim4_arm64]
cc = aarch64-none-linux-gnu-
cc_path =
~/.local/bin/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin
kernel_target = Image
kernel_file = Image-devel
dtb_path = dtbs_devel
config_file = $kdt_boards/vim4_arm64_defconfig
ramfs_file = initramfs-linux-devel.img
update_ramfs = mkinitcpio -k $version -g $ramfs_file
on = kasa --alias Strip_9BA6 --type strip on --name P2
off = kasa --alias Strip_9BA6 --type strip off --name P2
And my workflow to develop the kernel is as follows:
$ export board=vim4
# Do some kernel changes
$ kb config # Configures the kernel
$ kb build # Builds the kernel
$ kb scp vim4 # Copy the kernel, modules and device trees to my VIM4
board using rsync and scp
# Reboot the board using ssh or issue:
$ kb off ; sleep 2 ; kb on # Power cycle the board if reboot by ssh
is not available
This tool has many more features, like updating kernels in image files
and removing Gerrit "Change-id" from patch files.
In the near future, I will add the following:
- Check a series of patches before upstreaming. Build the kernel with
every patch in a patch series and check for building warnings,
checkpatch, sparse, etc.
- Device tree tool to help to upstream new boards to the kernel
mainline. Like, find device nodes from a device tree that don't have a
driver for it and list Kernel configs needed by the device tree.
Happy coding
Thanks
Lucas
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
prev parent reply other threads:[~2023-05-27 7:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-18 7:16 API between modules Lucas Tanure
2023-05-18 10:33 ` Greg KH
2023-05-19 6:30 ` Prathu Baronia
2023-05-27 7:19 ` Lucas Tanure [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJX_Q+0kax71Xxou4x5P2bW=OdCjZQsr8Htzyzvq4awx2ghD6A@mail.gmail.com' \
--to=tanure@linux.com \
--cc=kernelnewbies@kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).