Tiny Core Linux

dCore Import Debian Packages to Mountable SCE extensions => dCore X86 => Topic started by: mzlj10 on September 29, 2016, 01:40:35 AM

Title: dCore real time kernel
Post by: mzlj10 on September 29, 2016, 01:40:35 AM
Hello

I'm trying to make dCore-xenial kernel into rt kernel. I read a post on forum on how to do it for tiny core. http://forum.tinycorelinux.net/index.php?topic=9082.0

"download patched kernel source and its config from

download latest rt (PREEMT RT) patch for tc kernel (it is currently 2.6.33.3) from kernel.org

extract sources
cd to linux
apply rt patch
cp kernel config to .config
make oldconfig
make menuconfig (if you want to make changes)
make bzImage
make modules"

If I understand right you need the kernel version of the patch that match the kernel version of dCore-xenial. I look for the patch on the kernel.org site but there is only version of 4.1 and 4.4. But dCore-xenial is 4.2.9. Now I don't know which one to use or how to patch it. Is there some trick to do or need to use the old kernel version 3.18. (dCore-willy or later).

I'm wondering if you can give me some info on how to do it, or direct me to some site. I will appreciate any advice or idea.
Best regards!
Title: Re: dCore real time kernel
Post by: curaga on September 29, 2016, 03:09:11 AM
If there is no RT patch for that version, you should use a version where there is one. This will then require testing and possible adjustments, because it's a different version from what we tested with.
Title: Re: dCore real time kernel
Post by: mzlj10 on September 29, 2016, 04:17:58 AM
Can I use a standard linux kernel and add TC patch and RT patch ? Where can I find TC patch for the right linux kernel? I was looking at http://tinycorelinux.net/dCore/x86/import/src/
Title: Re: dCore real time kernel
Post by: mzlj10 on September 29, 2016, 05:28:50 AM
I find patches for tiny core, but can I use this patches on dCore? But I presume that you need specifed patch for every kernel.
Title: Re: dCore real time kernel
Post by: curaga on September 29, 2016, 11:16:03 AM
TC patches are cosmetic/size/bootspeed only, they are not required. So just a RT kernel with a suitable config.

dCore is not special, it uses the same kernel.
Title: Re: dCore real time kernel
Post by: Jason W on September 29, 2016, 01:57:43 PM
There is one difference in the Core and dCore kernels, and that is dCore has the devtmpfs enabled as necessary to support systemd's existence.   Below is the relevent entry in the kernel config file:

CONFIG_DEVTMPFS=y

Title: Re: dCore real time kernel
Post by: mzlj10 on September 30, 2016, 01:41:30 AM
thank you all for your help.
I have one question about modules. Do I need to do
Code: [Select]
make modules and add this modules to dCore.gz or isn't necessary?
I rebuild the kernel 4.4.7 and add rt patch, but how do I connect this kernel to work with dCore?
Got an kernel panic - not syncing error
Title: Re: dCore real time kernel
Post by: curaga on September 30, 2016, 02:09:06 AM
Yes, you need to add the modules.
Title: Re: dCore real time kernel
Post by: mzlj10 on September 30, 2016, 05:37:15 AM
How do I connect this rebuild kernel to work with dCore?
Title: Re: dCore real time kernel
Post by: Jason W on September 30, 2016, 09:24:19 PM
Do the command "make modules_install INSTALL_MOD_PATH=" to a temporary directory of your choosing.  then copy the directory under that install path, say /lib/modules/4.4.7 to /lib/modules/4.4.7 in the rootfs that will be the dCore*.gz.  And use the resulting vmlinuz to boot with.  You can gzip the module files if you wish also.
Title: Re: dCore real time kernel
Post by: mzlj10 on October 03, 2016, 03:23:48 AM
Thank you for your answer.
But I don't quite understand it. Where is this rootfs? I want to create a new dCore.gz file and put in on usb with bzImage to run from another machine. I just use gzip and put modules and firmware in dCore.gz file. Do I need for some extra steps? I have tried this, but got an kernel panic vfs unable to mount root fs error.

Sorry for this noob questions, but I'm new to Linux and I'm trying to understand how this all works.
Title: Re: dCore real time kernel
Post by: mzlj10 on October 03, 2016, 04:04:35 AM
I manage to remaster the dCore.gz but how do I copy this files

cpio: ./etc/security/opasswd: Cannot open: Permission denied
cpio: ./etc/shadow: Cannot open: Permission denied
cpio: ./etc/busybox.conf: Cannot open: Permission denied
cpio: ./etc/sudoers: Cannot open: Permission denied
cpio: ./etc/sudoers.d/README: Cannot open: Permission denied
cpio: ./etc/gshadow: Cannot open: Permission denied
cpio: ./var/lib/systemd/random-seed: Cannot open: Permission denied
Title: Re: dCore real time kernel
Post by: mzlj10 on October 03, 2016, 07:07:50 AM
I manage to copy all files. But now my mouse and keyboard are not responsive. I presume that some modules are missing, which one?