Tiny Core Linux

General TC => General TC Talk => Topic started by: mattiaxx86to on March 19, 2010, 03:23:47 AM

Title: Tiny Kernel Compilation Error
Post by: mattiaxx86to on March 19, 2010, 03:23:47 AM
Hello everyone,

I have a problem with compilation of tiny core kernel,
i want to change the cpu type to 386 and enable math emulation.

I have read the "Custom Kernel" in the wiki tiny core, and installed compiletc.tcz

I have downloaded this kernel : ftp://ftp.ibiblio.org/pub/linux/distributions/tinycorelinux/2.x/release/src/linux-2.6.29.1-patched.tar.bz2

I have downloaded this config : ftp://ftp.ibiblio.org/pub/linux/distributions/tinycorelinux/2.x/release/src/config-2.6.29.1-tinycore

Extract the kernel in a directory on a usb key (from a tiny core installation), copy the downloaded config file in the kernel extract directory (with name: config)

and i have execute thi command in the extract kernel directory:

make oldconfig        (all ok)
make menuconfig    (change cpu type and enable math emulation, save all ok)
make bzImage        (see the error below)

CHK  include/linux/version.h
CHK  include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-x86
ln: include/asm: Operation not permitted
make: *** [include/asm] Error 1


Why ??? can you help me to compile the kernel with 386 cpu and math emulation?

Thanks
Title: Re: Tiny Kernel Compilation Error
Post by: curaga on March 19, 2010, 03:38:27 AM
Either there are permission problems, or your the filesystem on your usb doesn't support symlinks.
If it's fat*, do use a linux fs. If a permission problem, IIRC I compiled the kernel as root, so to do it as an user:
sudo chown -R tc.staff *

Also, the config should be called ".config" for the previous one to be taken into account.

I must say though that anything less than 486 is not supported even if you change the kernel to do. Glibc has dropped that support, and all our userspace is compiled for a 486 minimum.
Title: Re: Tiny Kernel Compilation Error
Post by: mattiaxx86to on March 19, 2010, 03:49:35 AM
Great! i have copy all in the local tiny core and make bzImage work!

But, i have a vortex86sx, and the basic tiny core kernel don't work for
a fpu error, for you, if i compile the kernel with math emulation and
don't change cpu type (from 486 to 386), is possible to work?

Thanks!
Title: Re: Tiny Kernel Compilation Error
Post by: curaga on March 19, 2010, 03:53:15 AM
Good news, looks like that cpu is a 486sx. Just enabling math emulation should make things work.
Title: Re: Tiny Kernel Compilation Error
Post by: mattiaxx86to on March 19, 2010, 03:59:52 AM
no..... there is a 386 ..... don't work?
Title: Re: Tiny Kernel Compilation Error
Post by: curaga on March 19, 2010, 04:39:35 AM
What Google found said it was a 486. It could be wrong, but if it's a 386, no current linux will run on it.
Title: Re: Tiny Kernel Compilation Error
Post by: mattiaxx86to on March 19, 2010, 06:03:26 AM
Sorry it's a 486, but i have another problem.

When i make the bzImage, after 30minutes, return this error :

MKCAP arch/x86/kernel/cpu/capflags.c not found

i try to do bzimage with the non patched kernel
Title: Re: Tiny Kernel Compilation Error
Post by: mattiaxx86to on March 19, 2010, 07:56:47 AM
thw result of the two compile is the same,
see the error below

CHK   include/linux/compile.h
MKCAP arch/x86/kernel/cpu/capflags.c
/bin/sh: perl: not found
make[2]: *** [arch/x86/kernel/cpu/capflags.c] Error 127
make[1]: *** [arch/x86/kernel/cpu] Error 2

Any idea?
Title: Re: Tiny Kernel Compilation Error
Post by: Juanito on March 19, 2010, 08:05:52 AM
to compile the kernel, you will need both the bash and perl5 extensions loaded
Title: Re: Tiny Kernel Compilation Error
Post by: mattiaxx86to on March 22, 2010, 01:44:34 AM
Hi! i have compiled the tiny core patched kernel and i have selected math emulation.

After i have created a tiny core cd with custom kernel but when this boot, print a kernel panic - not syncing: attempted to kill the idle task, i have only flag the math emulation!

Have you and idea?
Title: Re: Tiny Kernel Compilation Error
Post by: Juanito on March 22, 2010, 02:09:22 AM
You will need to use microcore/tinycore >= version 2.9 - prior to that there were problems booting on i486/i586 machines.
Title: Re: Tiny Kernel Compilation Error
Post by: mattiaxx86to on March 22, 2010, 02:17:25 AM
Where i can find the tiny core 2.9 kernel? i use a 2.6 in this moment

