jfs を有効にするため、 linux kernel を再 compile
coLinux 0.6.3 では kernel は
Linux colinux 2.6.11-co-0.6.3 #1 Sun Feb 5 06:44:17 UTC 2006 i686 GNU/Linux
であった。
なので、 2.6.11 の kernel source と、 coLinux のソースを拾ってきて coLinux 上でコンパイル。 root fs 上にはとてもコンパイルに使えるような余地はなかったんだが、ダウンロードした 1G の filesystem image があったので、それを mount して、そこに展開。
で、 make menuconfig して make すると、通らない……。
CHK include/linux/version.h
make[1]: `arch/i386/kernel/asm-offsets.s' is up to date.
CHK include/linux/compile.h
CHK usr/initramfs_list
CC arch/i386/kernel/process.o
{standard input}: Assembler messages:
{standard input}:922: Error: suffix or operands invalid for `mov'
{standard input}:923: Error: suffix or operands invalid for `mov'
{standard input}:1145: Error: suffix or operands invalid for `mov'
{standard input}:1146: Error: suffix or operands invalid for `mov'
{standard input}:1232: Error: suffix or operands invalid for `mov'
{standard input}:1233: Error: suffix or operands invalid for `mov'
{standard input}:1292: Error: suffix or operands invalid for `mov'
{standard input}:1293: Error: suffix or operands invalid for `mov'
{standard input}:1381: Error: suffix or operands invalid for `mov'
{standard input}:1393: Error: suffix or operands invalid for `mov'
make[1]: *** [arch/i386/kernel/process.o] Error 1
make: *** [arch/i386/kernel] Error 2
あるバージョンの as でしか通らないインラインアセンブラかよ…。けっ、ウンコくせー。
この件は problem while "make" kernel - LinuxQuestions.org で解決。
しかし、すぐ
CHK include/linux/version.h
make[1]: `arch/i386/kernel/asm-offsets.s' is up to date.
CHK include/linux/compile.h
CHK usr/initramfs_list
CC arch/i386/kernel/cooperative.o
arch/i386/kernel/cooperative.c: In function `co_switch_wrapper_protected':
arch/i386/kernel/cooperative.c:205: warning: ISO C90 forbids mixed declarations and code
{standard input}: Assembler messages:
{standard input}:343: Error: suffix or operands invalid for `mov'
{standard input}:344: Error: suffix or operands invalid for `mov'
make[1]: *** [arch/i386/kernel/cooperative.o] Error 1
make: *** [arch/i386/kernel] Error 2
なる事態になって、こっちは coLinux の方の source じゃなかろか……。
2.6.11 当時の開発環境ならコンパイル通るんだろうか。
とりあえず、内容理解せずに機械的にマネして
--- arch/i386/kernel/cooperative.c.orig 2006-02-25 02:15:35.000000000 +0900
+++ arch/i386/kernel/cooperative.c 2006-02-25 02:18:28.000000000 +0900
@@ -205,8 +205,8 @@
unsigned long fs = 0;
unsigned long gs = 0;
- asm volatile("movl %%fs,%0": "=m" (fs));
- asm volatile("movl %%gs,%0": "=m" (gs));
+ asm volatile("mov %%fs,%0": "=m" (fs));
+ asm volatile("mov %%gs,%0": "=m" (gs));
/*
* Nullify the registers so the passage page code restores to
とやると通るようだが…。
[referer: [an error occurred while processing this directive]]