Hi,
Have you tried to build kernel modules and run it on L4linux? I read [1] and followed the instructions given by that document. 1. I built a "Hello world" Kernel module by following [2], then I got my .ko file. 2. I mounted my L4linux Ramdisk and copied my hello.ko into the Ramdisk 3. In src/l4/conf/examples/l4lxgfx.cfg, I add a kernel parameter: l4bdds.add=rom/hello.ko, as shown below: -- Start Linux loader:start( { .......... }, "rom/" .. lxname .. " mem=64M console=tty0 l4x_rd=rom/ramdisk-" .. L4.Info.arch() .. ".rd root=1:0 ramdisk_size=4000 init=/bin/sh l4bdds.add=rom/hello.ko");
But, when I booted the L4linux, I couldn't find the /dev/l4bdds0. Any opinion about this?
Regards,
Irvanda
[1] http://os.inf.tu-dresden.de/Studium/KMB/WS2013/Exercise3-L4Linux.pdf [2] http://www.tldp.org/LDP/lkmpg/2.6/html/x181.html
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 18.02.2014 07:36, Irvanda Kurniadi wrote:
Hi,
Have you tried to build kernel modules and run it on L4linux? I read [1] and followed the instructions given by that document. 1. I built a "Hello world" Kernel module by following [2], then I got my .ko file.
Did you enable CONFIG_L4_BLK_DS_DRV in the L4Linux configuration?
Bjoern
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Yes I did. I just checked the .config file # Stub drivers CONFIG_L4_BLK_DS_DRV=y
Are you getting any messages about a missing file during Linux bootup? For the file to be available through l4bdds it needs to be passed as a module in the respective menu.lst entry.
But, wait...
- I mounted my L4linux Ramdisk and copied my hello.ko into the
Ramdisk
if you already copied hello.ko to the ramdisk, there is no need to add it through l4bdds. The file is already there and all you need to do is "insmod hello.ko"?
Bjoern
On Tue, Feb 18, 2014 at 11:10 PM, Björn Döbel doebel@os.inf.tu-dresden.dewrote:
Yes I did. I just checked the .config file # Stub drivers CONFIG_L4_BLK_DS_DRV=y
Are you getting any messages about a missing file during Linux bootup? For the file to be available through l4bdds it needs to be passed as a module in the respective menu.lst entry.
There was no message about missing file. But I didn't put any addition line inside the modules.list entry. I don't know whether this is the cause of the problem.
But, wait...
- I mounted my L4linux Ramdisk and copied my hello.ko into the
Ramdisk
if you already copied hello.ko to the ramdisk, there is no need to add it through l4bdds. The file is already there and all you need to do is "insmod hello.ko"?
When I tried to insmod hello.ko, I got error message: Invalid module format So btw, if my kernel module has been placed inside the Ramdisk, I don't need to use the l4bdds? Because I just followed the instruction before and don't know what to do with that kernel module file.
regards,
Irvanda
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 18.02.2014 15:43, Irvanda Kurniadi wrote:
On Tue, Feb 18, 2014 at 11:10 PM, Björn Döbel doebel@os.inf.tu-dresden.dewrote:
Yes I did. I just checked the .config file # Stub drivers CONFIG_L4_BLK_DS_DRV=y
Are you getting any messages about a missing file during Linux bootup? For the file to be available through l4bdds it needs to be passed as a module in the respective menu.lst entry.
There was no message about missing file. But I didn't put any addition line inside the modules.list entry. I don't know whether this is the cause of the problem.
Yes it was, but in this case there should be a warning from L4BDDS that it could not find the file rom/hello.ko somewhere on the serial line.
But, wait...
- I mounted my L4linux Ramdisk and copied my hello.ko into
the Ramdisk
if you already copied hello.ko to the ramdisk, there is no need to add it through l4bdds. The file is already there and all you need to do is "insmod hello.ko"?
When I tried to insmod hello.ko, I got error message: Invalid module format So btw, if my kernel module has been placed inside the Ramdisk, I don't need to use the l4bdds? Because I just followed the instruction before and don't know what to do with that kernel module file.
The exercise slides say you have two options: Either you mount the ramdisk as root and put your file there. If this is impossible because you cannot be root on your machine, you will need to circumvent this. This is where the l4bdds solution comes into play.
In your case, the module seems to be available, there's just something wrong with it. When you compiled the module, did you configure the correct L4Linux build directory in the Makefile?
Bjoern
On Wed, Feb 19, 2014 at 12:01 AM, Björn Döbel doebel@os.inf.tu-dresden.dewrote:
In your case, the module seems to be available, there's just something wrong with it. When you compiled the module, did you configure the correct L4Linux build directory in the Makefile?
I didn't configure using l4linux build directory. Is it something like L4DIR = ../.. ? I just followed the instruction to make kernel modules shown in tldp.org. Can you point an example of Makefile to to build kernel modules for L4Linux?
Regards,
Irvanda
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 19.02.2014 08:52, Irvanda Kurniadi wrote:
On Wed, Feb 19, 2014 at 12:01 AM, Björn Döbel doebel@os.inf.tu-dresden.dewrote:
In your case, the module seems to be available, there's just something wrong with it. When you compiled the module, did you configure the correct L4Linux build directory in the Makefile?
I didn't configure using l4linux build directory. Is it something like L4DIR = ../.. ? I just followed the instruction to make kernel modules shown in tldp.org. Can you point an example of Makefile to to build kernel modules for L4Linux?
The TLDP guide is fine. The point is you cannot copy&paste their Makefiles, because these will use "/lib/modules/$(shell uname - -r/build" as the kernel build directory. This however refers to the Linux kernel on your build machine, not the L4Linux one. Replace this path with your L4Linux build dir, so that you build a kernel module for L4Linux and not for your local machine.
Bjoern
l4-hackers@os.inf.tu-dresden.de