WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

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

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14823
Re: TC3.8_4 Real Time Upgrade
« Reply #120 on: May 10, 2021, 03:42:52 AM »
I assume that you need to download linux-2.6.33.3-patched.tbz2, patch-2.6.33.3-rt19.bz2 and config-2.6.33.3-l1-rt19.

Uncompress linux-2.6.33.3-patched.tbz2 and patch-2.6.33.3-rt19.bz2 and apply the patch.

Load compiletc, perl5, bash and ncurses-dev

Then prepare the kernel:
Code: [Select]
$ cd linux-2.6.33.3
$ make mrproper
$ cp ../config-2.6.33.3-l1-rt19 .config
$ make oldconfig
$ make modules

If you can find Module.symvers there is a quicker way to do this.

Finally make the build symlink and then you should be able to compile your module

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 370
Re: TC3.8_4 Real Time Upgrade
« Reply #121 on: May 10, 2021, 08:43:03 PM »
Hi Juanito,

Thanks for the extra detail, much appreciated. After the "make modules" command, do I need to set the module install path, or do anything else ?, or would it just be

make modules
sudo ln -s /home/linux-2.6.33.3-patched /lib/modules/2.6.33.3-l1-rt19/build"

Regarding Module.symvers, there is a file so named in /usr/src/linux-headers-2.6.33.3-tinycore on the pre-built RT kernel pen drive, this is from the original non RT install I think (see step 2 in list attached previously), is that the right file ?, if so, can you show me the quicker way to do it as well ?

I will also try Rich's suggestion re: loading the 24dsi.ko built on my DIY RT kernel, but it seems like it's always good to have multiple possible ways to solve a problem, just in case one (or more) ways don't work !

Thanks so much,

David

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11641
Re: TC3.8_4 Real Time Upgrade
« Reply #122 on: May 10, 2021, 10:30:13 PM »
Hi MTCAT
... Regarding Module.symvers, there is a file so named in /usr/src/linux-headers-2.6.33.3-tinycore on the pre-built RT kernel pen drive, this is from the original non RT install I think ...
I think you would want one created when your kernel was created. Maybe it was included in the initrd? Check here:
Code: [Select]
ls -l /lib/modules/2.6.33.3-l1-rt19
Quote
... I will also try Rich's suggestion re: loading the 24dsi.ko built on my DIY RT kernel ...
The version strings don't match so the kernel may reject it. Your kernel is  2.6.33.3-l1-rt19  but your module is something
like  2.6.33.3-rt19-tinycore.

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 370
Re: TC3.8_4 Real Time Upgrade
« Reply #123 on: May 11, 2021, 09:49:25 PM »
Hi Juanito and Rich,

I did as you instructed in reply 120 Juanito, it took about 1.5 hrs to run "make -j2 modules" !, after it was done, I typed "sudo ln -s /home/linux-2.6.33.3 /lib/modules/2.6.33.3-l1-rt19/build".

Now, when I "cd /lib/modules/2.6.33.3-l1-rt19/modules" and type "ls -l" I can see ,

lrwxrwxrwx  1  1  root root  20 May 12  01:37  build --->  /home/linux-2.6.33.3

So that's exciting, does that sound right ?

In /usr/src I see a "linux" directory, after typing "cd linux", I see /usr/local/src/linux-headers-2.6.33.3-tinycore as the directory, in which I see a "Modules.symvers" in there, does this "Modules.symvers" need to be replaced with the output of "make -j2 modules" ?

Thanks,

David

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 370
Re: TC3.8_4 Real Time Upgrade
« Reply #124 on: May 11, 2021, 10:13:21 PM »
Hi guys,

Sorry for the typo in the last post,

"Now, when I "cd /lib/modules/2.6.33.3-l1-rt19/modules" and type "ls -l" I can see , "

Should be

"Now, when I "cd /lib/modules/2.6.33.3-l1-rt19" and type "ls -l" I can see"

Also, I noticed that my symbolic link didn't survive a power-down-power-up cycle, after the power-up, I had to re-do the "sudo ln -s ...." command to get the build directory back.

Thanks,

David






Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11641
Re: TC3.8_4 Real Time Upgrade
« Reply #125 on: May 11, 2021, 11:43:02 PM »
Hi MTCAT
... Also, I noticed that my symbolic link didn't survive a power-down-power-up cycle, after the power-up, ...
All files and links to files in  /bin, /dev, /etc, /lib, /root, /sbin, /tmp, /usr, /var  are in RAM and get recreated every time you boot.
The contents for those directories come from the  initrd (core.gz)  and  .tcz  extensions.

