Camkes x86 VM Build Error
Hi, I am using Ubuntu 16.04 on 64 Bit, i7 machine and running the CAmkES x86 VM instructions available at: https://docs.sel4.systems/CAmkESVM After running: ../init-build.sh -DCAMKES_VM_APP=minimal I am getting the following error: -------------------------------------------------------------------------------------------------------------------------------- camkes-gen.cmake is out of date. Regenerating... CMake Error at tools/camkes/camkes.cmake:593 (message): Failed to generate camkes-gen.cmake: Traceback (most recent call last): File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/home/goyal/sel4/camkes_vm/tools/camkes/camkes/runner/__main__.py", line 678, in <module> sys.exit(main(sys.argv, sys.stdout, sys.stderr)) File "/home/goyal/sel4/camkes_vm/tools/camkes/camkes/runner/__main__.py", line 515, in main instantiate_misc_templates(renderoptions) File "/home/goyal/sel4/camkes_vm/tools/camkes/camkes/runner/__main__.py", line 509, in instantiate_misc_templates outfile_name=outfile.name, imported=read, options=renderoptions) File "/home/goyal/sel4/camkes_vm/tools/camkes/camkes/runner/Renderer.py", line 109, in render self.templates, **kwargs) File "/home/goyal/sel4/camkes_vm/tools/camkes/camkes/runner/Context.py", line 261, in new_context }.items()) + list(kwargs.items())) AttributeError: type object 'ObjectType' has no attribute '__members__' Call Stack (most recent call first): CMakeLists.txt:35 (GenerateCAmkESRootserver) -- Configuring incomplete, errors occurred! See also "/home/goyal/sel4/camkes_vm/build_vm/CMakeFiles/CMakeOutput.log". ------------------------------------------------------------------------------------------------------------------------------- I also tried to run the same instructions on a different machine (Ubuntu 16.04, 64 Bit, i5 machine) on which ../init-build.sh -DCAMKES_VM_APP=minimal is run successfully. It gets stuck on running ninja. I am getting the following error: -------------------------------------------------------------------------------------------------------------------------------- ghc-8.0.2: 106.97 MiB / 107.55 MiB ( 99.47%) downloaded... ghc-8.0.2: 107.24 MiB / 107.55 MiB ( 99.71%) downloaded... ghc-8.0.2: 107.50 MiB / 107.55 MiB ( 99.96%) downloaded... ghc-8.0.2: 107.55 MiB / 107.55 MiB (100.00%) downloaded... /home/akshat/.stack/programs/x86_64-linux/ghc-8.0.2.tar.xz.tmp: renameFile:renamePath:rename: does not exist (No such file or directory) Makefile:45: recipe for target 'parse-capDL' failed make: *** [parse-capDL] Error 1 ninja: build stopped: subcommand failed. -------------------------------------------------------------------------------------------------------------------------------- Can someone suggest a way out for both the problems. -- Thanks and Regards, Amit Goyal
Hi Amit,
For your first error, installing the pip package enum34 may fix your error which appears to be due to an incompatible Enum library being imported (https://stackoverflow.com/a/1695250)
For your second error, if you change into the directory projects/capdl/capDL-tool and run "make" does the parse-capDL rule complete successfully? If this is the case then calling ninja again in the build directory should allow your build to continue.
Kind regards,
Kent.
________________________________________
From: Devel
Thanks Kent. I could successfully run ninja on both the machines. I have installed KVM and enabled VTx and nested virtualisation with KVM guests. I could not find the simulate script in the build folder and thus could not run: sudo ./simulate --machine q35,accel=kvm,kernel-irqchip=split --mem-size 2G --extra-cpu-opts "+vmx" --extra-qemu-args="-enable-kvm -device intel-iommu,intremap=off -net nic,model=e1000 -net tap,script=no,ifname=tap0" Further, I ran the following command: qemu-system-x86_64 -cpu Nehalem,-vme,+pdpe1gb,-xsave,-xsaveopt,-xsavec,-fsgsbase,-invpcid,enforce -nographic -serial mon:stdio -kernel /home/goyal/sel4/camkes_vm/build_vm/images/kernel-ia32-pc99 -initrd /home/goyal/sel4/camkes_vm/build_vm1/images/capdl-loader-image-ia32-pc99 --machine q35,accel=kvm -m size=2G and obtained the following error: ELF-loading userland images from boot modules: size=0x2018000 v_entry=0x8051905 v_start=0x8048000 v_end=0xa060000 p_start=0x174c000 p_end=0x3764000 Moving loaded userland images to final location: from=0x174c000 to=0x148000 size=0x2018000 Starting node #0 with APIC ID 0 XSAVE not supported seL4 called fail at /home/goyal/sel4/camkes_vm/kernel/src/arch/x86/kernel/boot_sys.c:785 in function boot_sys, saying "boot_sys failed for some reason :( " halting... Kernel entry via Interrupt, irq 0 QEMU: Terminated Then, I ran the following command: sudo qemu-system-x86_64 -machine q35,accel=kvm,kernel-irqchip=split -cpu Haswell,+vme,+pdpe1gb,enforce,+vmx -nographic -serial mon:stdio -m size=2G -enable-kvm -device intel-iommu,intremap=off -kernel images/kernel-ia32-pc99 -initrd images/capdl-loader-image-ia32-pc99 which gives the following error: qemu-system-x86_64: Invalid parameter type for 'kernel-irqchip', expected: boolean Please suggest, how to run the application? -- Thanks and Regards, Amit Goyal On 2018-10-29 19:03, Kent.Mcleod@data61.csiro.au wrote:
Hi Amit,
For your first error, installing the pip package enum34 may fix your error which appears to be due to an incompatible Enum library being imported (https://stackoverflow.com/a/1695250)
For your second error, if you change into the directory projects/capdl/capDL-tool and run "make" does the parse-capDL rule complete successfully? If this is the case then calling ninja again in the build directory should allow your build to continue.
Kind regards,
Kent. ________________________________________ From: Devel
on behalf of Amit Goyal Sent: Monday, October 29, 2018 6:17 AM To: devel@sel4.systems Subject: [seL4] Camkes x86 VM Build Error Hi,
I am using Ubuntu 16.04 on 64 Bit, i7 machine and running the CAmkES x86 VM instructions available at: https://docs.sel4.systems/CAmkESVM
After running: ../init-build.sh -DCAMKES_VM_APP=minimal
I am getting the following error:
-------------------------------------------------------------------------------------------------------------------------------- camkes-gen.cmake is out of date. Regenerating... CMake Error at tools/camkes/camkes.cmake:593 (message): Failed to generate camkes-gen.cmake: Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/home/goyal/sel4/camkes_vm/tools/camkes/camkes/runner/__main__.py", line 678, in <module> sys.exit(main(sys.argv, sys.stdout, sys.stderr)) File "/home/goyal/sel4/camkes_vm/tools/camkes/camkes/runner/__main__.py", line 515, in main instantiate_misc_templates(renderoptions) File "/home/goyal/sel4/camkes_vm/tools/camkes/camkes/runner/__main__.py", line 509, in instantiate_misc_templates outfile_name=outfile.name, imported=read, options=renderoptions) File "/home/goyal/sel4/camkes_vm/tools/camkes/camkes/runner/Renderer.py", line 109, in render self.templates, **kwargs) File "/home/goyal/sel4/camkes_vm/tools/camkes/camkes/runner/Context.py", line 261, in new_context }.items()) + list(kwargs.items()))
AttributeError: type object 'ObjectType' has no attribute '__members__'
Call Stack (most recent call first): CMakeLists.txt:35 (GenerateCAmkESRootserver)
-- Configuring incomplete, errors occurred! See also "/home/goyal/sel4/camkes_vm/build_vm/CMakeFiles/CMakeOutput.log".
-------------------------------------------------------------------------------------------------------------------------------
I also tried to run the same instructions on a different machine (Ubuntu 16.04, 64 Bit, i5 machine) on which ../init-build.sh -DCAMKES_VM_APP=minimal is run successfully.
It gets stuck on running ninja.
I am getting the following error:
-------------------------------------------------------------------------------------------------------------------------------- ghc-8.0.2: 106.97 MiB / 107.55 MiB ( 99.47%) downloaded... ghc-8.0.2: 107.24 MiB / 107.55 MiB ( 99.71%) downloaded... ghc-8.0.2: 107.50 MiB / 107.55 MiB ( 99.96%) downloaded... ghc-8.0.2: 107.55 MiB / 107.55 MiB (100.00%) downloaded... /home/akshat/.stack/programs/x86_64-linux/ghc-8.0.2.tar.xz.tmp: renameFile:renamePath:rename: does not exist (No such file or directory) Makefile:45: recipe for target 'parse-capDL' failed make: *** [parse-capDL] Error 1 ninja: build stopped: subcommand failed.
--------------------------------------------------------------------------------------------------------------------------------
Can someone suggest a way out for both the problems.
-- Thanks and Regards, Amit Goyal
_______________________________________________ Devel mailing list Devel@sel4.systems https://sel4.systems/lists/listinfo/devel
Hi Amit, We added a SIMULATION option to the camkes-vm-examples project today. To update the project with the new changes: repo sync then in the build directory, the following call will reconfigure the build for a simulated target: "cmake -DSIMULATION=ON ." (This requires an already initialised build directory. If reinitialising from scratch then the following command can be used: "../init-build.sh -DCAMKES_VM_APP=minimal -DSIMULATION=ON") "ninja" This should then give you a ./simulate script, and build the kernel with features that are supported by qemu. (You may need sudo for the ./simulate call) ./simulate --machine q35,accel=kvm,kernel-irqchip=split --mem-size 2G --extra-cpu-opts "+vmx" --extra-qemu-args="-enable-kvm -device intel-iommu,intremap=off -net nic,model=e1000 -net tap,script=no,ifname=tap0" Does this fix your problem? Kind regards, Kent
participants (2)
-
Amit Goyal
-
Kent.Mcleod@data61.csiro.au