WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Trying to get my head around tinycore  (Read 1665 times)

Offline bozza

  • Newbie
  • *
  • Posts: 4
Trying to get my head around tinycore
« on: May 31, 2017, 02:58:05 PM »
Firstly I would like to say what an awesome OS tinycore is. I am really impressed by the boot speed and size.

As a novice linux user I am trying to get my head around the OS.

Firstly I am using this pi zero offline. There will be no connecting to the internet.

I would like to add some kernel modules, that will be called upon by a compiled c binary or a shell script. This binary or shell file will be executed upon boot.

1.) should I create a tcz container file and load it with onboot.lst?

2.) how do I create a tcz container file that contains either a .sh file or c binary, or both?

3.) how do I copy kernel modules into the proper file directory if everyhting is stored in ram?

4.) how do I "install" a file without the internet?

Thank you all for any replies or hints at all!

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: Trying to get my head around tinycore
« Reply #1 on: June 01, 2017, 07:48:48 AM »
Hi bozza,
As a novice, you probably want to read this
http://tinycorelinux.net/book.html

If you want to load a module that is not already present in the initrd or as an extension, you may find it here
http://tinycorelinux.net/9.x/armv6/releases/RPi/src/kernel/4.9.22-piCore_modules.tar.xz
or here
http://tinycorelinux.net/9.x/armv7/releases/RPi/src/kernel/4.9.22-piCore-v7_modules.tar.xz
depending on what Pi you're using.

You could add selected modules to the initrd. How to remaster it is described here
http://wiki.tinycorelinux.net/wiki:remastering
 or, probably better and easier, create an extension, as described here
http://wiki.tinycorelinux.net/wiki:creating_extensions
For the latter case, I'd recommend to examine an existing extension, preferably a module extension (one that holds the kernel version in the file name) as a base, so you see where things have to go, and when done, load it via onboot.lst.

If the extensions are stored on persistent storage in your "tce/optinal" directory, you would install them by executing
Code: [Select]
tce-load -i extension-name
if not done via onboot.lst.

Welcome aboard.
Download a copy and keep it handy: Core book ;)

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: Trying to get my head around tinycore
« Reply #2 on: June 01, 2017, 07:56:29 AM »
By the way, on a running TC system, you can "install" extensions (making available) by just copying them into the
  /etc/sysconfig/tcedir/optional 
directory, and later "load" them (really install) with the  tce-load  command.
  /etc/sysconfig/tcedir  is a symlink which always points to the "tce-dir" currently in use, which, in case of piCore, usually corresponds to
  /mnt/mmcblk0p2/tce/optional
.
« Last Edit: June 01, 2017, 08:01:27 AM by Misalf »
Download a copy and keep it handy: Core book ;)

Offline bozza

  • Newbie
  • *
  • Posts: 4
Re: Trying to get my head around tinycore
« Reply #3 on: June 01, 2017, 10:47:37 AM »
Thank you very much for the great intro! Much appreciated!