WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: CorePure versus x64 - how to tell the difference?  (Read 3265 times)

Offline CentralWare

  • Administrator
  • Hero Member
  • *****
  • Posts: 1652
CorePure versus x64 - how to tell the difference?
« on: January 21, 2015, 02:21:13 AM »
I did a quick scan between 4.x x86_64 and CP64 looking for ways to tell them apart (if they were running) and I'm not coming up with anything that identifies one versus the other thus far.

The kernel identifier looks as though it's just going to say tinycore64 (followed by the kernel version) whether I download it from x86/dist or x86_64/release so that's not helping :/

I extracted the pure gz and there, too, I haven't yet been able to identify anything that says "Hey, I'm pure!" so I'm having a hard time figuring out how tce-load is getting its information as to how to navigate the repo and choose the correct directory.

What I'm trying to do is create a "universal" remastering system that is form-fitted to the repo structure starting with 4.x and up.  The goal here is to be able to detect which version/platform is running so that I can wget the proper items.

tc/release.txt tells me the running version -- this works out well to get just the version number.
uname tells me the kernel branding (tinycore-xx.xx.xx or tinycore64-xx.xx.xx) so I can split off 86/64 accordingly.
if 64 is detected, now I have to determine 86+64...  or pure.  Any suggestions?

Thanks!
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10960
Re: CorePure versus x64 - how to tell the difference?
« Reply #1 on: January 21, 2015, 02:25:30 AM »
See the getBuild function in tc-functions.
The only barriers that can stop you are the ones you create yourself.

Offline CentralWare

  • Administrator
  • Hero Member
  • *****
  • Posts: 1652
Re: CorePure versus x64 - how to tell the difference?
« Reply #2 on: January 21, 2015, 03:09:48 AM »
@curaga: Not seeing the differential.

TCL 4.x corepure64.gz/etc/init.d/tc-functions
Basically shows "If not ARM6/7, it's x86 unless ld-linux(64) is installed and then it's x86_64"
I'm guessing a few things here which may or may not be accurate.
1) The blended (86_64) core and kernel supports both platforms/extensions*
2) Pure supports only x64 (I'm assuming firmware as well?)
*) If the above script is general with 4.x and above, what prevents x86 extensions from loading under pure?  ..and if I was running 4.x pure on one machine and x86_64 on another, I'm guessing the only differential file "indicating" pure would be tce/boot/corepure64.gz?

I have not repeated the tests on 5.x and above yet in case there were any changes in tc-functions higher up.

The problem I foresee (assumptions included) is if I booted core64, which I assume defaults to the repo at 4.x/x86_64/tcz and if pure64 uses the same, "pure" is opted for x86 extensions to be loaded which I can imagine cause a bit of chaos.  It looks as though 5.x has a different directory structure and core64 itself no longer exists, so it may just be lack of research on my part between the two versions.

Thanks for being so congenial with otherwise dumb questions such as this! :)
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14535
Re: CorePure versus x64 - how to tell the difference?
« Reply #3 on: January 21, 2015, 03:25:39 AM »
core can use either a 32-bit or 64-bit kernel, but only 32-bit extensions. You can use the loader (ld-linux*) name to differentiate it from corepure and $KERNEL to differentiate between kernels

corepure uses a 64-bit kernel and only 64-bit extensions. You can use the loader name to differentiate it from core.

core (32-bit kernel): rootfs.gz + modules.gz + vmlinuz (core.gz = rootfs.gz + modules.gz)
core (64-bit kernel): rootfs.gz + modules64.gz + vmlinuz64
corepure64: rootfs64.gz + modules64.gz + vmlinuz64 (corepure.gz = rootfs64.gz + modules64.gz)
« Last Edit: January 21, 2015, 03:35:11 AM by Juanito »

Offline CentralWare

  • Administrator
  • Hero Member
  • *****
  • Posts: 1652
Re: CorePure versus x64 - how to tell the difference?
« Reply #4 on: January 21, 2015, 03:48:01 AM »
@juanito: Thank you!  You've solved my mystery (or better worded, my lack of understanding.)
You noted the core64+kernel64 is only intended for 32 bit extensions.  Is this the repo design/structure or is core64 simply unable to run 64 bit extensions?

core(32) + kernel(32) = extension(32) only
pure(64) + kern/mod(64) = extension(64) only
Can core(64) + kernel(64) "handle" 64 bit extensions?  (I'd imagine I'd have to finagle things to bring them in as opposed to using tc-load, I'm just curious.)

Thanks again and take care!
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14535
Re: CorePure versus x64 - how to tell the difference?
« Reply #5 on: January 21, 2015, 04:16:55 AM »
core64 (rootfs.gz + modules64.gz + vmlinuz64) is unable to run 64-bit extensions

Offline CentralWare

  • Administrator
  • Hero Member
  • *****
  • Posts: 1652
Re: CorePure versus x64 - how to tell the difference?
« Reply #6 on: January 21, 2015, 08:53:43 AM »
Please forgive...  complete mental dyslexia when asking my question.

What I meant to ask was 64->32 bit, not the other way around.
ie: Can core64/pure64 run 32-bit

Yes, I know core.gz cannot run 64 bit apps...  I have no idea...  may be due to the early AM post, not enough coffee, etc.

Thank you for your efforts!
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14535
Re: CorePure versus x64 - how to tell the difference?
« Reply #7 on: January 21, 2015, 09:00:01 AM »
No, corepure64 cannot run 32-bit extensions  :)