From: anterior <anterior@inbox.ru>
To: "community@altlinux.ru" <community@altlinux.ru>
Subject: [Comm] Компиляция linux-0.0.1 =>?
Date: Sun, 04 Sep 2005 11:45:37 +0400
Message-ID: <op.swkiibu5c4rd6k@localhost.localdomain> (raw)
Привет пингвиноидам! Тут я вобщем раздобыл linux-0.01.tar.gz. Хотел на ее
основе написать свою ОС (побаловаться ;) Но чего-то не могу скомпилировать
linux-0.01(без изменений в коде). Видать GCC, GAS не подходят :( Может
кто-то из вас пробовал баловаться так же как и я? Во первых мне пришлось
подкорректировать Makefile. Часть его выглядела так:
AS86 =as -0 -a
CC86 =cc -0
LD86 =ld -0
AS =gas
LD =gld
LDFLAGS =-s -x -M
CC =gcc
CFLAGS =-Wall -O -fstrength-reduce -fomit-frame-pointer -fcombine-regs
CPP =gcc -E -nostdinc -Iinclude
ARCHIVES=kernel/kernel.o mm/mm.o fs/fs.o
LIBS =lib/lib.a
.c.s:
$(CC) $(CFLAGS) \
-nostdinc -Iinclude -S -o $*.s $<
.s.o:
$(AS) -c -o $*.o $<
.c.o:
$(CC) $(CFLAGS) \
-nostdinc -Iinclude -c -o $*.o $<
all: Image
Image: boot/boot tools/system tools/build
tools/build boot/boot tools/system > Image
sync
Я его изменил. Теперь он выглядел так:
AS86 =as86 -0 -a
CC86 =cc -0
LD86 =ld86 -0
AS =as
LD =ld
LDFLAGS =-s -x -M
CC =cc
CFLAGS =-Wall -O -fstrength-reduce -fomit-frame-pointer # Я убрал флаг
-fcombine-regs (он отсутствует в gcc)
CPP =cpp -E -nostdinc -Iinclude
ARCHIVES=kernel/kernel.o mm/mm.o fs/fs.o
LIBS =lib/lib.a
.c.s:
$(CC) $(CFLAGS) \
-nostdinc -Iinclude -S -o $*.s $<
.s.o:
$(AS) -c -o $*.o $< # Я убрал аттрибут -c так как тоже его нет в AS
.c.o:
$(CC) $(CFLAGS) \
-nostdinc -Iinclude -c -o $*.o $<
Ну понятное дело что теперь у меня вряд-ли что нибудь скомпилируется.
$make
as -o boot/head.o boot/head.s
boot/head.s: Assembler messages:
boot/head.s:168: Error: alignment not a power of 2
make: *** [boot/head.o] Ошибка 1
Это первая ошибка. Далее шли разного рода ошибки. В основном были там где
__asm__(... Их приходилось просто убирать. Но и в конце концов выходили
ошибки Undefined reference. Вот такие дела. Может все равно возможно
как-то скомпилировать это ядро. И еще: Кто знает киньте какие ссылки на
статьи по написанию ОС с использованием C/C++.
gcc version 3.2.3 (ALT Linux, build 3.2.3-alt2)
GNU ld version 2.14.90.0.6 20030820
ld86 version: 0.16.3
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
next reply other threads:[~2005-09-04 7:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-04 7:45 anterior [this message]
2005-09-04 16:58 ` [Comm] " Michael Shigorin
2005-09-04 18:45 ` Andrey Rahmatullin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=op.swkiibu5c4rd6k@localhost.localdomain \
--to=anterior@inbox.ru \
--cc=community@altlinux.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git