WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [Solved] TC3.8_4 Real Time Upgrade  (Read 55939 times)

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 370
Re: TC3.8_4 Real Time Upgrade
« Reply #105 on: May 06, 2021, 07:09:35 PM »
Hi Rich,

Thanks for the help, I printed out the whole thread some time ago for reference and I went through it all but I'm not sure yet what's missing. I'm concerned that my RT installation is perhaps not 100 percent correct, I hope that's not the case though.

On the original non RT install, when I "cd lib/modules/2.6.33.3-tinycore" and type "ls -l" I see (amongst others);

lrwxrwrwx 1 root root 79 May 7 01:29 build -> tmp/tcloop/linux-headers-2.6.33.3-tinycore/lib/modules/2.6.33.3-tinycore/build

And when I "cd build" and then type "pwd"I get

"/lib/modules/2.6.33.3-tinycore/build" but yet the prompt shows "tc@box:/usr/local/src/linux-headers-2.6.33.3-tinycore$"

But on the RT pen-drive, when I "cd lib/modules/2.6.33.3-l1-rt19" there's no build directory in there at all. But, still on the RT pen drive, when I "cd lib/modules/2.6.33.3-tinycore" (leftover from the nonRT kernel that I installed first before adding in the RT bzImage and making a new initrd), there is a build directory in there !

The first time around I was fixated on installing the driver to /usr/src/linux/drivers as per the GSC instructions, so after we installed linux-headers-2.6.33.3-tinycore.tcz, I also made this directory "mkdir /usr/src/linux/drivers", and worked out of there originally to build the driver,  but later on switched over (as per your guidance) to building the driver in home directory, to keep the driver build persistent, so that's what I tried to do this time around, just started right off the bat by building the driver in /home/tc/24.dsi.linux.4.11.91.32.0...that's about all I can see that is different this time around, besides the missing "build" directory in the RT modules directory.

I did verify that Module.Symvers is in /usr/src/linux on the RT pen drive but for some reason I'm missing this "build" directory under "/lib/modules/2.6.33.3-l1-rt19", any idea why it would be missing in the RT lib/modules directory ?

Also, on the RT pen drive, when I "cd /usr/src/linux", I once again see -----> "tc@box:/usr/local/src/linux-headers-2.6.33.3-tinycore$" at the terminal prompt, is that right ?, or shouldn't it be "..../linux-headers-2.6.33.3-l1-rt19" if the RT was installed properly ?

Sorry to be such a pain.

Thanks,

David

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: TC3.8_4 Real Time Upgrade
« Reply #106 on: May 08, 2021, 05:43:20 AM »
Hi MTCAT
... But on the RT pen-drive, when I "cd lib/modules/2.6.33.3-l1-rt19" there's no build directory in there at all. ...
That's because you don't have  linux-headers.2.6.33.3-l1-rt19.tcz.  It doesn't exist. There's probably a script for
creating it. Maybe curaga or Juanito can shed some light on this.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: TC3.8_4 Real Time Upgrade
« Reply #107 on: May 08, 2021, 06:47:58 AM »
Maybe I’m wrong, but I would have thought the headers are the same?

The build directory is just a symlink to the configured kernel source.
« Last Edit: May 08, 2021, 06:49:56 AM by Juanito »

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 370
Re: TC3.8_4 Real Time Upgrade
« Reply #108 on: May 08, 2021, 08:31:51 AM »
Hi Rich and Juanito,

Thanks so much for the help; I was wondering what you guys think about the following,

1) I assume the 24DSI driver we already built for 2.6.33.3 will not work with 2.6.33.3-l1-rt19 due to kernel mismatch ?

2) Is there a way I can make a new symbolic link with "sudo ln -s ????" inside  /lib/modules/2.6.33.3-l1-rt19 ? Kind of like
this person did here http://forum.tinycorelinux.net/index.php/topic,23847.0.html

3) Is there a way to make a new package "linux-headers.2.6.33.3-l1-rt19.tcz" that could be installed ?

4) In an older post from Juanito here http://forum.tinycorelinux.net/index.php/topic,7219.0.html and also here
http://forum.tinycorelinux.net/index.php/topic,23847.0.html, could I  "expand" the bzImagert kernel file and
then make a symbolic link for the RT kernel that way ?

Thanks,

David

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: TC3.8_4 Real Time Upgrade
« Reply #109 on: May 08, 2021, 08:46:29 AM »
Try to load your driver - you will get an error message if the kernel doesn’t like it.

To compile a new driver, I believe you can use the standard kernel headers, but you will need to prepare the kernel source with the real time kernel config.

Yes, you can make the build symlink as described.
« Last Edit: May 08, 2021, 08:48:34 AM by Juanito »

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 370
Re: TC3.8_4 Real Time Upgrade
« Reply #110 on: May 08, 2021, 11:14:20 AM »
Hi Rich and Juanito,

I brought the RT kernel to my old non-RT pen drive, modified extlinux.conf appropriately, and tried to load the 24DSI driver with the RT kernel, unfortunately this didn't work, I saw --->ERROR<--- flash past during the driver load attempt, and sure enough, "lsmod" doesn't show the 24dsi module there.

