Skip to Content.
Sympa Menu

baslinux - Re: [BL] BL on SATA drive

baslinux AT lists.ibiblio.org

Subject: Baslinux mailing list

List archive

Chronological Thread  
  • From: baslinux AT lists.ibiblio.org
  • To: baslinux AT lists.ibiblio.org
  • Subject: Re: [BL] BL on SATA drive
  • Date: Tue, 30 Mar 2010 01:16:25 +0000 (UTC)

Unless someone has a better idea I will eventually compile
a 2.6 kernel with scsi support instead of 2.4
SATA support (atalib?)

Sindi

I copied BL to a 40GB drive (people keep giving me the ones that whir
loudly) and got my 1.7GHz computer working again by unplugging replugging
DIMMs a few times (it would stop booting, or start beeping otherwise) and
using BL at the library on a laptop (at up to 400K/sec) downloaded kernel
2.6.21.7 source code as tar.bz2 and uncompressed in /usr/src/linux.

I symlinked to gcc a newer gcc 3.4.6 from Slackware 11, from which I also
have glibc 2.3.6. I have compiled a few things with this combination
before that the SW81 versions could not manage.

make menuconfig gave me some error messages - command not found,
binary operator expected, and integer expression expected and
missing asm-generic/errno.h and asm-generic/ioctl.h
(which I have in /usr/src/linux/include).
A web search on make menuconfig and my errors suggests
I should install kernel headers but I have full kernel source.
Any ideas what else is missing?

I got the same error messages using gcc 2.95.3 or 3.4.6 when I tried
to compile kernel 2.6.

A long websearch found me someone who compiled a 2.6 kernel with SW 9.0, using gcc 2.95.3 and make 3.78 and binutils 2.12. I have make 3.81 (compiled for glibc 2.2.5) and binutils 2.15 (from Slackware 11.1 I think).

The trick to eliminating the asm-generic problem was to
cd /usr/include
ln -s /usr/src/linux/include/asm-generic asm-generic
Now it can find the missing files, which came with kernel source code.

make config also gives lots of errors. No such file, undeclared...

I don't think you need kernel headers to compile the kernel. Do you need them to compile other things when you already have kernel source code?
I have not found them any place for this kernel.

I was still getting some error message involving gcc, so I symlinked it
to the SW11.1 gcc 3.4.6 instead of 2.95.3 and am now able to
make menuconfig. I need to research the various options.

Slackware 10.2 can be used with a 2.6 kernel.
To compile and use it you need to install
(says one site)

udev (in /a)
diffutils (in /ap)
module-init-tools (in /a)

udev lets you keep only the devices currently in use in your directory.
It requires 2.6 or later kernel but is it really needed? (Not to
make a test kernel, I hope).

diffutils - diff, diff3, cmp, sdiff and LOTS of locale files
BL2 does not have diff but busybox (1.32) has cmp. I will try without
diffutils.

module-init-tools (lsmod, depmod, insmod, rmmod, modprobe) is said to be required for COMPILING the modules and comes with slackware 9.1 but not 9.0. (Why do you need lsmod and depmod to compile modules?)

You can reuse a 2.4 kernel .config or borrow a 2.6 .config, or start new

make menuconfig

I added to my 'vns' 2.4.31 kernel only SATA and AHCI (specific SATA driver) and exited with a new .config.

make
I did a make bzImage and it started to compile.
It exited with an error message 'mktemp not found'.
Found in package /a/bin*.tgz of SW8.1 or SW11.
(mktemp is called by a script in 2.6 source code *initramfs*
which 2.4.31 source does not have)

bin*tgz is fairly small and also contains splitvt (very useful when you
have framebuffer console on a large screen), todos, fromdos, rpm2targz, diskcopy. And zoo (?).

Downloaded bin*.tgz from SW11, tar -zxvf bin* usr/bin/mktemp
cp usr/bin/mktemp /usr/bin and it is compiling for quite a while now.
LD and CC making lots of *.o in various directories which it then linked.

It compiled a bzImage! For via, nvidia, and sis fast PCI IDE controllers
and now SATA AHCI controller. I will report whether it finds the SATA drive in the nvidia-ide computer.

2.6.21.7 bzImage is 1.06MB with SATA support for ONE driver.
2.4.31 kernel without SATA support is about 700MB.
Since any computer with SATA support can use 2GB or more of RAM
the larger kernel is no problem.

make modules_install

I can simply 'make modules' as for 2.4.31 (without the 'install')
All modules for this kernel must be made with the same gcc version (3.4.6). A fair number of warnings about things not being properly defined.
I now have a bunch of modules ending in .ko which I will attempt to insmod. And/or depmod, modprobe, udev....

make modules_install copied the modules that were already compiled to /lib/modules/2.6.21.7 and that directory now has kernel/drivers as well
as auto-made symlinks from source and build to /usr/src/linux-2.6.21.7.
There is a kernel/drivers/i2c/algos and i2c-core.ko which I did not know I was compiling and have no idea what to do with.

USB appears to be compiled into the kernel so no modules (300K of them for 2.4 kernel might be why the kernel itself is 300K smaller).

2.6 still supports mda console (TTL monitor).

soundcore.ko is a bit smaller than soundcore.o as is rivafb.ko vs .o


make install

(or copy the kernel to wherever you boot from)

(not make dep and make bzImage and make modules as for 2.2 and 2.4)

No make dep was needed, and you have a choice of what format to make
if you do make help. rpm or deb package, bz2, etc. I am keeping this as identical to the 2.4.31 setup as possible.

Instead of make clean you makeprpr (?) or similar.

Lows in the 20s tonight headed for the 70s in a couple of days. Put in any requests for kernel features ASAP. The garden awaits and I am in a salamander survey and they were out mating in last night's cold rain.

Summary:

Upgrade to glibc 2.3.6 (I posted a package of SW11 libs) and gcc 3.4.6 (2.95.3 would not compile this source) from Slackware 11. Symlink the new gcc to gcc in /usr/bin. This combination also compiles more programs than SW81 versions (some wireless cards....)

Add mktemp from bin*tgz (or install the package and use splitvt too)

Download 2.6 source code and uncompress into /usr/src/ then rm linux
and ln -s linux-2.6* linux (ln -sf did not remove linux symlink).

symlink /asm-generic in the source code to /usr/include

cd /usr/src/linux and copy over your favorite 2.4.31 config
file to .config

makeprpr (?)
make menuconfig (or make config)

make bzImage (copy it to your loadlin directory or to /boot and use lilo)

make modules
make modules_install

We have one laptop SATA drive but no working SATA laptop so I won't test if pcmcia works with this kernel or needs to be recompiled with the newer gcc.

I will post this kernel after testing it, and the modules.
What other SATA controllers do people have? You can look up the board by model number.


Sindi




Archive powered by MHonArc 2.6.24.

Top of Page