Thanks
Title: Re: Tiny Kernel Compilation Error
Post by: Juanito on March 22, 2010, 02:18:51 AM
http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/2.x/release/ (http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/2.x/release/)
Title: Re: Tiny Kernel Compilation Error
Post by: mattiaxx86to on March 22, 2010, 02:21:49 AM
sorry but i can't find the kernel, can you post me the link?

i find only thee the iso 2.10
Title: Re: Tiny Kernel Compilation Error
Post by: Juanito on March 22, 2010, 02:39:33 AM
Ah - maybe we're speaking at cross purposes here..

I was speaking of using the kernel bzImage you compiled together with microcore.gz/tinycore.gz from the microcore/tinycore-2.9 or 2.10 iso

Alternatively, you could try using tinycore.gz from http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/archive/tinycore_1.4.3.iso (http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/archive/tinycore_1.4.3.iso) together with the bzImage you compiled
Title: Re: Tiny Kernel Compilation Error
Post by: mattiaxx86to on March 22, 2010, 06:28:42 AM
With all version don't work, same message.

I have try to use the tiny core init.rd and xlinux kernel,
the system start and work, but when i install a tcz package
at the end of the process, the appbrowser return this error :

mounting /dev/loop0 on /tmp/tcloop/cfdisk: No such device


Why this error and why the xlinux kernel work and tce kernel don't work?

Thanks
Title: Re: Tiny Kernel Compilation Error
Post by: mattiaxx86to on March 22, 2010, 06:52:27 AM
Same problema with 2.10 init rd and tiny core kernel recompiled with math emulation
Title: Re: Tiny Kernel Compilation Error
Post by: Juanito on March 22, 2010, 07:14:26 AM
Same problema with 2.10 init rd and tiny core kernel recompiled with math emulation

If  I understand correctly, you've managed to boot your customised kernel bzImage with tinycore.gz from the tinycore_2.10.iso

..but you get the error message:
Code: [Select]
mounting /dev/loop0 on /tmp/tcloop/cfdisk: No such device..when you try to load an extension.

Are you booting from hd, usb or cd?

What boot loader and boot loader configuration are you using?
Title: Re: Tiny Kernel Compilation Error
Post by: maro on March 22, 2010, 03:45:12 PM
@mattiaxx86to: When you got the error message (mounting /dev/loop0 on /tmp/tcloop/cfdisk: No such device) did you check how many loop devices were actually present (e.g. ls /dev | grep -c '^loop')? What about the ownership and permissions of those devices?
Title: Re: Tiny Kernel Compilation Error
Post by: mattiaxx86to on March 23, 2010, 12:58:48 AM
@maro : your command result is 255, the own for all /dev/loop is root and permission:

brw-rw-r--

Thanks
Title: Re: Tiny Kernel Compilation Error
Post by: mattiaxx86to on March 23, 2010, 01:00:41 AM
With help of Juanito i can see when the tinycore init rd run there are many error :

Booting tinycore_2.10
Running Linux Kernel 2.6.29
Starting udev daemon for hotplug support...udevd[1143]: inotify_init failed: Function not implemented

udevd[1143]: error initializing inotify

Setting Timezone to UTCerror sending message: connection refused
udevadm[1875]: error sending message: connection refused

hwclock: can't open /dev/misc/rtc : No such file or directory

But when i try to install an extension, in dmesg anything change, the last 3 row are :

EXT3-fs warning : mounting unchecked fs, running e2fsck is reccomended
EXT3 FS on hda2, internal journal
EXT3-fs mounted filesystem with ordered data mod
FAT: IO charset iso8859-1 not found


Why this? i have only recompile the kernel with math emulation!

Thanks
Title: Re: Tiny Kernel Compilation Error
Post by: curaga on March 23, 2010, 04:39:45 AM
Are you sure the old config was properly used? ie copied as ".config", not "config" before make menuconfig.
Looks like many things in our config are missing in your build..
Title: Re: Tiny Kernel Compilation Error
Post by: mattiaxx86to on March 23, 2010, 06:20:45 AM
Yes, i'm sure, because if i run custom kernel in a pc with coprocessor all works fine!

1)But first i have copy the config in the source patched kernel with name .config
2)Run make oldconfig
3)Run make menuconfig (enable math emulation)
4)Run make bzImage

