Jump to content

Build kernel using Git bundles


JF002

Recommended Posts

Hi!

I recently managed to boot Armbian on the QuartzPro64 board (RK3588) from Pine64. I also installed Proxmox, which worked out of the box. This is really amazing to me!

 

To do this, I manually replaced the kernel and DTB file from the Armbian image for the OrangePi5 board, since it's based on the same CPU.

 

Now, I would like to build the image for the QuartzPro64 using the Armbian build script. So far, I've already :

  • added a new .conf file in config/boards (based on orangepi5-plus.conf)
  • added a new .config file in config/kernel
  • added a new entry in the list of branch in config/sources/families/rockchip-rk3588.conf.

 

	Megi)
		# Megi's kernel
		SKIP_BOOTSPLASH="yes"
		LINUXFAMILY=rockchip-rk3588
		LINUXCONFIG='linux-rockchip-rk3588-'$BRANCH
		KERNEL_MAJOR_MINOR="6.5"                   # Major and minor versions of this kernel.
		KERNELPATCHDIR='rockchip-rk3588-megi' # Empty/nonexisting, so zero patches, hopefully
		KERNELSOURCE='???'
		KERNELBRANCH='???'
		KERNEL_DRIVERS_SKIP+=(driver_rtw88) # This is a custom kernel, while the rtw88 driver patching expects pure mainline
		;;

As you can see, I would like to build Megi's kernel (https://xff.cz/git/linux/log/?h=orange-pi-6.5). The kernel tree is not available on Github or Gitlab, and is only available using Git bundles.

 

So, to build the kernel, I need to clone torvalds/linux, then apply the Git bundle file from Megi.

Does Armbian support this way of fetching the kernel sources? Is there another similar board I could use as inspiration?


Thanks!

Link to comment
Share on other sites

08.10.2023 в 17:51, JF002 сказал:

As you can see, I would like to build Megi's kernel (https://xff.cz/git/linux/log/?h=orange-pi-6.5). The kernel tree is not available on Github or Gitlab, and is only available using Git bundles.

 

So, to build the kernel, I need to clone torvalds/linux, then apply the Git bundle file from Megi.

Does Armbian support this way of fetching the kernel sources? Is there another similar board I could use as inspiration?

 

If you use this instruction, you will get branches in the repository named:

megi/orange-pi-6.4
megi/orange-pi-6.5
megi/orange-pi-6.6

These branches are the result of combining 27 branches with the corresponding branch kernel.org the repository.

If you extract one of these branches to the working directory and extract the difference as a series of patches with

the command "git format-patch v6.5.7..HEAD -o /path/to/tmpdir" you will get more than 600 files.

These patch files are already available in the build system.

All megi patches in tree patch/kernel/archive/sunxi-6.5/series.megous

But only those necessary for sunxi are used.
The minus (-) sign in the first position indicates that the patch file is not applied and does not adapt to the current version.

Copy the patches.megous folder and the series.megous file somewhere, for example:

mkdir -p patch/kernel/archive/megi-6.5
cp patch/kernel/archive/sunxi-6.5/series.megous patch/kernel/archive/megi-6.5/
cp -r patch/kernel/archive/sunxi-6.5/patches.megous patch/kernel/archive/megi-6.5/
cp patch/kernel/archive/megi-6.5/series.megous patch/kernel/archive/megi-6.5/series.conf

 Delete all minus (-) signs in the patch/kernel/archive/megi-6.5/series.conf file.

After that, you have to adapt the patches to the current kernel version yourself.
Apply them to the git repository as the "git am" command in the sequence order in the series file.

When the work is finished and all the patches are applied, you will be able to extract them using a mk_format_patch script.

Specify an existing patch/kernel/archive/megi-6.5/patches.megous folder to extract.

The changed patches will be replaced.

 

P.S. All other questions please in a personal conversation.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines