WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Building from scratch  (Read 9130 times)

Offline ackack

  • Newbie
  • *
  • Posts: 3
Building from scratch
« on: May 16, 2016, 09:09:08 AM »

Perhaps an odd question for the seasoned *core users...

But how is the core image built from scratch?

is it simply a case of putting the appropriate scripts in place, copying in busybox and they following the usual remaster guide through ?



Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Building from scratch
« Reply #1 on: May 16, 2016, 09:55:14 AM »
Are you speaking of rootfs.gz, modules.gz or vmlinuz or some combination thereof?

Offline ackack

  • Newbie
  • *
  • Posts: 3
Re: Building from scratch
« Reply #2 on: May 17, 2016, 02:15:46 AM »
specifically core.gz
...I've not come across "rootfs.gz" before now though

Obviously there are the scripts that set the live system up on boot and most of the binary's are provided by busybox. For the kernel you can compile from scratch yourself if needed.
But there are things like say ldconfig and a few other binary's that aren't provided by/linked to busybox inside the main system image.

Is it the case that these binary's are being extracted from packages from other distro's or are these too being compiled in a similar way to "linux from scratch" ?


Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: Building from scratch
« Reply #3 on: May 17, 2016, 02:45:07 AM »
core.gz = rootfs.gz + modules.gz
corepure64.gz = rootfs64.gz + modules64.gz

..and you can also run core64 using rootfs.gz + modules64.gz

The base libs are compiled in a way similar to lfs - see:

http://tinycorelinux.net/7.x/x86/release/src/toolchain/compile_tc7_x86

If I remember correctly ldconfig came from uClibc since it is much smaller than the glibc version
« Last Edit: May 17, 2016, 02:46:44 AM by Juanito »

Offline ackack

  • Newbie
  • *
  • Posts: 3
Re: Building from scratch
« Reply #4 on: May 17, 2016, 04:55:00 AM »
Quote
core.gz = rootfs.gz + modules.gz
corepure64.gz = rootfs64.gz + modules64.gz

ah, I didn't know this! It just re-iterates how much of a noob I am with core :P


And that script was exactly what I was looking for too! Thanks very much :)

I was looking to use core as a tool for network diags but people were apprehensive about it because the sources couldn't be properly verified. With the script I'll be able to reproduce the image from scratch proving the sources of the tools in use inside the image. Great stuff!