Re: [Vala] [Having fun with Vala] Multiboot kernel using Vala!
- From: Feng Yu <rainwoodman gmail com>
- To: Matías De la Puente <mfpuente ar gmail com>
- Cc: vala-list <vala-list gnome org>
- Subject: Re: [Vala] [Having fun with Vala] Multiboot kernel using Vala!
- Date: Wed, 11 Feb 2009 13:59:25 -0500
The GType system is relatively independent though.
Is it possible to write the kernel with GType by
(1) implementing g_mem_vtable
(2) staticly link to glib and gobject
(3) asking the linker to ignore all unresolved symbols, or remove all
unused text segments. mostly they will be the posix related functions
wouldn't them?
I am not quite familiar with linkers, will (3) be feasible?
Yu
On Wed, Feb 11, 2009 at 1:17 PM, Matías De la Puente
<mfpuente ar gmail com> wrote:
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]