Re: [Vala] [Having fun with Vala] Multiboot kernel using Vala!
- From: Matías De la Puente <mfpuente ar gmail com>
- To: Sam Liddicott <sam liddicott com>
- Cc: vala-list <vala-list gnome org>
- Subject: Re: [Vala] [Having fun with Vala] Multiboot kernel using Vala!
- Date: Wed, 11 Feb 2009 16:17:33 -0200
Hi all, thanx for the replies!
2009/2/11 Sam Liddicott
<sam liddicott com>
* Yu Feng wrote, On 11/02/09 16:35:
Hi Matias,
I am curious about how GLib was staticly linked to your kernel. I didn't
see any flags on this in your makefile.
Well, i didn't link the kernel to GLib. If you see the files in the tar.bz2 file there's a little implementation of glib.h and glib-object.h. The later is an empty file, but the former only had definitions to gint, guint, glong, TRUE, FALSE, etc. It only hads the definitions that the generated C file needs.
I figured he wasn't using GLib or libc.
He doesn't use any glib stuff, printf is provided by grub
I didn't use the printf provided by grub (I didn't know there's one). If you see in the tar.bz2 file there's 3 files:
video.c, video.h and video.vapi. The content of video.c is the sample founded in here:
http://www.gnu.org/software/grub/manual/multiboot/html_node/kernel_002ec.html#kernel_002ec
Of course without the CHECK_FLAG macro and the cmain function, both implemented in kernel.vala (the cmain function is partially implemented in the vala file).
The header file only make 'public' the cls and printf function. The vapi file is for using that functions in vala.
All this can sound very strange and forced but I just want to see how far we can get with vala. Let's say can we build a gnome application with vala?, yes; Can we build a dbus client/server with vala, yes; Can we build a terminal application in vala, yes; Can we build a gstreamer, gedit, anjuta, etc plugin?, yes; Can we build a Windows application?, hmm, yee (not a complete yes but we can do something ;) ).
But lately i was wondering, Can we use vala to make a program for a microcontroller, let's say an atmel uc or a pic uc?. Thanks to Andrea (sejerpz) he give's the clue to make this happend, he make a little program for an atmel controller. I make a program for the pic controller using vala+sdcc.
And finally, can we make a kernel or a module kernel for linux with vala? hmm i don't know but i'm going to try... :).
Ok, one last think, the implementation in the controllers where made with [Compact] classes, of course we don't have all the power of vala because we don't have properties, signals, etc.
Have fun :)
Matias
PS: I'm near to implement a basic kmalloc/kfree function to be used in the kernel for create objects inside the kernel... and se what happens... virtual terminals, i don't know.. ;) , just have fun...
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]