Quote
... I had to re-do the "sudo ln -s ...." command to get the build directory back.
You can add that command to your  bootlocal.sh  file.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14823
Re: TC3.8_4 Real Time Upgrade
« Reply #126 on: May 12, 2021, 04:13:42 AM »
In /usr/src I see a "linux" directory, after typing "cd linux", I see /usr/local/src/linux-headers-2.6.33.3-tinycore as the directory, in which I see a "Modules.symvers" in there, does this "Modules.symvers" need to be replaced with the output of "make -j2 modules" ?

No, the real time source has been prepared in /home/linux-2.6.33.3 and by creating the symlink:

/lib/modules/2.6.33.3-l1-rt19/modules/build --->  /home/linux-2.6.33.3

..your 24dsi.ko module will build against this.

You should copy /home/linux-2.6.33.3/Modules.symvers to a safe place, it will save you two hours if you need to prepare the kernel source again.

Offline MTCAT

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

Great !, thanks a lot, I'll try building the 24DSI module tomorrow (after making the symbolic link of course), thanks for the suggestion to add it to bootlocal.sh. I'll copy Modules.symvers onto another pen drive for safekeeping too.

Thanks,

David


Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 370
Re: TC3.8_4 Real Time Upgrade
« Reply #128 on: May 13, 2021, 01:55:30 PM »
Hi Juanito and Rich,

After making the symbolic link I tried to build the 24DSI driver and still get the same error, no build directory, even though it is there.

But, I do notice though, in /lib/modules/2.6.33.3-l1-rt19 I have

build --> /home/linux-2.6.33.3

But in /lib/modules/2.6.33.3 I have

build --> /tmp/tcloop/linux-headers-2.6.33.3-tinycore/lib/modules/2.6.33.3-tinycore/build

I think the "tcloop" refers to something that has been loaded into RAM ? My new symlink in /lib/modules/2.6.33.3-l1-rt19 is not "tclooped" so to speak, is this maybe why "sudo ./make_all" still can't find the build directory for 2.6.33.3-l1-rt19 ?

Thanks,

David

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14823
Re: TC3.8_4 Real Time Upgrade
« Reply #129 on: May 13, 2021, 02:25:36 PM »
It looks like you booted the standard kernel rather than the real time kernel?

What does “uname -a” give?
« Last Edit: May 13, 2021, 02:27:19 PM by Juanito »

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 370
Re: TC3.8_4 Real Time Upgrade
« Reply #130 on: May 13, 2021, 03:47:03 PM »
Hi Juanito,

I'm using vesamenu.c32 to select either the real-time kernel, or the regular kernel, I select the real-time kernel (which is also set to DEFAULT), once booted up, "uname -a"  returns "2.6.33.3-l1-rt19"

Thanks,

David

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 370
Re: TC3.8_4 Real Time Upgrade
« Reply #131 on: May 13, 2021, 03:59:41 PM »
Hi Juanito,

Sorry, I gave you the output of "uname -r", I powered up again and booted up the real-time and typed "uname -a" as you requested, this is what I get;

Linux box 2.6.33.3-l1-rt19 #1 SMP PREEMPT RT Mon Mar 28 22:43:50 UTC 2011 i686 i686 i386 GNU/Linux

Thanks,

David

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11641
Re: TC3.8_4 Real Time Upgrade
« Reply #132 on: May 13, 2021, 05:34:50 PM »
Hi MTCAT
After making the symbolic link I tried to build the 24DSI driver and still get the same error, no build directory, even though it is there. ...
Is that the entire error message (rhetorical)? Please provide exact error messages.

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 370
Re: TC3.8_4 Real Time Upgrade
« Reply #133 on: May 13, 2021, 06:53:12 PM »
Hi Rich,

Here's the error message;

driver=============================================================================
make: *** /lib/modules/2.6.33.3-l1-rt19/build: No such file or directory. Stop.
make: *** [24dsi.ko] Error 2
Driver loading: 24dsi...
--->ERROR<----: module file does not exist: /home/tc/24dsi.linux.4.11.91.32.0/24dsi/./driver/24dsi.ko

Also attached a screenshot, why is there a "dot" before "/driver/24dsi.ko" ?

Thanks,

David

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 370
Re: TC3.8_4 Real Time Upgrade
« Reply #134 on: May 13, 2021, 06:54:36 PM »
Sorry, forgot to attach the screen-shot, here it is.