but i don't understand why the kerne don't work properly......
Title: Re: Tiny Kernel Compilation Error
Post by: mattiaxx86to on March 23, 2010, 06:23:50 AM
ps. the config file is this ftp://ftp.ibiblio.org/pub/linux/distributions/tinycorelinux/2.x/release/src/config-2.6.29.1-tinycore
Title: Re: Tiny Kernel Compilation Error
Post by: helander on March 23, 2010, 04:36:10 PM
Yes, i'm sure, because if i run custom kernel in a pc with coprocessor all works fine!

1)But first i have copy the config in the source patched kernel with name .config
2)Run make oldconfig
3)Run make menuconfig (enable math emulation)
4)Run make bzImage

but i don't understand why the kerne don't work properly......

From the above it looks like you are not rebuilding the kernel modules. As a general rule you need to rebuild the kernel modules whenever you make a config change. I do not know if the change you made actually requires a rebuild of the modules or not. Two ways to find out:

/Lars
Title: Re: Tiny Kernel Compilation Error
Post by: mattiaxx86to on April 01, 2010, 06:37:50 AM
How can i rebuild the kernel modules?

Thanks
Title: Re: Tiny Kernel Compilation Error
Post by: Juanito on April 01, 2010, 06:42:37 AM
[removed now I realised which thread this is]
Title: Re: Tiny Kernel Compilation Error
Post by: mattiaxx86to on April 01, 2010, 06:53:03 AM
initial purpose : run tinycore on a pc without math processor, i have recompile the kernel but i can't install module tcz (read the topic for detail), helander write to recompile the modules for resolve my problem....
Title: Re: Tiny Kernel Compilation Error
Post by: Juanito on April 01, 2010, 07:04:29 AM
..sorry - I hadn't realised this was the same thread.

Probably better to use the full patched kernel source with your modified .config and then "make modules && make modules_install"

Note that for consistency, it would be better to move the installed modules to the default tinycore location rather than /lib
Title: Re: Tiny Kernel Compilation Error
Post by: helander on April 01, 2010, 08:17:26 AM
How can i rebuild the kernel modules?

Thanks

There is a "Custom Kernel" article on the week (found under section "Remastering") that probbaly could provide you with some info. Note that the article mentions .tcem extensions. Today all extensions are named .tcz also the ones that contain kernel modules. Apart from that the article is "fine".

/Lars
Title: Re: Tiny Kernel Compilation Error
Post by: mattiaxx86to on April 02, 2010, 06:23:16 AM
Quote
Probably better to use the full patched kernel source with your modified .config and then "make modules && make modules_install"

Note that for consistency, it would be better to move the installed modules to the default tinycore location rather than /lib

Ok so,

i have recompiled the kernel with math emulation (with make bzImage), next step make modules && make modules_install OK.

Now, how can i do for create the tinycore.gz with the recompiled modules?
(please step by step if it possible)

Quote
There is a "Custom Kernel" article on the week (found under section "Remastering") that probbaly could provide you with some info. Note that the article mentions .tcem extensions. Today all extensions are named .tcz also the ones that contain kernel modules. Apart from that the article is "fine".

I have follow this article for recompile the kernel, but for me (newbie) the part of modules is very difficult....

Thanks
Title: Re: Tiny Kernel Compilation Error
Post by: Juanito on April 02, 2010, 06:54:43 AM
I guess this depends on how many recompiled modules you'd like to keep.

If you'd like to keep them all, then you could follow the naming convention Curaga made - i.e. *-2.6.29.1-tinycore.tcz

If you look at the list file associated with Curaga's module extensions, you can see where you need to copy your modules to so that the tc convention is followed. If we take the example of bt-2.6.29.1-tinycore.tcz, the first module in the list file http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/2.x/tcz/bt-2.6.29.1-tinycore.tcz.list (http://distro.ibiblio.org/pub/linux/distributions/tinycorelinux/2.x/tcz/bt-2.6.29.1-tinycore.tcz.list) is:
Code: [Select]
/usr/local/lib/modules/2.6.29.1-tinycore/kernel/drivers/bluetooth/bcm203x.ko.gz
If you create a folder /tmp/pkg, you could then copy all of the modules from wherever they were installed (probably under /lib/modules/..) to /tmp/pkg so that, using the same example, the first module would be:
Code: [Select]
/tmp/pkg/usr/local/lib/modules/2.6.29.1-tinycore/kernel/drivers/bluetooth/bcm203x.ko.gz..take care that you keep the correct permissions whilst copying by using "sudo cp -p"

Once you've finished copying your modules to /tmp/pkg, you then do this (following the same example) to make your extension:
Code: [Select]
$ cd /tmp
$ sudo mksquashfs pkg/ bt-2.6.29.1-tinycore.tcz