LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-11-2009, 06:41 AM   #1
NightHorse
Member
 
Registered: Jun 2009
Location: Egypt
Distribution: Ubuntu 10.04
Posts: 117

Rep: Reputation: 16
linux for i486sx or at least a compiler


Greetings,

I am looking for a linux old distro that support i486sx processor (it lacks floating point unit). I will install it on a pc/104 board.

I already have a linux small distro on it called X-Linux. My problem is that I don't have gcc installed on it. I can compile my programs using --march=i486 and -O0 but I don't know how to compile other open source programs which uses make files. Any help would be appreciated.

Thanks all in advance
 
Old 06-11-2009, 07:42 AM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: Slackware®
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Hi,

Any early GNU/Linux should work with your old hardware. I suggest Slackware but rolling back to 8.1. Look at the Slackware 8.1 HowTo.

You didn't state your hardware other than the 486sx. The more memory you have on that system the better you are.

Your compile times on this hardware are going to be lonnnng.

Is this the only machine you have access too? If you have another newer machine then it is possible to cross compile for the older machine.
 
Old 06-11-2009, 08:14 AM   #3
NightHorse
Member
 
Registered: Jun 2009
Location: Egypt
Distribution: Ubuntu 10.04
Posts: 117

Original Poster
Rep: Reputation: 16
Sorry for not providing enough info.

That's the configuration.

# DM&P SoC CPU Vortex86SX- 300MHz
# PC/104 standard compliant, PCI-104 & PCI/104+ (Optional)
# 128MB DDR2 onboard
# Watchdog Timer, software programmable from 30.5 µsec. to 512 sec.
# XGI Volari Z9s Chipset, onboard 32MB VGA Memory
# Integrated 10/100Mbps Ethernet
# Onboard 2MB SPI Flash Disk
# 2 GB embedded disk

It's optimized for embedded systems cause of it's low power use.

I am currently cross compiling for it. I just don't know how to cross compile gcc for it. It would make my life easier. I tried cross compiling gcc but I am getting nowhere. I don't know if that's even applicable.

I have tried installing several embedded distros on it, like coyote, and smoothwall. The main problem is the lack of FPU unit. kernel always panic :s

I have a configuration file for the x-linux kernel. I guess I can use it to compile a kernel for that machine. but I will still face the same problem on compiling gcc.. or what do you think??

Sorry if am not clear enough. but what I really need is having non graphical linux and gcc installed on that machine so i can run (configure, make, make install) to get any application I need running.
 
Old 06-11-2009, 08:17 AM   #4
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
That doesn't qualify as "old" hardware to me. It has a fast (to me) processor at 300mhz and a whopping 128megs of RAM.

I'd recommend the current version of Debian, Debian 5.0 (aka Lenny). You can get a full blown GUI, if you want--but install the XFCE alternative instead (it's under advanced options at the start of the install).

By default, Debian does not install the compiler; you'll install it after the initial install manually.
 
Old 06-11-2009, 08:19 AM   #5
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
Oh--wait, I think Debian 5.0's lowest processor is 486. I'm not sure about Debian 4.0, but I know Debian 3.1 (aka Sarge) went down to 386. With Debian 3.1, you wouldn't have to worry about the FPU.
 
Old 06-11-2009, 08:24 AM   #6
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
You may wanna check out Tinycore also, very hackable, used for anything, appliance, server, x-window, everything
awesome distro. it's like 10MB and microcore is even smaller

