WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: compile_tc<something> question  (Read 501 times)

Offline nonrepeatedmeme

  • WikiUser
  • *
  • Posts: 4
compile_tc<something> question
« on: May 15, 2017, 12:11:48 PM »
Although I've been an embedded linux developer for a couple of decades, I'm pure noob when it comes to tiny core, so I apologize if this is a noob question. I've read through a bunch of documentation and have poured over the available sources, but I'm still lacking illumination, so I thought I would ask.

It's not clear to me how one builds a particular version of tiny core linux from sources. I've found (and read) the build scripts for the various versions of TCL, but there always appears to be an issue that just doesn't seem to be resolvable. I'll pick on the 7.x release because it's the one I have on my desktop right now.

TCL 7.x appears to have been released with three minor numbers, 7.0, 7.1, and 7.2. When I look at the "release", I only see 7.2 iso files. When I look at the sources, I see a bunch of tarballs, patches for those particular tarballs, etc. However, I notice that I see only one version of each of the tarballs, patches, etc. Since 7.1 updates to a new version of busybox, 1.24.2, I would expect to see busybox 1.24.2 and a prior version (for TCL 7.0). I don't. Actually, I see busybox 1.24.1. The "archive" directory does provide iso files for 7.0, 7.1, and 7.2, but no sources for each release. Only the "release" directory provides sources...and they don't seem to correspond to any particular release of 7.x.

When I look at the compile_tc7_x86 script, I see that it calls for kernel 4.2.1. TCL 7.0 indicates it uses kernel 4.2.9. Oddly, the "kernel" sources directory has both 4.2.7 and 4.2.9 and no build script for the kernel. The only kernel build seems to be the compile_tc7_x86 script from in the "toolchain" directory which, as mentioned, uses the 4.2.1 kernel present in that directory.

The fundamental question I'm trying to get answered is: How does one reproduce the output of a particular version of Tiny Core Linux from source?

I keep reading answers on the forum that say the answer to my question is to just run the compile_x script, but when I read the scripts for various builds it's pretty clear that what's being build doesn't correspond with the binary releases. So, what's the magic?

If I've just missed the post/reference that covers this, a pointer would be appreciated.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 9587
Re: compile_tc<something> question
« Reply #1 on: May 15, 2017, 11:39:47 PM »
There is no automatic way to build everything I'm afraid, like buildroot or the like have. It's per-component.

Busybox 1.24.2 sources missing must be an oversight. The kernel discrepancy you see is that the toolchain used 4.2.1 headers, and as the final kernel was built later, a later patch version was used.
The only barriers that can stop you are the ones you create yourself.

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 9543
Re: compile_tc<something> question
« Reply #2 on: May 16, 2017, 03:17:49 AM »
busybox source added

Offline nonrepeatedmeme

  • WikiUser
  • *
  • Posts: 4
Re: compile_tc<something> question
« Reply #3 on: May 16, 2017, 04:47:03 AM »
Good to know I'm not missing something then.

I guess my only other question, in that case, is: is there a good way to determine package version and patch level for each of the packages included in a release?

I mean, obviously I can boot a release iso and ask each package for its version, but it's not clear that that would provide patch level. I guess another way to put it is how would I determine if a patch that was included in the release (binary)  build is missing from the sources?

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 9543
Re: compile_tc<something> question
« Reply #4 on: May 16, 2017, 05:14:16 AM »
we try our best to mention the patches used in the build instructions/script and include them in the src folders.

For example, there are four patch files in http://tinycorelinux.net/7.x/x86_64/release/src/toolchain/

Offline nonrepeatedmeme

  • WikiUser
  • *
  • Posts: 4
Re: compile_tc<something> question
« Reply #5 on: May 16, 2017, 07:03:28 AM »
Gotcha! Makes things a bit more complicated for me, but nothing I can't deal with.

Thanks for the answers!

Offline nonrepeatedmeme

  • WikiUser
  • *
  • Posts: 4
Re: compile_tc<something> question
« Reply #6 on: May 18, 2017, 11:13:20 AM »
I thought I was done with this, but...

I have an ancient platform to support. When I boot the latest TC2, 2.11.6, my platform comes up and almost everything works. The things that don't work, I know why they don't work and have a kernel patch that I can port to the 2.6 kernel included in the TC2 sources to fix the issues. So I thought I would just rebuild the latest TC2 release .iso to prove that I've got the right sources and software versions, then apply my patch to the kernel, build a modified .iso and verify that the failures on my platform disappear. That's why I was asking about version information, documentation, etc. I can't help but notice that the 2.x directory tree is rather chaotic with source archives peppered haphazardly at different levels. Not a big issue, I thought, because I can just take a look at the build script to at least find out which packages are required. However, 2.x doesn't seem to have a build script.

Is the lack of a build script an oversight or was there a different method for building back then?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 9587
Re: compile_tc<something> question
« Reply #7 on: May 19, 2017, 01:16:46 AM »
It was probably done manually back then, without a build script. However, you don't have to use the old versions of gcc and glibc - their libs are backwards compatible, it's perfectly safe to build newer versions of both and run old software on them.
The only barriers that can stop you are the ones you create yourself.