Can you confirm whether or not I secure devices on L4 Linux ?
Adam Lackorzynski
adam at os.inf.tu-dresden.de
Thu Apr 24 23:16:39 CEST 2014
Hi,
On Thu Apr 24, 2014 at 11:21:18 +0900, Taeung wrote:
> I'm trying to secure devices which are 'SD card' and 'Ethernet' on L4 Linux.
> Can you confirm whether or not I secure devices on L4 Linux ?
> Sorry for long my mail..
>
> The try I've done is as follows ..
>
> 1) 'l4lx-vbus.io' file I've modified
> ====================
> # vim:set ft=ioconfig:
> # configuration file for io
>
> l4linux => new System_bus()
> {
> NIC => wrap(hw-root.NIC);
> FLASHMEMORY => wrap(hw-root.FLASHMEMORY);
> }
> ====================
>
> 2) 'arm-rv-eb-mc.devs' file I've modified using IRQ and MMIO information in
> my board's DataSheet .
> (My board is 'Freescale imx6 Quad SABRE SD')
> ====================
> local Hw = Io.Hw
> local Res = Io.Res
>
> Io.hw_add_devices
> {
>
> FLASHMEMORY = Hw.Device
> {
> hid = "flashmemory";
> Res.mmio(0x02198000 , 0x0219BFFF);
> Res.irq(56);
> },
>
> NIC = Hw.Device
> {
> hid = "freescale";
> Res.mmio(0x02188000, 0x0218BFFF);
> Res.irq(150);
> Res.irq(151);
> },
> }
> ====================
>
> 3) l4lx_xs.cfg I've modified.
> ====================
> local lxname = "vmlinuz";
> if L4.Info.arch() == "arm" then
> lxname = "vmlinuz.arm";
> end
>
> loader = L4.default_loader;
>
> vbus_l4linux = loader:new_channel();
>
> -- Start io & flash memory
>
> loader:start(
> { caps = { sigma0 =
> L4.cast(L4.Proto.Factory,L4.Env.sigma0):create(L4.Proto.Sigma0);
> icu = L4.Env.icu;
> l4linux = vbus_l4linux:svr();
> },
> log = { "IO", "y" },
> l4re_dbg = L4.Dbg.Warn,
> }, "rom/io rom/arm-rv-eb-mc.devs rom/l4lx-vbus.io");
>
>
> L4.default_loader:start(
> { caps = {
> log = L4.Env.log:m("rws"),
> vbus = vbus_l4linux;
> },
> l4re_dbg = L4.Dbg.Warn,
> log = { "l4linux", "yellow" },
> }, "rom/" .. lxname .. " mem=64M vmalloc=4M console=ttyLv0
> l4x_rd=rom/ramdisk-arm.rd root=1:0 rw ramdisk_size=20480 init=/linuxrc
> debug");
> ====================
>
> 4) I've modified 'modules.list'
> 5) I found something about device on L4 Linux booting log as follows..
The configs look good.
> l4linux | Device scan:
> l4linux | Device: (noname)
> l4linux | Device: NIC
> l4linux | MEM: 02188000 - 0218bfff
> l4linux | IRQ: 00000096 - 00000096
> l4linux | IRQ: 00000097 - 00000097
> l4linux | Device: FLASHMEMORY
> l4linux | MEM: 02198000 - 0219bfff
> l4linux | IRQ: 00000038 - 00000038
> l4linux | Device scan done.
>
> ||
> ||||...(omitted)
>
> |||DMA: preallocated 256 KiB pool for atomic coherent allocations
> Added static device '(noname)' with 0 resources.
> Added static device 'NIC' with 3 resources.
> Added static device 'FLASHMEMORY' with 2 resources.
>
> ...(|||omitted|)
>
> mmcblk driver (I've added 'pr_info("|||mmcblk driver|");' in __init function of mmc device driver source code.)
>
> ...(|||omitted|)|
Here I'd suggest you start L4Linux with init=/bin/sh to not start the
system right away but check whether devices are ok. For the block
device, there must be some output about partitions for example (also
make sure CONFIG_MSDOS_PARTITION is enabled), like this:
mmc0: new high speed SDHC card at address b368
mmcblk0: mmc0:b368 USD 3.72 GiB
mmcblk0: p1 p2
You can also check /proc/partitions (mount it before).
For the network, there must be a network device. Check that with
ifconfig -a whether there's an eth0.
>
> I guess that devices is secured through being registered in io server but
> network could not be run because there is not FEC ethernet driver.
> (For reference, my board's ethernet use 'FEC Ethernet Driver' )
>
> However I don't know why could not run 'mount /dev/mmcblk0p1 /mnt '.
Likely because the driver that some issues finishing its initialization?
Did it run its probe function to the point where it does return 0?
> Do I secure devices on L4 Linux successfully ?
> If I only make drivers for its to run successfully , can I access 'SD card'
> and 'Ethernet' on L4Linux ?
> Or is my guess wrong ?
No, you're on the way.
Adam
--
Adam adam at os.inf.tu-dresden.de
Lackorzynski http://os.inf.tu-dresden.de/~adam/
More information about the l4-hackers
mailing list