WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: dCore real time kernel  (Read 5959 times)

Offline mzlj10

  • Newbie
  • *
  • Posts: 23
dCore real time kernel
« on: September 29, 2016, 04: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!

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: dCore real time kernel
« Reply #1 on: September 29, 2016, 06: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.
The only barriers that can stop you are the ones you create yourself.

Offline mzlj10

  • Newbie
  • *
  • Posts: 23
Re: dCore real time kernel
« Reply #2 on: September 29, 2016, 07: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/

Offline mzlj10

  • Newbie
  • *
  • Posts: 23
Re: dCore real time kernel
« Reply #3 on: September 29, 2016, 08: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.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: dCore real time kernel
« Reply #4 on: September 29, 2016, 02:16:03 PM »
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.
The only barriers that can stop you are the ones you create yourself.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: dCore real time kernel
« Reply #5 on: September 29, 2016, 04: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


Offline mzlj10

  • Newbie
  • *
  • Posts: 23
Re: dCore real time kernel
« Reply #6 on: September 30, 2016, 04: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
« Last Edit: September 30, 2016, 04:53:52 AM by mzlj10 »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: dCore real time kernel
« Reply #7 on: September 30, 2016, 05:09:06 AM »
Yes, you need to add the modules.
The only barriers that can stop you are the ones you create yourself.

Offline mzlj10

  • Newbie
  • *
  • Posts: 23
Re: dCore real time kernel
« Reply #8 on: September 30, 2016, 08:37:15 AM »
How do I connect this rebuild kernel to work with dCore?

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: dCore real time kernel
« Reply #9 on: October 01, 2016, 12:24:19 AM »
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.
« Last Edit: October 01, 2016, 12:27:38 AM by Jason W »

Offline mzlj10

  • Newbie
  • *
  • Posts: 23
Re: dCore real time kernel
« Reply #10 on: October 03, 2016, 06: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.

Offline mzlj10

  • Newbie
  • *
  • Posts: 23
Re: dCore real time kernel
« Reply #11 on: October 03, 2016, 07: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

Offline mzlj10

  • Newbie
  • *
  • Posts: 23
Re: dCore real time kernel
« Reply #12 on: October 03, 2016, 10: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?