WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: tiny core apps and assembly language  (Read 5276 times)

Offline dakoder

  • Newbie
  • *
  • Posts: 6
  • (")> I love Tiny Core
tiny core apps and assembly language
« on: June 08, 2010, 10:42:27 AM »
I was just wondering if anyone else thinks that tiny core could be co-developed using assembly language which I think would be perfect for keeping the footprint size to a minimum and this could work if enough assembler programmers get on board.
what does everyone else think ?

Graham

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: tiny core apps and assembly language
« Reply #1 on: June 08, 2010, 12:25:57 PM »
Step back 40 years.
Real operating systems are too complex to write and maintain in assembly.
This is especially true where multi-platform support is desired.

You might do this in a micro kernel for an embedded system, but TC is built
on a stock Linux kernel.

Offline dakoder

  • Newbie
  • *
  • Posts: 6
  • (")> I love Tiny Core
Re: tiny core apps and assembly language
« Reply #2 on: June 08, 2010, 01:52:31 PM »
Step back 40 years.
Real operating systems are too complex to write and maintain in assembly.

Not if lots and lots and lots of assembler programmers got together, tiny core is perfect for embedded systems such as gumstix, the race is on to get linux on pic micro's, these engineers who use embedded systems would be more than happy to program in a low level language to update the core system, but use high level for the apps.

You might do this in a micro kernel for an embedded system, but TC is built
on a stock Linux kernel.


mmmm two of the bigest problems with embedded systems is the amount of power needed to drive the clock on the cpu so it can munch through the code in a reasonable amount of time, also the limiting factor of memory size all of which drives the current consumption and physical costs of and embedded system, if tiny core was to produce a full linux system compiled in the normal way but with the core utils written in assembly this would be the ultimate operating system, nothing could be faster, smaller or cheaper to beat it. I would like to see tinycore as the defacto embedded linux system for the world.
I would also like to see tinycore combined with the BIOS on the motherboard with instant switch on and go !

by the way there was a project called a-linux which attempted to do this but seems to have died, it would be cool if it could be included in tinycore, but this would be a massive project anyway there I go again....


Graham

Offline destroyedlolo

  • Jr. Member
  • **
  • Posts: 50
    • destroyedlolo's website
Re: tiny core apps and assembly language
« Reply #3 on: June 08, 2010, 03:15:55 PM »
... ultimate operating system, nothing could be faster, smaller or cheaper to beat it.
Not so sure : I remember such discussions during the golden age of Amiga computer. The conclusion was "decent C compiler can generate code as optimized as good assembly programmer most of the time but providing a high level programming capability". More, again if you take the example of AmigaOS (perhaps the best operating system in term of resources efficiency I ever used), only very low level and critical functions are implemented in assembly (as example, the multi tasking scheduler) but most of the OS is in stock C. And the result is pretty good ;D

I would also like to see tinycore combined with the BIOS on the motherboard with instant switch on and go !
IMO, what is killing bootup performances in PC, is the large kind of different hardware you have to support ... so implying long tests and probing at bootup.
You can save lot of time having a kernel only containing and optimized for the hardware you have, and removing most of hardware probing : I know which processor I have, no floppy, 4 USB port, the video card and so on. Only "dynamic" data have to be probed as amount of RAM and HD size.

The drawback is obviously you can't spread your customized kernel ; obviously, you have to build a new kernel if you're changing anything in your system configuration.

I did this exercise on SUN workstation under NetBSD to save some memory space but never under Linux ...

Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
Re: tiny core apps and assembly language
« Reply #4 on: June 08, 2010, 04:30:07 PM »
Quote
I would also like to see tinycore combined with the BIOS on the motherboard with instant switch on and go !

Are you familiar with Coreboot? Linux replaces the BIOS firmware. Also, there is also Splashtop.

As for the whole "writing in assembly" debate, the answer comes from realizing that a compiler/language is a tool. Part of being successful is choosing the right tool for the job. You can write everything in assembly, but when it is not the right tool you will encounter difficulties. The Linux kernel uses a mix of assembly and C (often called a "portable assembly language."), and uses each where it is appropriate.

Tiny Core is comprised of two basic parts: The Linux kernel and a root filesystem. A custom kernel means you cannot leverage the existing framework (root filesystem and compiled extensions), at least not without a linux-compatibility layer, so there isn't anything left.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10960
Re: tiny core apps and assembly language
« Reply #5 on: June 09, 2010, 02:55:06 AM »
In what assembler, hmm? Most embedded is ARM. Then there's MIPS, and even x86-64 differs from x86.

There's no reason really to start dropping maintainability, features, portability just to get a bit lower size on one arch. Busybox already handles a great deal of the size reduction, and is used on a lot of embedded linux.
The only barriers that can stop you are the ones you create yourself.

Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
Re: tiny core apps and assembly language
« Reply #6 on: June 09, 2010, 07:26:41 AM »
Since it's in-line with the discussion and may be of interest, there is the Linux Tiny project which aims to reduce the size of the kernel as much as possible. It's not up to date, but there are tidbits of information which may be useful.

Also useful for small systems is compiling the kernel with LZMA.

Offline MikeLockmoore

  • Hero Member
  • *****
  • Posts: 525
  • Good software needn't be big!
Re: tiny core apps and assembly language
« Reply #7 on: June 09, 2010, 09:46:02 AM »
dakoder:  Are you familiar with Menuet OS (http://www.menuetos.net/) and its decendents like Kolibri? It's been discussed in this forum here http://forum.tinycorelinux.net/index.php?topic=1189.0 and here http://forum.tinycorelinux.net/index.php?topic=2844.0. Summary: it's an non-Linux OS kernel with GUI and set of core apps written in assembler.  If you are interested in developing for and/or promoting an all-assembler system, you will get a lot further with Menuet or Kolibri.  I've tried it several times.  It's quite nice!

I think I heard of a Linux distribution that focused on assembly-language implementations of some core libraries and apps, but I can't seem to find it now. 

On the other hand, Linux apps written C for the console or FLTK are also very small and efficient in TinyCore.  Most of my FLTK apps are on the order of 10 K to 30 K bytes and start and run quick very quickly.  Good enough for me, although I appreciate some of the "assembler rules" attitude.
--
Mike L.

Offline dakoder

  • Newbie
  • *
  • Posts: 6
  • (")> I love Tiny Core
Re: tiny core apps and assembly language
« Reply #8 on: June 10, 2010, 04:25:55 PM »
wow, lots of interesting ideas...

splashtop:    never heard of it before, but the idea is great, perhaps soon all PC will just switch on from where they left off (memristers should make this possible), I will look at splashtop in more detail.

coreboot:   I thought I understood this but I was shocked to find that so much has been acheived in this area and is  a fantastic opportunity to separate hardware from software.

Linux Tiny:  WOW !!   perfect, thanks for this one, never heard of it until now !!!

LZMA:  LHA has always been my favourite, better than PKZIP but not as good as a black hole though.

Some very interesting links, thank you.


Graham