WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: why core extensions are only tcz and not also tce?  (Read 11988 times)

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
why core extensions are only tcz and not also tce?
« on: August 01, 2009, 01:53:33 PM »
why core extensions are only tcz and not also tce?
dCore user

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: why core extensions are only tcz and not also tce?
« Reply #1 on: August 02, 2009, 01:25:14 AM »
There is no benefit to having  cores as tce, as it would be loaded into ram as TC does.
10+ Years Contributing to Linux Open Source Projects.

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: why core extensions are only tcz and not also tce?
« Reply #2 on: August 02, 2009, 05:44:33 AM »
the benefit would be that the device where the core element are stored doesn't need to remain mounted.
dCore user

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11048
Re: why core extensions are only tcz and not also tce?
« Reply #3 on: August 02, 2009, 06:35:48 AM »
Ah, but that's why the core elements can be contained in RAM, inside the initrd (put in /opt/tce) :)
The only barriers that can stop you are the ones you create yourself.

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: why core extensions are only tcz and not also tce?
« Reply #4 on: August 02, 2009, 06:47:16 AM »
how to do this?

[^thehatsrule^: removed spam]
« Last Edit: August 06, 2009, 02:25:35 AM by ^thehatsrule^ »
dCore user

Offline helander

  • Full Member
  • ***
  • Posts: 183
Re: why core extensions are only tcz and not also tce?
« Reply #5 on: August 02, 2009, 07:12:09 AM »
You need to "remaster" your microcore.gz (or tinycore.gz if you are using that).

   - gunzuip "microcore.gz"
   - unpack "microcore". using cpio, into a clean directory
   - copy all your extensions into opt/tce under the new directory
   - pack the new directory into a new "microcore" using cpio
   - gzip "microcore"
   - et voila

Maybe there should be a tool that does this, which as input takes an existing initramfs image (xxxxcore.gz) and
a directory where the extensions are located.

/Lars

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11048
Re: why core extensions are only tcz and not also tce?
« Reply #6 on: August 02, 2009, 07:13:33 AM »
They were announced here:
http://forum.tinycorelinux.net/index.php?topic=1770.0

In short, follow the wiki page "Remastering". The only thing to do between unpacking and packing would be

mkdir /tmp/extract/opt/tce
cp /path/to/my/tce/*.core.* /tmp/extract/opt/tce

edit: heh, helander beat me to it :P
The only barriers that can stop you are the ones you create yourself.

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: why core extensions are only tcz and not also tce?
« Reply #7 on: August 02, 2009, 07:59:35 AM »
in order to stay in initramfs should I boot with the embed option?

[^thehatsrule^: removed spam]
« Last Edit: August 06, 2009, 02:25:44 AM by ^thehatsrule^ »
dCore user

Offline helander

  • Full Member
  • ***
  • Posts: 183
Re: why core extensions are only tcz and not also tce?
« Reply #8 on: August 02, 2009, 08:08:42 AM »
No, you do not have to. Without embed all of initramfs is copied to the newly created tmpfs, including the stuff under
/opt/tce.

Another possibility which I have not explored yet, only read about in the syslinux manual, is if you use
any of the boot loaders in the syslinux/isolinux/extlinux family.

When you specifiy the initrd you could provide this as a comma separated list of (compressed or uncompressed) cpio archives. The resulting initramfs would then consist of the union of the contents of the listed files.
This should allow you to create one cpio with the stuff under /opt/tce and the other would be the
xxxxcore.gz originally supplied by MC/TC. This would avoid the need to merge your extensions into the
xxxxcore.gz files. In case you are using grub or any other boot loader this is not possible (to my knowledge)

/Lars

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: why core extensions are only tcz and not also tce?
« Reply #9 on: August 02, 2009, 10:32:34 AM »
booting with the embed option it's not better for memory consumption?
dCore user

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11048
Re: why core extensions are only tcz and not also tce?
« Reply #10 on: August 02, 2009, 10:36:25 AM »
booting with the embed option it's not better for memory consumption?
It is, saves about 16mb of ram during boot. But the bootcode does not affect remastering.
The only barriers that can stop you are the ones you create yourself.

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: why core extensions are only tcz and not also tce?
« Reply #11 on: August 02, 2009, 10:47:26 AM »
If I remaster judt adding the core elements why shouldn't I use the embed boot code?
dCore user

Offline helander

  • Full Member
  • ***
  • Posts: 183
Re: why core extensions are only tcz and not also tce?
« Reply #12 on: August 02, 2009, 02:33:42 PM »
If you in the first place decided to use the embed option, I do not see that remastering the described way would prevent you from continuing that. The embed option controls if the content of the initramfs should be copied to a tmpfs or if the system should be working on the original initramfs. In both cases the system will be working with a root file system having the same content (it's just stored in different ways). What the content is depends on what you have loaded into the
initramfs (an original microcore.gz, your remastered microcore.gz, union of original microcore.gz and cpio archive as I described would be possible using syslinux & friends).

/Lars

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: why core extensions are only tcz and not also tce?
« Reply #13 on: August 17, 2009, 01:09:09 AM »
There will be an option to not mount but instead load core elements into ram in next 2.3 RC.
10+ Years Contributing to Linux Open Source Projects.