WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

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

Offline ulfr

  • Full Member
  • ***
  • Posts: 153
building core.gz from scratch
« on: August 22, 2020, 06:31:12 PM »

    hi guys

    how do you build core.gz from scratch

   
    ulfr


Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11694
Re: building core.gz from scratch
« Reply #1 on: August 22, 2020, 07:41:54 PM »
Hi ulfr
Do really want to build  core.gz  from scratch, or do you just want to modify the contents?

Offline ulfr

  • Full Member
  • ***
  • Posts: 153
Re: building core.gz from scratch
« Reply #2 on: August 22, 2020, 07:49:57 PM »

   
    thanks for your reply

    and all your work - tinycore is the best designed distro  there is   


    no i know how to modify the contents of core.gz
 
    i would like to know how you guys build core.gz 

   
    ulfr 

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11694
Re: building core.gz from scratch
« Reply #3 on: August 22, 2020, 08:31:01 PM »
Hi ulfr
core.gz  can be created by combining  rootfs.gz  and  modules.gz  like this:
Code: [Select]
cat rootfs.gz modules.gz > core.gzYou are probably aware that  rootfs.gz  and  modules.gz  can be found under  release/distribution_files/  for each architecture:
http://tinycorelinux.net/11.x/x86/release/distribution_files/

modules.gz  is created by the  sorter.sh  script available from  Github:
https://github.com/tinycorelinux/sorter

After running  make modules  and  make modules_install  you use  sorter.sh  to create  modules.sh  and all the kernel module
extensions. You can find the instructions included in these kernel compile instructions:
http://forum.tinycorelinux.net/index.php/topic,23272.msg147325.html#msg147325

There may be a script to create  rootfs.gz  or they might just  unpack/repack  the existing  rootfs.gz.  I don't know, but I don't
think it changes very often. You can create a root directory manually in some work directory, or you can modify an existing one.

To unpack:
Code: [Select]
mkdir tempdir
cd tempdir
zcat /path/to/existing/rootfs.gz | sudo cpio -i

To repack:
Code: [Select]
sudo find . | sudo cpio -o -H newc | gzip > /path/to/new/rootfs.gz
Found here:
http://forum.tinycorelinux.net/index.php/topic,22398.msg140327.html#msg140327

« Last Edit: August 22, 2020, 08:33:23 PM by Rich »

Offline ulfr

  • Full Member
  • ***
  • Posts: 153
Re: building core.gz from scratch
« Reply #4 on: August 22, 2020, 08:42:03 PM »


      thank you very much

      i was not aware of where things were or how they were built

      i will check things out   

      fascinating stuff 

      the more one learns about tinycore the more amazed and impressed one is   


      ulfr 

Offline ulfr

  • Full Member
  • ***
  • Posts: 153
Re: building core.gz from scratch
« Reply #5 on: August 22, 2020, 10:05:35 PM »

     i would like to now how rootfsgz is built

     because it contains busybox it must have to be updated regularly 

     that would be one of the final pieces


     ulfr 

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11694
Re: building core.gz from scratch
« Reply #6 on: August 22, 2020, 11:10:31 PM »
Hi ulfr
As I said, I don't know the details of how  rootfs.gz  is built. There is a  busybox  build script located here:
http://tinycorelinux.net/11.x/x86/release/src/busybox/

It does appear to do some kind of install, though I can't tell if it also creates all of the symlinks in  /bin  and  /sbin.

Offline ulfr

  • Full Member
  • ***
  • Posts: 153
Re: building core.gz from scratch
« Reply #7 on: August 22, 2020, 11:22:26 PM »

    than you so much rich 

    you have been a great help   

    i will look at your link

   
    ulfr 

Offline ulfr

  • Full Member
  • ***
  • Posts: 153
Re: building core.gz from scratch
« Reply #8 on: August 22, 2020, 11:47:20 PM »

    hi rich 

    i note that there is a script called compile tc11  x86 
   
    in     /releases/src/toolchain/   

    which appears to be the script that compiles core.gz 

    (if you want to) take a look  and tell me what you think   

 
    ulfr


   

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11694
Re: building core.gz from scratch
« Reply #9 on: August 23, 2020, 01:09:13 AM »
Hi ulfr
I think that script just compiles all of the source packages in that directory.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14847
Re: building core.gz from scratch
« Reply #10 on: August 23, 2020, 01:10:49 AM »
It does appear to do some kind of install, though I can't tell if it also creates all of the symlinks in  /bin  and  /sbin.

Yes, busybox install creates all of the symlinks.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14847
Re: building core.gz from scratch
« Reply #11 on: August 23, 2020, 01:13:02 AM »
I think that script just compiles all of the source packages in that directory.

It's basically the build notes for the new toolchain, which is then copied into rootfs.gz

Offline ulfr

  • Full Member
  • ***
  • Posts: 153
Re: building core.gz from scratch
« Reply #12 on: August 23, 2020, 01:14:22 AM »
    it has a lot of make install 

    wouldn't that put the completed binary in the proper directory after it was compiled


    ulfr 

Offline ulfr

  • Full Member
  • ***
  • Posts: 153
Re: building core.gz from scratch
« Reply #13 on: August 23, 2020, 01:30:37 AM »

   so what is the sequence of the scripts 

   ulfr 

   

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14847
Re: building core.gz from scratch
« Reply #14 on: August 23, 2020, 02:24:01 AM »
It's not a script, it is just build notes - you start at the beginning and work your way to the end  ;)