Jump to content

Recommended Posts

Posted

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.

Posted

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

 

Posted
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.

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

Important Information

Terms of Use - Privacy Policy - Guidelines