WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: building core.gz from scratch  (Read 16680 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: 30
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: 15118
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  :)