1 1
chucklz

Getting/building source for specific image release?

Recommended Posts

How can I obtain the kernel sources for a specific image and build the modules the same as those installed?
 

I am running into structure version differences when I build the mainline, then apply to my test system, and I don't want to run the test system on mainline, as I need the stability of the legacy kernel.  

 

I know there are certain options to build and ignore structure version differences as long as the structure is similar, but it would seem most pertinent to obtain the correct source for the kernel I am running, copy the .config to the build machine and then build the image.

This then allows me to easily switch between different kernel modules that I am developing and testing.

Share this post


Link to post
Share on other sites

Bit late but if it helps ... 

 

One method is to use a lib.config file in armbian/userpatches to reference a custom GIT repo and branch. This is where you'd be pushing your module changes and .config. Here's an example I am using to build a mainline for a NanoPi M1. 

 

 

# override GIT repo when we build default
echo "Branch is $BRANCH"
if [[ $BRANCH == "default" ]]; then
	KERNELSOURCE='https://github.com/g40/armbian-linux'
	KERNELBRANCH='branch:sunxi-vfe'
	# specify where our sources are found
	KERNELDIR='sunxi-vfe'
fi

 

Share this post


Link to post
Share on other sites
On 17. 6. 2017 at 6:08 AM, chucklz said:

How can I obtain the kernel sources for a specific image and build the modules the same as those installed?


We start to pack sources but they will be available in the future. But we do supply kernel headers, which comes by default. They are usually enough to build a module.

Share this post


Link to post
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...
1 1