sd_card driver for i.mx53 time out

lzSun 1137480042 at qq.com
Mon Nov 19 10:38:15 CET 2018


Hi,all
I mentioned in  previous email that I am trying to use the file system in the tz_vmm demo and use the SD card as a storage device which is formatted as ext2. Now I have included sd_card driver, part_blk, rump_fs etc. in the tz_vmm.run script which I show it in [1]. But when I try to create a file in tz_vmm, I get this error:
[init -> tz_vmm] --- start test ---                                             
[init -> tz_vmm] current working directory : /                                  
[init -> sd_card_drv] Error: wait till issuing a new command is allowed timed out

I have no idea how to fix this problem, so I want to ask for your help. I also provide my test code in [2].
In addition, I saw in this link: 
https://sourceforge.net/p/genode/mailman/genode-main/thread/CABDqRrJei5p5JyM_p3Gc5xiX8pOZsMssdXOU_LDc4-QMGBDf8w%40mail.gmail.com/#msg34609867 , Martin said "Be aware, that you should not run 'sd_card' with Genodes Trustzone feature-set (platform 'hw_imx53_qsb_tz'), because Genode will then declare the ESDHC-IRQ to be unsecure to enable Linux to drive SD cards. Use the platform 'hw_imx53_qsb' instead when issuing 'create_builddir'. I know he is targeting genode 15.08, so I want to know how about this situation in Genode's latest version? If genode can directly drive the SD card now , does this meas the SD card can not accessed by linux because the ESDHC-IRQ is configured to be secure ?
Thanks for your help in advance! 



[1] part of tz_vmm.run script:
<start name="platform_drv">
		<resource name="RAM" quantum="3M"/>
		<provides>
			<service name="Regulator"/>
			<service name="Platform"/>
		</provides>
	</start>
	<start name="sd_card_drv">
		<resource name="RAM" quantum="3M"/>
		<provides><service name="Block"/></provides>
	</start>
	<start name="part_blk">
		<resource name="RAM" quantum="10M" />
		<provides><service name="Block" /></provides>
		<route>
			<service name="Block"><child name="sd_card_drv" /></service>
			<any-service><parent/><any-child/></any-service>
		</route>
		<config>
			<policy label_prefix="rump_fs" partition="1" writeable="yes"/>
		</config>
	</start>
	<start name="rump_fs" caps="200">
    	<resource name="RAM" quantum="16M"/>
    	<provides><service name="File_system"/></provides>
   		<config fs="ext2fs">
     		<policy label_prefix="" root="/" writeable="yes"/>
    	</config>
   		<route>
     		<service name="Block"> <child name="part_blk"/> </service>
     		<any-service> <parent/> <any-child/> </any-service>
   		</route>
    </start>

<start name="tz_vmm" caps="400">
		<resource name="RAM" quantum="160M"/>
		<config>
      		<vfs> 
        		<tar name="darknet.tar"/>
        		<dir name="dev"> 
        			<log/> 
        			<inline name="rtc">2000-01-01 00:00</inline> 
        		</dir> 
        		<fs/>
      		</vfs>
      		<libc stdout="/dev/log" stderr="/dev/log" rtc="/dev/rtc" />
      	</config>



[2] test code:
       int fd;
	ssize_t n;
	off_t offset;
    static char buf[16384];
    static char str[] = "hello,world!";


	printf("--- start test ---\n");


    getcwd(buf, sizeof(buf));
    printf("current working directory : %s\n", buf);
	fd = open("file.txt",O_WRONLY|O_CREAT);
	if (fd == -1) {
		perror("open");
		return;
	}
	n = write(fd, str, sizeof (str));
    printf("write %d bytes.\n",n);
    close(fd);
    printf("--- test finished ---\n");

------------------
Best wishes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genode.org/pipermail/users/attachments/20181119/e66471ab/attachment.html>


More information about the users mailing list