Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Saturday, September 14, 2019

Make hell of compilation in Linux enviroment

So i have 486dx4 CPU running 120MHz. And i want to build X.org. etc.

It takes insane time in make process, and it repeats in every package and directory.
Like checking:
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking return type of signal handlers... void
checking for rename... yes
checking for fchmod... yes
checking for special C compiler options needed for large files... no
Its not fast, and every make will do this. Why isn't there per source build one check and that is it. Like why? If source code is small it takes longer in make checking then compiling...

Like make one include file and done.

Saturday, August 31, 2019

Lilo

The change

I have two hard disks. First (primary master) is original Windows 95 drive.
Second disk (primary slave) is added drive with linux installed.

So to boot linux i have to boot to dos and load linux from a command line.

But how can i had boot manager?

Adding Lilo

Well, i compiled lilo-24.2  (https://www.joonet.de/lilo/ftp/sources/) on my virtual machine. Copyed files over to 486 PC.
Made configuration file changes in /etc/lilo.conf
So that lilo boot is installed on windows 95 drive and second stage is booted from linux drive.

Got warning: "sector and map file are on different disks"
And when booting up got:  "timestamp mismatch"

What the hell.

Now i have unbootable machine.
Still i was in luck, as i made floppy drive that had grub and Freedos. I was able to fix windows 95 disk mbr and got to boot again linux from there.

Still after many tries i was still on the same errors.

Finaly i was thinking, maybe if i change the order of disks i can get rid of first warning.
Ok booting from floppy and i get no root file system error and kernel panic. Requesting me to check filesystem in readonly mode. What? Cant change any config files.

Realized that /etc/fstab has wrong info info about drives. hdb was now hda, drive where linux is at.

Ok
Booted again from windows drive. I had version where initrd file was present so i can mount hda and change /etc/fstab file. Done. Booted.
Still second error.

God deem.

Made lots of changes, but still no luck.

Sugest to uninstall lilo like lilo -U and reinstall then with lilo -v
No luck.

Finaly. Downloaded source code to 486 PC and made make.
Complains that gcc must be 3.3.5, i have 3.3.4 (checkit file). Made version lower in config file. Hit make again. After a while when it was done i hit:
make install
Then:
lilo -M /dev/hda MBR
lilo -v
Rebooted and got Lilo boot screen.

:D

Final config file:
# LILO configuration file
boot = /dev/hda
message = /boot/boot_message.txt
prompt
timeout = 1200
change-rules
  reset
vga = normal
map = /boot/map
other = /dev/hdc
  label = win
image = /boot/vmlinuz-2.4.37.11
  root = /dev/hda1
  label = Linux-2.4.37.11
  read-only
image = /boot/vmlinuz-ide-2.4.29
  root = /dev/hda1
  label = Linux-2.4.29
  read-only

Edit:


Back to Linux

Linux 2.4.37.11

Managed to compile Linux kernel 2.4.37.11 and upload it to 486 PC.
Tested some things and one is lynx, for fun.


Show cpuinfo.