Tiny Core Linux
General TC => Programming & Scripting - Unofficial => Topic started by: Arslan S. on March 30, 2011, 04:08:11 PM
-
i have setup a git repository at gitorious to host build scripts
https://gitorious.org/tinyrt (https://gitorious.org/tinyrt)
to download:
git clone git://gitorious.org/tinyrt/linux.git
or
click linux-->source tree and download master as tar.gz
just run ./build.sh
everything from downloading to packing is automated
pre-built rt kernel and modules images posted in contrib repository
http://distro.ibiblio.org/tinycorelinux/4.x/x86/contrib/rt-kernel/ (http://distro.ibiblio.org/tinycorelinux/4.x/x86/contrib/rt-kernel/)
you can use this script to remaster latest tiny core linux images
https://gitorious.org/tinyrt/linux/blobs/master/extra/remaster-core.sh (https://gitorious.org/tinyrt/linux/blobs/master/extra/remaster-core.sh)
build concepts:
- latest stable linux kernel + tiny core linux patches + PREEMPT_RT patch
- tiny core linux kernel configure + the principle of disabling latency killer options as much as possible
- power management and cpu freq scaling is totally disabled, but your power buttons should work :)
read more about rt linux
https://rt.wiki.kernel.org/index.php/Main_Page (https://rt.wiki.kernel.org/index.php/Main_Page)
-
first product of the project is hosted in kernel contrib repository and
a script is attached to first post to remaster latest tinycore/microcore images, it is useful because grub does not support multiple initrds, there is a way chainloading a bootloader supporting multiple initrds though
-
Grub is ok with merely cat'ed initrds though. cat tinycore.gz rt-modules.cpio.gz > tinycorert.gz
Less space efficient than repacking, but easier to do.
-
unfortunately grub does not support multiple initrds so use the script attached to this post to remaster latest tinycore/microcore images
Oh? Rather surprising...
I simply tried to load 2 initrd's with linld which is ~5Kb and next to zero documented, and "it just works" ;D
-
Grub is ok with merely cat'ed initrds though. cat tinycore.gz rt-modules.cpio.gz > tinycorert.gz
Less space efficient than repacking, but easier to do.
i tried cat'ing tinycore.gz with rt-modules.gz before but when i extract the output file i can not find the modules
-
i tried cat'ing tinycore.gz with rt-modules.gz before but when i extract the output file i can not find the modules
The gunzip/cpio tools can't handle that, the kernel can. That's why it's not so good format when you won't have the original files anymore.
-
unfortunately grub does not support multiple initrds so use the script attached to this post to remaster latest tinycore/microcore images
Oh? Rather surprising...
I simply tried to load 2 initrd's with linld which is ~5Kb and next to zero documented, and "it just works" ;D
how?
-
initrd=tinycore.gz,initram2.gz
-
version bump to 3.0
kernel is 3.0.32-x1-rt52 please see the first post
-
want to try to compile nvidia but no kernel headers for this rt kernel in the repo.
-
Just use the full kernel source.
-
or use this tool to build your module
http://code.google.com/p/tc-ext-tools/source/detail?r=858 (http://code.google.com/p/tc-ext-tools/source/detail?r=858)
it is not tested for rt-kernel though
-
@Arslan S.
I've compiled all from scratch, using the script here and use tce-ext-tools revision 824, and the result is libGL.so* missing.
but I will try to use tce-ext-tools that revision 858. Thank you. ;D
-
you should install Xorg-7.5 or Xorg-7.6 for libGL
also use the latest revision r858 is buggy
-
hi arslan,
looks like a sweet project. unfortunately, i get many 404 not founds during the dl process. are you still maintaining this?
best,
webb
-
yes i still maintain it but not frequently i have completed two major updates so far one for tc 3.x and one for tc 4.x
tiny core linux team is kind to host custom kernels in contrib area you don't need to build it yourself unless you have a specific reason
http://distro.ibiblio.org/tinycorelinux/4.x/x86/contrib/rt-kernel/ (http://distro.ibiblio.org/tinycorelinux/4.x/x86/contrib/rt-kernel/)
anyways i will check it out when i have time thanks for reporting
-
i have updated tinyrt now builds fine
-
> i have updated
exciting! downloading now...
-webb
-
hi arslan,
works great, thanks! i modified sorter.sh to include the two additional modules that i need (wl-rtl8192ce_se_de and virtualbox-ose-modules) and am now rebuilding.
what do you think about letting sorter.sh use /tmp/tcloop/*$KERNEL* instead explicitly naming modules?
also, do you have any suggestions for compiling a pae or 64bit tinyrt (for >4gb ram)? so far this hasn't worked well because pae requires at least a 586 kernel, and the tc modules expect a 486 kernel. ideally i would want a core2 64bit tinyrt, but gcc.tcz appears to have 64-bit mode not compiled in. thus far, when i try to recompile gcc within 32-bit tc i haven't been able to get 64-bit mode compiled in, and i can't get gcc to compile at all from within 3.0.3-tinycore64 (3.0.21-tinycore64 won't boot on my machine). so 2nd prize would be 32bit with pae, either for core2 or 586, whichever is likely to be easier.
many thanks,
webb
-
Hi webb
Maybe toolchain64.tcz will meet your needs?
-
tried that. maybe i'm using it wrong?
thinki toolchain64-shell
thinki gcc -m64 jsmin.c
jsmin.c:1:0: sorry, unimplemented: 64-bit mode not compiled in
-
Hi webb
jsmin.c:1:0: sorry, unimplemented: 64-bit mode not compiled in
Maybe you have the 32 bit version of gcc installed too, and it's finding that?
Assuming /usr/local/x64/bin/ is in your path, maybe:
x86_64-unknown-linux-gnu-gcc -m64 jsmin.c
-
toolchain64 is not a native compiler you should compile like you are cross compiling
and you need a different kernel configuration for compiling 64 bit kernel also you should see that tiny core repository is x86 only
-
...also you should see that tiny core repository is x86 only
except for the *-tinycore64 extensions which work with core64 and in a pure 64-bit environment ;)
-
hi rich, juanito, & arslan,
tinyrt for core2 with pae built fine and is working well, and at last i have my full 8gb finally :) i had to make wl-rtl8192ce_se_de-3.0.32-x1-rt52.tcz manually, but other than that, arslan's build.sh worked perfectly, and after booting the system did feel more responsive. next: virtualbox-ose-modules.
as for 64-bit, i have never used a cross-compiler before and didn't realize that loading toolchain64 wasn't sufficient. any suggestions on how to make make use it? this appears to do nothing:
toolchain64-shell
ARCH=x86_64
CROSS_COMPILE=x86_64-unknown-linux-gnu-
make $ARCH $CROSS_COMPILE [x]
many thanks,
webb
-
Hi webb
this appears to do nothing:
Not even any error messages?
-
when compiling kernel modules it is sufficient to set ARCH=x86_64 and CROSS_
COMPILE=x86_64-unknown-linux-
but for others you should also set LDFLAGS see toolchain64's info for details
-
as arslan points out, this does work for cross-compiling the kernel :)
ARCH=x86_64 and CROSS_
COMPILE=x86_64-unknown-linux-
it only didn't work for a test cross-compile of a small non-kernel source file.
my apologies for crying wolf.
ps:
actually, i used:
COMPILE=x86_64-unknown-linux-gnu-
and compiling is going ok so far. is there any reason not to use the gnu-?
pps:
these forms seem to work for non-kernel cross-compilation:
./configure --host=x86_64-unknown-linux-gnu (instead of ./configure)
/usr/local/x64/bin/x86_64-unknown-linux-gnu-gcc [x.c] (instead of gcc [x.c])
many thanks,
webb
-
..or you could compile natively using corepure64 8)
-
> ..or you could compile natively using corepure64
that does sound nice, but so far neither 3.0.21-tinycore64 nor 3.0.32-tinyrt64 will boot on my thinkpad t510. i'll check out 3.0.3-tinycore64 again (which boots) and see how that compares to 3.0.32-tinyrt32-pae performance-wise. hmm. i'm wondering now why i didn't just use 3.0.3-tinycore64 in the first place...
-webb
-
interestingly, if i build a 64-bit 3.0.21 kernel with tinycore patches and config-3.0.21-tinycore64, but set the version string to 3.0.21-w64, it does boot. if i compile with the same .config and patches but with version string 3.0.21-tinycore64, then i cannot boot, just as with official tinycore vmlinuz64. ("fixing recursive fault" error)
-webb
-
Hi webb
Another forum member solved his "fixing recursive fault" error using the maxcpus=0 boot code.
-
yes but i like all of my four cores!
here's a hypothesis about this whole recursive fault business:
3.0.21-tinycore64
^^^^^^^^^^^^^^^^^ <-- 17 character version string, doesn't boot
3.0.3-tinycore64
^^^^^^^^^^^^^^^^ <-- 16 character version string, boots
3.0.21-w64
^^^^^^^^^^ <-- 10 character version string, compiled with config-3.0.21-tinycore64 but with version string changed. boots.
perhaps the kernel expects a maximum of 16 bytes in the version string.
-webb
-
yes but i like all of my four cores!
here's a hypothesis about this whole recursive fault business:
3.0.21-tinycore64
^^^^^^^^^^^^^^^^^ <-- 17 character version string, doesn't boot
3.0.3-tinycore64
^^^^^^^^^^^^^^^^ <-- 16 character version string, boots
3.0.21-w64
^^^^^^^^^^ <-- 10 character version string, compiled with config-3.0.21-tinycore64 but with version string changed. boots.
perhaps the kernel expects a maximum of 16 bytes in the version string.
-webb
Seems coincidental. The version string doesn't change just by adding maxcpus=0, but doing so lets my system boot.
Idle thought I haven't had a chance to test and/or research yet - Setting maxcpus=0 actually does two things - uses only 1 cpu, AND disables IO APIC. Maybe there's another option that can disable APIC whilst still keeping all of your CPUs, and maybe that will be enough to get around the recursive fault erro
-
Hi webb
yes but i like all of my four cores!
That may be, but one core that boots runs better than four that don't.
perhaps the kernel expects a maximum of 16 bytes in the version string.
Perhaps. Or maybe the longer string just pushes some data in the kernel into a position that causes a
seg fault.
-
Hi althalus
If you go to http://www.mjmwired.net/kernel/Documentation/kernel-parameters.txt you can use your browser
to search for instances of IOAPIC for other possible options.
-
althalus wrote:
> Seems coincidental
unlikely. i compiled my own 3.0.21-tinycore64 and 3.0.21-w64 kernels, one after the other, and using the same config-3.0.21-tinycore64 kernel configuration, varying only the version string. the kernel with the 17 character version string won't boot, 16 or fewer will. i'll also try 3.0.21-tinycor64 and 3.0.21-tinycore64b, and also with a newer kernel version (e.g., 3.0.52) to see if this is a kernel bug that has been fixed.
rich wrote:
> maybe the longer string just pushes some data in the kernel into a position that causes a seg fault
sounds plausible.
-webb
-
Hello,
I'm absolutly newbie but want to learn...
I've setup a basic i386 install for a squeezelite setup.
I want RT Kernel.
when I type "git clone git://gitorious.org/tinyrt/linux.git
I get the following message "-sh: git: not found" !
What am I missing ?
Thank you
Jean
-
Hi bricolodu13
You can find the RT kernel here:
http://tinycorelinux.net/4.x/x86/contrib/rt-kernel/
Or you can go to:
https://gitorious.org/tinyrt
and as it says in the first post:
click linux-->source tree and download master as tar.gz
just run ./build.sh
-
Thank you Rich,
I have downloaded the tinyrt-linux-master.tar.gz file and have copied it through ssh (WinSCP) to the TC directory.
I have also made the build.sh and two other .sh files with vi to the same directory.
I have made them usable with chmod a+x
but still, when I do ./build.sh, I got the following message :
./build-kernel.sh: .: line 15: functions.sh: not found
./build-initrd.sh: .: line 15: functions.sh: not found
Sorry to be so stupid ! :'(
Best regards,
Jean
-
Blind guess, perhaps you would use a non compatible filesystem?
-
where to find the new http://distro.ibiblio.org/tinycorelinux/4.x/x86/contrib/rt-kernel/
best wishes!
-
Hi bobowsh
Welcome to the forum.
This is the real time kernel:
http://distro.ibiblio.org/tinycorelinux/4.x/x86/contrib/rt-kernel/vmlinuz.rt
You will also need the matching kernel modules:
http://distro.ibiblio.org/tinycorelinux/4.x/x86/contrib/rt-kernel/rt_modules.gz
Just a heads up, 4.x is scheduled to be removed from our server at the end
of the year.
-
Thanks Rich
Is there a newer version, as 15.x ?
I try to build a new rt-kernel, unfortunly faild
so i want to find this build scripts, do you have this tinyrt build scripts:
have setup a git repository at gitorious to host build scripts
https://gitorious.org/tinyrt
you can use this script to remaster latest tiny core linux images
https://gitorious.org/tinyrt/linux/blobs/master/extra/remaster-core.sh
-
Hi bobowsh
To the best of my knowledge, 4.x was the last rt-kernel we hosted.
I don't have any of the tinyrt build scripts.
I did a quick Google search for:
PREEMPT_RT patch linux
and there don't appear to be a patch for 6.1.2 or 6.6.8 which were
the two most recent kernels we released (TC14 and TC15).
For what it's worth, it looks like rt might become part of the 6.12 kernel:
https://arstechnica.com/gadgets/2024/09/real-time-linux-is-officially-part-of-the-kernel-after-decades-of-debate/
-
For what it's worth, it looks like rt might become part of the 6.12 kernel:
https://arstechnica.com/gadgets/2024/09/real-time-linux-is-officially-part-of-the-kernel-after-decades-of-debate/
see also
https://old.reddit.com/r/debian/comments/162tx4s/realtime_rt_kernel_for_debian_performs_much_worse/
&
AV-Linux - Realtime Kernel ... @ https://linuxmusicians.com/viewtopic.php?t=24657
...
https://wiki.linuxaudio.org/wiki/system_configuration#do_i_really_need_a_real-time_kernel
-
wrt the above links
this topic might be relevant to just get something 'low latency' working
how to boot alternate kernel of same architecture ~ https://forum.tinycorelinux.net/index.php/topic,26071.0.html
... unless configuring/building/testing and comparing! various 'low latency' newer kernel/configs is near the top of your todo list ?
-
I try to build patch-6.6.10-rt19.patch.gz to get a rt-kernel
unfortuntly, use cyclictest to test, it does'nt get much realtime ability
tc@tinycore:~$ sudo cyclictest -p 99 -m -i 5000 -n -h 10 -l 100000 -t 4 -c 1
# /dev/cpu_dma_latency set to 0us
policy: fifo: loadavg: 1.31 1.32 1.33 1/331 4861
T: 0 ( 4857) P:99 I:5000 C: 983 Min: 33 Act: 400 Avg: 1775 Max: 51139
T: 1 ( 4858) P:99 I:5000 C: 916 Min: 107 Act: 1247 Avg: 2255 Max: 34100
T: 2 ( 4859) P:99 I:5000 C: 1079 Min: 44 Act: 556 Avg: 1451 Max: 38012
T: 3 ( 4860) P:99 I:5000 C: 950 Min: 33 Act: 1468 Avg: 1949 Max: 1805522
Hi bobowsh
To the best of my knowledge, 4.x was the last rt-kernel we hosted.
I don't have any of the tinyrt build scripts.
I did a quick Google search for:
PREEMPT_RT patch linux
and there don't appear to be a patch for 6.1.2 or 6.6.8 which were
the two most recent kernels we released (TC14 and TC15).
For what it's worth, it looks like rt might become part of the 6.12 kernel:
https://arstechnica.com/gadgets/2024/09/real-time-linux-is-officially-part-of-the-kernel-after-decades-of-debate/