dCore Import Debian Packages to Mountable SCE extensions > dCore x86_64
Linux Kernel Headers
A Guy:
Is there a package for this?
I have dCore/x86_64/release/dCore-stretch64 packages.
I would like to compile a driver against this particular kernel version. 4.8.17.
If it isn't now, I believe the kernel headers that the kernel is drawn from should include. I assumed I could find it somewhere on the Debian downloads area, but the folders don't seem to line up one to one.
Jason W:
Hi A Guy. These instructions are for anyone to compile the kernel or compatible modules for dCore-stretch64, so all steps are listed and I don't think I have documented them anywhere. First, be on a dCore-stretch64 running session and install the build-essential package. This contains all one needs to compile the kernel. Then download the three files below:
http://tinycorelinux.net/dCore/x86_64/import/src/kernel-4.8.17/README
http://tinycorelinux.net/dCore/x86_64/import/src/kernel-4.8.17/linux-4.8.17-patched.tar.xz
http://tinycorelinux.net/dCore/x86_64/import/src/kernel-4.8.17/config-4.8.17-tinycore-devtmpfs64
The linux-4.8.17-patched.tar.xz is the same as in Tinycore 8.x, but the dCore config adds the devtmpfs needed. Also, the README provides basic steps, but here is what I do to build the kernel and modules. Below are the steps. assuming one is at a terminal prompt and I do it all as root user and those files listed above are in the current directory. The current directory can of course be of one's choosing
--- Code: ---bash
mkdir /tmp/linux
cd /tmp/linux
wget http://tinycorelinux.net/dCore/x86_64/import/src/kernel-4.8.17/linux-4.8.17-patched.tar.xz
wget http://tinycorelinux.net/dCore/x86_64/import/src/kernel-4.8.17/config-4.8.17-tinycore-devtmpfs64
export CFLAGS="-mtune=generic -O2 -pipe"
export CXXFLAGS="-mtune=generic -O2 -pipe"
tar xvf linux-4.8.17-patched.tar.xz
mkdir /usr/src
ln -sf /tmp/linux/linux-4.8.17 /usr/src/linux
ln -sf /usr/src/linux /lib/modules/4.8.17-tinycore64/build
ln -sf /usr/src/linux /lib/modules/4.8.17-tinycore64/source
cd linux-4.8.17
cp config-4.8.17-tinycore-devtmpfs64 .config
make oldconfig
make prepare
make modules_prepare
make bzImage
make modules
make INSTALL_MOD_PATH=/desired/install/path modules_install
--- End code ---
This provides the environment the kernel for dCore-stretch64 was produced in. Earlier dCore kernels were built on Tinycore, but later ones are built on dCore itself.
A Guy:
Awesome, this is exactly what i need.
I need to create a development and test environment so that I can create and deploy a testing environment using PXE.
These are devices we create so I need to compile the drivers in the same kernel context as the deployment (dCore) booting environment. So I need the kernel headers to compile the drivers.
I am having a lot of fun with dCore. Thanks for the project. I believe it will help with my environment.
Little bummed about the deployment of sshd not being fully documented, but hey, Linux is free , right?
A Guy:
I understand what I have now... i didn't look well enough and went through the kernel recompile.
Realistically all i needed was the kernel headers to compile my driver.
Thanks again.
A Guy:
So, I just wanted to say that your script of how to compile the kernel has some flubs
--- Code: (bash) ---tar xvf linux-4.8.17-patched.txz
--- End code ---
should be
--- Code: (bash) ---tar xvf linux-4.8.17-patched.tar.txz
--- End code ---
--- Code: (bash) ---cp config-4.8.17-tinycore-mountdevtmpfs .config
--- End code ---
should be
--- Code: (bash) ---cp config-4.8.17-tinycore-devtmpfs64 .config
--- End code ---
Navigation
[0] Message Index
[#] Next page
Go to full version