WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: building core.gz from scratch  (Read 16947 times)

Offline ulfr

  • Full Member
  • ***
  • Posts: 153
Re: building core.gz from scratch
« Reply #15 on: August 23, 2020, 02:55:10 AM »


    thank you very much guys for all your time 

    you have set me on the path 

    i now have a good general idea of where to look and how things are done

    i'll poke around and see if i can learn a little more 

    and thanks for making such a great distro 

    its my favorite


    ulfr   



Offline linic

  • Newbie
  • *
  • Posts: 32
Re: building core.gz from scratch
« Reply #16 on: April 24, 2025, 10:58:23 AM »
It's not a script, it is just build notes - you start at the beginning and work your way to the end  ;)

Hi Juanito, in summary, there is no build script for rootfs.gz even for the current latest TC 16 x86. Is that right?
For example, if one wants to rebuild rootfs.gz, let's say to change
Code: [Select]
--enable-kernel=6.1.2 to
Code: [Select]
--enable-kernel=4.4.302, one would have to
  • read the http://tinycorelinux.net/16.x/x86/release/src/toolchain/compile_tc16_x86
  • infer the commands to run
  • manually run them until reaching the end of the build notes (fixing the errors if some show up or filling the gaps if there are any)
  • probably running an additional repacking to generate the rootfs.gz command because the build notes end with "[remove files to match base/extension setup]"
Would that be it?

Also, thank you Juanito everyone for tinycore! It's fascinating!

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 15144
Re: building core.gz from scratch
« Reply #17 on: April 24, 2025, 11:21:21 AM »
probably running an additional repacking to generate the rootfs.gz command because the build notes end with "remove files to match base/extension setup"

Not exactly, the "remove files to match base/extension setup" refers to the chroot environment.

To update rootfs.gz, you need to overwrite the existing files with the newly built files (after first stripping them) like this:
Code: [Select]
mkdir /tmp/extract
cd /tmp/extract
zcat /tmp/rootfs.gz | sudo cpio -i -H newc -d
rm /tmp/rootfs.gz

[overwrite/update existing files]

cd /tmp/extract
find | sudo cpio -o -H newc | gzip -2 > ../rootfs.gz
cd /tmp
advdef -z4 rootfs.gz

Quote
Would that be it?

Yes  :)

Offline linic

  • Newbie
  • *
  • Posts: 32
Re: building core.gz from scratch
« Reply #18 on: May 10, 2025, 11:13:52 AM »
Hi Juanito,

I'm interested to obtain copies of
Code: [Select]
binutils_usr.tce.list
gcc_usr_remove.tce.list
gcc_local_remove.tce.list

They are referenced in http://tinycorelinux.net/16.x/x86/release/src/toolchain/compile_tc16_x86. Are they hosted anywhere? Are there any other .tce.list files which were used in making TC16 x86? I am interested in those too.

Also, thank you for your last reply!

Oh, and the compile_tc16_x86 notes are great! I was able to compile roughly 1/3 of the required sources so far. I'm automating the steps in a couple of .sh scripts. I plan to release those scripts once I have a working result.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 15144
Re: building core.gz from scratch
« Reply #19 on: May 10, 2025, 11:20:13 AM »
binutils_usr.tce.list is created by:
Code: [Select]
touch mymarker
sudo make install
sudo find / -not -type 'd' -cnewer mymarker | grep -v "\/proc\/" | grep -v "^\/sys\/" | tee files
vi files (remove any obviously unneeded files)
mv files binutils_usr.tce.list

The other two were made by a similar process and then editing to leave only the files I wanted to remove.

Sorry, but I didn't keep the lists  :(

Offline linic

  • Newbie
  • *
  • Posts: 32
Re: building core.gz from scratch
« Reply #20 on: May 10, 2025, 01:37:54 PM »
No worries  :)

Thanks for your answer! Very interesting!