Quote:
The user has complete control over which applications and/or additional hardware to have supported, be it for a desktop, a netbook, an appliance, or server, selectable by the user by installing additional applications from online repositories, or easily compiling most anything you desire using tools provided.
( http://www.tinycorelinux.com/welcome.html )
 
Old 06-11-2009, 08:27 AM   #7
NightHorse
Member
 
Registered: Jun 2009
Location: Egypt
Distribution: Ubuntu 10.04
Posts: 117

Original Poster
Rep: Reputation: 16
I will give it a try but what about the no floating point issue?? It was the problem for all the distributions I have tried. Even smoothwall which it's minimum requirement is i486. The only difference is the *sx* on my processor which means lacking FPU unit so the kernel must be compiled with FPU emulator turned on??
 
Old 06-11-2009, 08:28 AM   #8
NightHorse
Member
 
Registered: Jun 2009
Location: Egypt
Distribution: Ubuntu 10.04
Posts: 117

Original Poster
Rep: Reputation: 16
Seems like we were posting at same time.

Ok. I will give it a shot.. Thanks alot for help. That was my first post btw.
 
Old 06-11-2009, 08:40 AM   #9
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
I really am ignorant when it comes to setting up embedded stuff, etc.
But, check this out, I have a tc-1.4.3 usb and I made some "flavor" packs for it too.
The "flavors" are actually qemu-img virtual hard drives with tinycore apps/backups inside
awesome thing about tinycore is it can mount these vhd's using a bootcode and restore apps, etc from them.bootcode "tcvd="
i made a flavor named compilr that is loaded with most apps for hacking tinycore, etc.
Simply download tc-usb and compilr flavor, place compilr flavor in "flavors" folder in the usb download(boot and flavor folder inside)
Next, check menu.lst or syslinux.cfg to make sure it all points to your usb.
if your usb is sda1, it's already setup, if other you may have to edit.
below is part of the menu.lst inside, only thing you might have to edit is "sda1"

Code:
## For remastering and hacking Tinycore and other distro's too!
title TinyCore-Compiler
kernel /boot/bzImage quiet tcvd=sda1/flavors/compilr restore=tcvd tce=tcvd waitusb=5
initrd /boot/tinycore.gz
The usb is made for either fat16/32 usb using syslinux or ext2/3 usb using grub.
( http://multidistro.com/downloads/tc_...c_flavors.html )
note the vhd's may de-compress to 500MB+

troubleshooting, it is best to choose the "base norestore" option first,
boo to the desktop, open a root terminal and type "fdisk -l"
That will tell you how tc recognizes your usb, if it says it's sdb1 then
edit either syslinux.cfg or menu.lst to point to sdb1.
Then after editing either reboot and choose the option for tcvd on sdb1

here is a entry from the tcvd.cfg which is a sub-menu of syslinux.cfg I made
Code:
label tcvd/sda1
menu label ^TCVD-2-SDA1
menu default
kernel /boot/bzImage
append initrd=/boot/tinycore.gz quiet desktop=jwm tcvd=sda1/flavors/ restore=tcvd tce=tcvd waitusb=5
Very big note, I made this to be edited!
you must add the tcvd name after "tcvd=sda1/flavors"
so if usb is sdb1 and using compilr flavor it would be
"tcvd=sdb1/flavors/compilr restore=tcvd tce=tcvd waitusb=5"

dig?
 
Old 06-11-2009, 11:58 AM   #10
NightHorse
Member
 
Registered: Jun 2009
Location: Egypt
Distribution: Ubuntu 10.04
Posts: 117

Original Poster
Rep: Reputation: 16
I have checked both tinycorelinux and debian 4. Both don't support i486sx.

1. From debian web site:
Quote:
2.1.2.1. CPU

Nearly all x86-based (IA-32) processors still in use in personal computers are supported, including all varieties of Intel's "Pentium" series. This also includes 32-bit AMD and VIA (former Cyrix) processors, and processors like the Athlon XP and Intel P4 Xeon.

However, Debian GNU/Linux lenny will not run on 386 or earlier processors. Despite the architecture name "i386", support for actual 80386 processors (and their clones) was dropped with the Sarge (r3.1) release of Debian[2]. (No version of Linux has ever supported the 286 or earlier chips in the series.) All i486 and later processors are still supported
2. From tinycorelinux website:
Quote:
What are the minimum requirements?

An absolute minimum of RAM is 32mb. TC won't boot with anything less, no matter how many terabytes of swap you have.
The minimum cpu is i486DX (486 with a math processor).
Seems I need a debian version perior to 3.1 so if you know where to find it, pls let me know. I will keep searching for it and I will post here if I got anywhere.

I really likes to try qemu anyway. Just to understand how it works. Seems it's bit different than usual virtual machine. I am using Sun VirtualBox and it's amazing. XP boots even faster than being installed natively on the machine. !
 
Old 06-11-2009, 03:22 PM   #11
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Mmmm, my mind is really blurry because it's been long since I've had an SX on my hands, however if I remember well, you could turn fpu emulation on your kernel. If all you need is a new kernel, wouldn't any distro work as long as you compile an adequate kernel for your cpu? The other part of the puzzle is to find a distro that's compiled for either 486 or 386, and there are quite a lot of these still.

Another option would be to use Gentoo from stage1, and bootstrap your own system for that cpu. However compiling in such hardware is gonna take quite a bit of time.

Last edited by i92guboj; 06-11-2009 at 03:23 PM.
 
Old 06-12-2009, 12:46 AM   #12
NightHorse
Member
 
Registered: Jun 2009
Location: Egypt
Distribution: Ubuntu 10.04
Posts: 117

Original Poster
Rep: Reputation: 16
It's not only about compiling the kernel. I have the configuration file for my current x-linux kernel and it has FPU emulation on. And for every compiling I do I have to add --march=i486 -O2

So If I got any working distro and recompiled the kernel with FPU emulation. But then I will loose the binaries support cause the binaries lack those options. Right??

What I need is an old distro supporting real i386. *Many distros use i386 to indicate x86 even if they are not really old i386 compatible* with a C/C++ compiler compiled on it.

I have searched for different old debian releases like (2.1, 2.2, 3) I found couple torrents, but they seems dead. So If anyone knows where to find one like those pls let me know.
 
Old 06-12-2009, 08:46 AM   #13
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: Slackware®
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Hi,

I've been away since my original response. I should have checked your original link in the OP. My bad.

For the FPU for this just recompile the kernel on another system. You can move the kernel along with any of the modules to the system. I just move the kernel and '/lib/modules/lib_version_modules'

If you want to roll back then choose some earlier versions for the embedded. I'm not a Debian fan but that to can be had. I doubt that you'll find a torrent for any of the older distributions. You can search for some mirrors that may be out there with older versions that you could 'ftp'. For Slackware there is; ftp://ftp.slackware.no/pub/linux/slackware/

This site provides versions all the way back to 2.01. Slackware is still supported for 8.1 and above.

Most embedded system are supported via a external or testbed with current software that way you can provide support a lot easier. Compile times for your 'sx' will be long on the resident system. Much better with a modern hardware system.

You could always setup a 'VM' on a testbed with the older version of the distro then perform the compile on that by utilizing the available cpu of the newer system. Then move the necessary files along with the kernel to the embed system. This would be a lot faster on the VM. Therefore you could have multiple distro VMs to see what will fit instead of pushing versions to the embed.
 
Old 06-12-2009, 10:10 AM   #14
NightHorse
Member
 
Registered: Jun 2009
Location: Egypt
Distribution: Ubuntu 10.04
Posts: 117

Original Poster
Rep: Reputation: 16
Hey,

Welcome back. I appreciate all the help I am getting from everyone. I am going to try some old slackware version from the mirror you posted.

I currently compile on my ubuntu just adding the --march=i486 option.

I need to explain what I need to do a bit. We are going to have a wifi module to be connected to one of the pc/104 usbs. The site provide a source code for the driver so I need to compile it for my x-linux. The problem is that I don't know how to pass --march=i486 option to the makefile generated by the configure script. Earlier I thought it's impossible unless to go into the makefile script and add the flag myself which is bit complicated for me to understand.
That's why I was looking for native distro with gcc installed on it. But I found I could pass flags to the gcc compiler while running script. I particularly found CFLAGS and CPPFLAGS.

I tried passing CFLAGS=--march=i486 to configure and make but it didn't work. I will keep searching more. Do you think I should post a new thread regarding this?? cause it seems a different topic?

Anyway I will have to wait till sunday to try one of slackware versions cause it's weekend here already and won't get my hands on the pc/104 till then. If I got anywhere about the make or configure arguments.

Thanks again for your help.
 
Old 06-21-2009, 05:13 AM   #15
NightHorse
Member
 
Registered: Jun 2009
Location: Egypt
Distribution: Ubuntu 10.04
Posts: 117

Original Poster
Rep: Reputation: 16
Guess what... slackware 8.1 is installing right now on pc/104

I can't believe it. Most distros stopped supporting the i486sx. I will post back when i am done. I stripped all gui stuff to increase the performance.

I couldn't believe I was gonna try from 2.1 and up.. LoL

Thank you so much onebuck.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
checking for C compiler default output... configure: error: C compiler cannot create fiorejm Linux - Software 6 11-12-2009 12:35 PM
So I need a C compiler to install a c compiler. Makes sense. vic305 Linux - Software 8 12-17-2008 10:30 PM
My c compiler doesn't work after the cross-compiler installed heracles.cn Linux - Newbie 1 06-05-2007 03:55 AM
Linux on i486SX at 3MB RAM? ichrispa Linux - Laptop and Netbook 7 07-12-2005 07:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration