Hello, L4 hackers and Wei Jin :-)

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..

====================
Starting kernel ...                                                                                                                         
                                                                                                                                            
                                                                                                                                            
L4 Bootstrapper                                                                                                                             
  Build: #8 Tue Apr 22 16:33:35 JST 2014, 4.6.2 20110630 (prerelease)                                                                       
  Scanning up to 1024 MB RAM    

...(omitted)

l4linux | ======> L4Linux starting... <========                                                                                             
l4linux | Linux version 3.13.0-l4-svn46 (taeung@taeung-MS-7798) (gcc version 4.6.2 20110630 (prerelease) (Freescale MAD -- Linaro 2011.07 -4
l4linux | Binary name: rom/vmlinuz.arm    

...(omitted)

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)
mount: mounting /dev/mmcblk0p2 on /mnt failed: No such device or address                                                                   
/etc/init.d/S10getconf: Couldnt mount /dev/mmcblk0p2                                                                                       
Initializing random number generator... random: dd urandom read with 1 bits of entropy available                                           
done.                                                                                                                                      
Loading libertas firmware... /lib/firmware/libertas not found!                                                                             
/etc/init.d/S30libertas_fw: exit: line 46: Illegal number: -2                                                                              
Starting network...                                                                                                                        
Cannot find device "usb0"                                                                                                                  
Cannot find device "usb0"                                                                                                                  
Cannot find device "wlan0"                                                                                                                 
Cannot find device "wlan0"                                                                                                                 
Starting dropbear sshd: OK                                                                                                                 
Loading iptables rules... /etc/iptables not found!                                                                                         
                                                                                                                                           
dnsmasq: unknown interface usb0                                                                                                            
Error for wireless request "Set Mode" (8B06) :                                                                                             
    SET failed on device wlan0 ; Invalid argument.                                                                                         
Cannot read /proc/net/wireless                                                                                                             
Error for wireless request "Set ESSID" (8B1A) :                                                                                            
    SET failed on device wlan0 ; Invalid argument.                                                                                         
net.ipv4.ip_forward = 1                                                                                                                    
/ #
====================

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 '.

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 ?

I would appreciate if anyone answer.

- Taeung -