Problem with L4re and L4Linux on Qemu/VMware

Daniel (Xiaolong) Wang xiaolongw at mail.usf.edu
Fri Jun 23 19:08:15 CEST 2017


Thank you very much Adam! I pressed entered but no matter what I do it just hang there without loading the Linux kernel. It is the same situation on both QEMU and VMware.

I think it might be somehow related to the virtual environment (QEMU or VMware). After I tried that I decided to test on a real board, then it works (even though it shows some weird problems). I think it might be helpful to post here, in case there are newbies like me who is also confused (I’m sure lots of people in this community knew this already). My test board is a BeagleBone Black (BBB).

1. I first compiled the fiasco kernel: (Architecture -> ARM processor family, Platform -> TI OMAP, CPU -> ARM Cortex-A8 CPU) 
# make B=build-armx335
# cd build-arm335
# make config CROSS_COMPILE=arm-linux-gnueabi-

2. Compiled L4re: (Target Architecture -> ARM, CPU variant -> ARMv7A type CPU, Platform Selection -> TI OMAP AM33x)
# make O=builddir config CROSS_COMPILE=arm-linux-gnueabi-

3. Compiled L4Linux: (setup L4Linux Configuration path, Target architecture -> ARM architecture, System type -> Build type -> Use ARMv7)
# make O=build-arm arm_defconfig
# make O=build-arm menuconfig

4. build uboot-able image
copy all modules (fiasco + vmlinuz + cfg + modules.list + ramdisk-arm.rd + arm-rv.io <http://arm-rv.io/>, etc.) to ${L4re/buildDir/bin/arm_armv7a}
# make uimage O=build-arm MODULE_SEARCH_PATH=${L4re/buildDir/bin/arm_armv7a} CROSS_COMPILE=arm-linux-gnueabi-

5. make a new FAT32 SD card, then copy the new built bootstrap_L4Linux-basic.uimage into the SD card (BBB already has a built-in uboot-SPL in ROM).

6. boot the BBB and press enter to interrupt the uboot default procedure (initially I was using uboot go command, that does not work).
# fathead mmc 0 ${loadaddr} bootstrap_L4Linux-basic.uimage
# bootm ${loadaddr} 

Finally I see the L4Linux gets boot (attached log). But I’m not sure if I did anything wrong or because the hardware issue. After the L4Linux boot, in 5 seconds the terminal print out the following and reboot into the onboard Linux (see the attached log file):

	# _fat_os: error reading image args, err - -1
	# reading u-boot.img
	# reading u-boot.img

Have anyone see this issue? Any further advice would be much appreciated!

Other Questions: 
	1. Assume I got the L4Linux how can i further build a full fledge Linux environment with Libraries and drivers, I assume those things will need to somehow get into the RAMDISK, is that right? (Sorry I’m a newbie I’m not familiar with this)
	2. I want to create a native app on Fiasco+L4re and communicate with the L4Linux Ethernet driver, is there any references for constructing communication between the VM and native apps? 


Thanks
-Dan

> On Jun 22, 2017, at 5:44 PM, Adam Lackorzynski <adam at os.inf.tu-dresden.de> wrote:
> 
> 
> On Wed Jun 21, 2017 at 16:25:01 -0500, Daniel (Xiaolong) Wang wrote:
>> I’m sorry to bother, again… But I keep getting problems hope you can give me some advice.
>> 
>> I’m trying to test out L4re +L4Linux on X86 and ARM i.MX6. I downloaded the newest l4re-snapshot-2006082114. I built Fiasco with Intel Pentium Pro and Virtualization (did not change anything else).
>> I built L4re with Pentium Pro type CPU (everything else are default settings). Then I built L4Linux with the L4re builddir. I turned off 64-bit kernel, CPU selected Pentium-Pro, turned off most of the settings as the warning instructed. 
>> 
>> These are the settings of L4Linux that I enabled:
>> 
>> Processor type and features:
>> 	* DMA memory allocation support
>> 	* Processor feature human-readable name
>> 	* Fast CPU feature tests
>> 	* Support for extended X86 platform
>> 	* Single-depth WCHAN output
>> 	* High memory support is OFF
>> 	* Enable bounce buffers
>> 	* X86 architectural random number generator
>> 	* Enable seccomp to safety compute untrusted bytecode
>> 	* Enable the LDT
>> 
>> Power Management and ACPI options:
>> 	* Suspend to RAM and standby
>> 	* device power management core functionality
>> 	* CPU Frequency scaling is OFF
>> Bus Options:
>> 	* PCI support
>> 	* PCI access mode is Direct
> 
> That's ok. You can also use one of the defconfigs, e.g.
> x86_32-mp_vPCI_defconfig.
> 
>> I was able to compile all three parts and build both iso image (for vmware fusion on macOS) and qemu simulator. I first tested hello, hello-cfg, hello-shared, frame buffer-example-x86, all of those works as expected.
> 
> Ok, good.
> 
>> However when I tried to build L4Linux-basic and L4Linux-mag-x86. Not of them works.
>> 
>> for L4Linux-mag-x86 the system shows a diagram “system is booting” then hang forever.
> 
> In such a case it is essential to have the serial output to see what's
> going on as we won't see anything on the graphical screen in this case.
> 
>> for L4Linux-basic the image boot but freeze soon. The screen shows:
>> 
>> 	l4cdds: No name given, not starting
>> 	brd: module loaded
>> 	l4cdds: no name given, not starting
>> 	moused: ps/2 mouse device common for all mice
>> 	l4x: Faking dummy RTC
>> 	rtc_cmos rtc_cmos: rtc core: registered rtc_cmos as rtc0
>> 	rtc_cmos rtc_cmos: only 24-hr supported
>> 	rtc_l4x: l4x-rtc: Could not find ‘rtc’ cap
>> 	rtc_l4x: probe of rtc-l4x failed with error -2
>> 	NET: Registered protocol family 17
>> 	L4IRQ: set irq type of 64 to 1
>>     	RAMDISK: ext2 filesystem found at block 0
>> 	RAMDISK: Loading 3072KiB [1 disk] into ram disk… done.
>> 	VFS: Mounted root (ext2 filesystem) on device 1:0.
>> 	Freeing unused kernel memory 188K (00494000 - 004c3000)
>> 	Write protecting the kernel text: 2684K
>> 	Write protecting the kernel read-only data 768k
>> 	rodata_test: test data was not read only
>> 
>> 	Please press Enter to activate this console. clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x2845e81c5f6, max-idle_ns: 440795276432 ns
>> 	clocksource: Switched to clocksource tsc
> 
> That actually looks good. It finished booting as it is supposed to do.
> Is input not working, i.e. pressing enter?
> 
> 
> 
> Adam
> 
> _______________________________________________
> l4-hackers mailing list
> l4-hackers at os.inf.tu-dresden.de
> http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://os.inf.tu-dresden.de/pipermail/l4-hackers/attachments/20170623/c90b4ce6/attachment.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: l4linux-basic-log.txt
URL: <http://os.inf.tu-dresden.de/pipermail/l4-hackers/attachments/20170623/c90b4ce6/attachment-0001.txt>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://os.inf.tu-dresden.de/pipermail/l4-hackers/attachments/20170623/c90b4ce6/attachment-0001.htm>


More information about the l4-hackers mailing list