So it looks like I need to build the driver with the RT kernel somehow.

I apologize for my lack of knowledge/experience but could you advise as to what would be the best way to get the "build" symbolic link into /lib/modules/2.6.33.3-l1-rt19" directory ?

Might it be as easy as one "sudo ln-s xxxxx" command ? Or do I need to unpack the bzImagert file and then make a symbolic link ??

Thanks,

David

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: TC3.8_4 Real Time Upgrade
« Reply #111 on: May 08, 2021, 11:35:16 AM »
It’s as easy as “sudo ln -s xxx”.

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 370
Re: TC3.8_4 Real Time Upgrade
« Reply #112 on: May 08, 2021, 12:20:12 PM »
Hi Juanito,

Thanks for the help, what do I point the link too though ???, i.e., can you help me fill in the "xxxxx" below ?

sudo ln -s xxxxxx /lib/modules/2.6.33.3-l1-rt19/build

I don't have the kernel source to "point" too, I only have the pre-built bzImagert file.

Thanks,

David

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: TC3.8_4 Real Time Upgrade
« Reply #113 on: May 08, 2021, 12:50:47 PM »
You can’t use bzImage, you need the kernel source.

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 370
Re: TC3.8_4 Real Time Upgrade
« Reply #114 on: May 08, 2021, 02:07:32 PM »
Hi Juanito,

Is there any way of accomplishing the end goal, namely, getting a symbolic link /lib/modules/2.6.33.3-l1-rt19/build without the kernel source ?

When you say I need the kernel source, I think you are saying that I need to build the kernel from scratch ?

I already tried that and wasn't completely successful, I could try again I suppose, but I was hoping to use the pre-built kernel, the bzImagert file already made for us.

Thanks,

David

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 370
Re: TC3.8_4 Real Time Upgrade
« Reply #115 on: May 08, 2021, 05:13:51 PM »
Hi Rich and Juanito,

I thought I would try to install the 24DSI driver in the "do-it-yourself" RT kernel that Rich helped me build from scratch
a few days ago.

This worked ! With the DIY RT kernel, I was able to build the 24DSI driver, load the module and run some of the sample programs
to test the A-D ! Finally some good news.

So now the question is, should we go back to trying to fix up the DIY RT kernel install (still some problems --> "modinfo -d
zram" returns nothing, there's no eth0 unless we run "sudo depmod -a" followed by "udevadm trigger", and FLWM seemingly
starts on it's own), or, try to modify the pre-made RT kernel by somehow adding the symbolic link
"/lib/modules/2.6.33.3-l1-rt19/build" so that I can install the driver w/o error.

What do you guys think ?

Thanks,

David

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: TC3.8_4 Real Time Upgrade
« Reply #116 on: May 08, 2021, 07:17:06 PM »
Hi MTCAT
... So now the question is, should we go back to trying to fix up the DIY RT kernel install ...
No, move the kernel module to the working RT install. The kernel module should now match the RT kernel so you
shouldn't need the build directory anymore.

Quote
... and FLWM seemingly starts on it's own) ...
I figured out why that was happening. I unpacked the initrd for 3.8.4. Turns out, back then flwm_topside was included
in the initrd.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: TC3.8_4 Real Time Upgrade
« Reply #117 on: May 09, 2021, 05:18:32 AM »
When you say I need the kernel source, I think you are saying that I need to build the kernel from scratch ?

No, you need the kernel source tarball and the rt kernel config so that you can prepare the kernel source for an out of tree module to build against it.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: TC3.8_4 Real Time Upgrade
« Reply #118 on: May 09, 2021, 05:42:04 AM »

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 370
Re: TC3.8_4 Real Time Upgrade
« Reply #119 on: May 09, 2021, 02:17:44 PM »
Hi Rich and Juanito,

Thanks again for all the help, Rich, for the DIY RT kernel on which I built the 24DSI driver last night, "uname-r" returns  "2.6.33.3-rt19-tinycore", but on the pre-built RT kernel, "uname-r" returns "2.6.33.3-l1-rt19", modprobe will be okay with that ?

Alternatively, if I needed to compile the 24DSI driver on the pre-built RT kernel (2.6.33.3-l1-rt19) I would need to unpack the "linux-2.6.33.3-patched.tbz2" tarball, in home/linux-2.6.33.3-patched say, and then type "sudo ln -s /home/linux-2.6.33.3-patched /lib/modules/2.6.33.3-l1-rt19/build", is that right ?

But there must be more to it though as I still need to make use of the pre-built rtkernel config file somehow ??

Speaking of which, for the DIY RT kernel build that I attempted, I wonder if I used the wrong config file ?, this is the one I used, "wget http://tinycorelinux.net/3.x/release/src/kernel/config-2.6.33.3-tinycore"

I also attached a text file of the steps I did in the DIY build, read on if you have the stomach to do so !, sorry, probably no end to the mistake  there, but may explain the odd behavor of the DIY RT kernel.

Thanks,

David