Trying brainix for the first time

1 view
Skip to first unread message

Iwan BK

unread,
May 5, 2008, 4:04:51 AM5/5/08
to Brainix
Hello, i just try to compile brainix on my debian linux.
There is an error in compilation :

gcc -c -o bin/kernel/boot.o src/kernel/boot.S -ffreestanding -fno-
stack-protector -O0 -Iinc -Iinc/lib -march=i386
cc1: error: unrecognized option `-fno-stack-protector'
make: *** [bin/kernel/boot.o] Error 1.

I use gcc 3.3.6.

iwan@shiningmoon:/data/OS/brainix/tes-brainix$ gcc --version
gcc (GCC) 3.3.6 (Debian 1:3.3.6-15)



When i remove the '-fno-stack-protector' from the GNUMakefile,
compilation is success.
But, when i try to running brainix on bochs, Bochs get panic. Here is
the core dump from bochs

00000000000i[ ] Bochs x86 Emulator 2.3
2 00000000000i[ ] Build from CVS snapshot on August 27, 2006
3 00000000000i[ ] System configuration
4 00000000000i[ ] processors: 1 (cores=1, HT threads=1)
5 00000000000i[ ] A20 line support: yes
6 00000000000i[ ] APIC support: yes
7 00000000000i[ ] CPU configuration
8 00000000000i[ ] level: 6
9 00000000000i[ ] paging support: yes, tlb enabled: yes
10 00000000000i[ ] SMP support: no
11 00000000000i[ ] FPU support: yes
12 00000000000i[ ] MMX support: yes
13 00000000000i[ ] SSE support: 4
14 00000000000i[ ] v8086 mode support: yes
15 00000000000i[ ] VME support: yes
16 00000000000i[ ] 3dnow! support: yes
17 00000000000i[ ] PAE support: yes
18 00000000000i[ ] PGE support: yes
19 00000000000i[ ] PSE support: yes
20 00000000000i[ ] x86-64 support: yes
21 00000000000i[ ] SEP support: yes
22 00000000000i[ ] Optimization configuration
23 00000000000i[ ] Guest2HostTLB support: yes
24 00000000000i[ ] RepeatSpeedups support: yes
25 00000000000i[ ] Icache support: yes
26 00000000000i[ ] Host Asm support: yes
27 00000000000i[ ] Fast function calls: yes
28 00000000000i[ ] Devices configuration
29 00000000000i[ ] NE2000 support: yes
30 00000000000i[ ] PCI support: yes
31 00000000000i[ ] SB16 support: yes
32 00000000000i[ ] USB support: yes
33 00000000000i[ ] VGA extension support: vbe
34 00000000000i[MEM0 ] allocated memory at 0xa7b63008. after
alignment, vector=0xa7b64000
35 00000000000i[MEM0 ] 256.00MB
36 00000000000i[MEM0 ] rom at 0xf0000/65536 ('/usr/share/bochs/BIOS-
bochs-latest')
37 00000000000p[MEM0 ] >>PANIC<< ROM: couldn't open ROM image file '/
usr/share/bochs/VGABIOS-lgpl-latest'.

Any
sugestions ?

Alex Nelson

unread,
May 5, 2008, 10:58:52 AM5/5/08
to bra...@googlegroups.com
Hey Iwan,

(I don't know how coherent I'll be, I haven't had my morning coffee yet!)

I was the one who put those lines of code in, as I use Ubuntu linux and it uses vgabios, requires the "-fno-stack-protector" line (for more recent versions of the gcc after 4.0 if I recall correctly), etc....so I think perhaps I can take a wack at this.

On ubuntu, when installing bochs, you have to install vgabios...so I assume a similar dependency holds for Debian linux. (Actually, looking at the debian dependency, one does: http://packages.debian.org/unstable/misc/bochs).

So now it's just a matter of configuring the file /brainix/dot-bochsrc...more precisely, line 151 should be commented out (Insert a "#" symbol in front) and write in the following:
vgaromimage: file=(insert YOUR path to VGA bios here)

For ubuntu, it is installed in /usr/share/vgabios, but I don't know where the debian distro puts it...

I hope that helps!

--------
Cheers!
Alex Nelson
Hobo Extraordinaire

Iwan Budi Kusnanto

unread,
May 5, 2008, 11:06:56 PM5/5/08
to Brainix
Hello Alex

On May 5, 9:58 pm, "Alex Nelson" <pqnel...@gmail.com> wrote:
> Hey Iwan,
>
> (I don't know how coherent I'll be, I haven't had my morning coffee yet!)
>

> On ubuntu, when installing bochs, you have to install vgabios...so I assume
> a similar dependency holds for Debian linux. (Actually, looking at the
> debian dependency, one does:http://packages.debian.org/unstable/misc/bochs
> ).

vgabios already installed. I must install bochs-x to run brainix on
bochs :)

>
> So now it's just a matter of configuring the file
> /brainix/dot-bochsrc...more precisely, line 151 should be commented out
> (Insert a "#" symbol in front) and write in the following:
> vgaromimage: file=(insert YOUR path to VGA bios here)
>
> For ubuntu, it is installed in /usr/share/vgabios, but I don't know where
> the debian distro puts it...

Same as debian

>
> I hope that helps!

Now, i can run brainix on bochs. But, the shell doesn't came out.
On screen, it just print

init hardware........ :-)
.....
[skipped]
....
0 (register) : memory ->file system
...[skipped]
12(watchdog) : floppy -> timer..


Sorry for my bad english :D

Alex Nelson

unread,
May 5, 2008, 11:59:58 PM5/5/08
to bra...@googlegroups.com
Hello,

Unfortunately Brainix isn't mature enough to run a shell...there are
many hurdles to overcome before we can get to that point!

That output is the latest we've come to, if I am not mistaken...I'm
sorry that it is nowhere near as advanced as Linux or even Minix, but
this is after all a hobby operating system!

If you would like to help, you are more than welcome to join our merry
crew! But sadly, we are very busy people :( (Hence why we have done
what we have so far!)

> Now, i can run brainix on bochs. But, the shell doesn't came out.
> On screen, it just print
>
> init hardware........ :-)
> .....
> [skipped]
> ....
> 0 (register) : memory ->file system
> ...[skipped]
> 12(watchdog) : floppy -> timer..

--
Cheers!
Alex Nelson
Hobo Extraordinaire

"Sing in me, Muse, and through me tell the
story
of that man skilled in all ways of contending,
the wanderer, harried for years on end..."

Iwan Budi Kusnanto

unread,
May 6, 2008, 1:26:39 AM5/6/08
to Brainix


On May 6, 10:59 am, "Alex Nelson" <pqnel...@gmail.com> wrote:

> If you would like to help, you are more than welcome to join our merry
> crew! But sadly, we are very busy people :( (Hence why we have done
> what we have so far!)

What can i do to make this Brainix running a shell ?
Maybe you can give me some todo list :).
Do you still have intention to make improvement to Brainix ?

Alex Nelson

unread,
May 6, 2008, 2:43:19 AM5/6/08
to bra...@googlegroups.com
I think the place where we left off was working on mounting the root file system...but there was disagreement over what shell should be used exactly, as BASH for example is: a) bloated, b) depends on libraries. Both are not good.

I think that perhaps that the best approach for the time being is to write a toy shell that processes simple commands and work our way up to getting ASH working.

As for the to-do list, perhaps Raj would have some suggestions? (And I know you're reading this Raj!)

Do you still have intention to make improvement to Brainix ?


Well, we wouldn't be very good at our hobby if we didn't intend on improving Brainix, now would we? ;)

We're just taking a little breather for the time being...
 
Reply all
Reply to author
Forward
0 new messages