touch src/demo/website/test_favicon.ico # endit src/demo/website/Mybuild && add test_favicon.ico to it # compile & run
I made mycpuinfo
command acts like cpuinfo
# touch src/cmds/mycpuinfo.c # cp src/cmds/cpuinfo.my src/cmds/Mycpuinfo.my && endit the file: `mdoule mycpuinfo {` # add `include embox.cmd.mycpuinfo` to your conf/mods.conf # compile & run
fortunately MyBuild could detect any nested dir automatically,
So I could made mycpuinfo
command in /src/cmds/1/2/3
dir.
cp templates/x86/qemu/mods.conf conf/mods.conf
+ All your configuration is here: embox/conf/
Example: make your own printf function
# touch src/compat/libc/stdio/myprintf.c # add it to src/compat/libc/stdio/MyBuild # and don't forget to declare your function in stdio.h ))
edit file: src/kernel/init
and this two lines
+ #include <kernel/printk.h> static void kernel_init(void) { + printk("printk: Hello, from kernel_init\n");
Now your are kernel hacker Congratulations! : ))
After the following isntractions https://github.com/embox/embox#debugging then:
(GDB) b ls.c:main (gdb) win (gdb) c
Apply this patch. yes. to make every changes simple and clean.
$ git am --signoff 0001-mychar-hello-world-character-driver.patch # add this "@Runlevel(2) include embox.kernel.mychar" to conf/mods.conf
Compile & run: ls /dev
If you want to read more char samples: $ git grep "CHAR_DEV_DEF"
$ find . -depth -name "include"
:
./src/arch/x86/include ./src/arch/xen/include ./src/compat/cxx/include ./src/compat/libc/include ./src/compat/linux/include ./src/compat/posix/include ./src/include
$ find . -depth -name "fs"
:
./src/cmds/fs ./src/compat/posix/fs ./src/fs ./src/include/fs ./src/tests/fs
TODO
-
Read: Mybuild Annotations and
git grep "@Cmd"
for example