We are installing applications into Fedora, using QEMU, for RISC-V instruction set. So, we boot the RISC-V version of Fedora v29 on QEMU v. 2.12.92. Then need to install Python dependencies, using pip3 and DNF. But it goes very slowly. Is there a faster way? Such as using Spike, or risvemu, etc?
QEMU's user-mode emulation is significantly faster than the system-mode emulation, and also has the advantage of avoiding virtualized IO. Debian provides an example of how to use this support transparently, there is probably similar support for your favorite distribution.
To the best of my knowledge, there is currently no system-mode simulation that is both faster than QEMU and supports enough of a platform to boot Linux.
What are the prerequisite for compiling Linux on Cygwin?
Is it similar to compiling on a Linux PC, or do we need to add patches?
Is it similar to compiling on a Linux PC, or do we need to add patches?
I think de facto, it should be the same with mainline kernels.
The point is that you probably don't want an unmodified kernel, otherwise you wouldn't be asking how to build one. So the question is a lot more complex: Will the Linux kernel, including everything you include which might not be maintained upstream, compile successfully under Cygwin?
There's no telling that, and frankly, I don't even think it matters.
Virtualization is a relatively mature technology nowadays. Get yourself a Linux VM (there's many ready-made build systems out there), get yourself a matching virtualizer (VirtualBox will totally do), and build your kernel on a running Linux. Virtualization nowadays is the answer to these kind of questions, IMHO, because it was meant to give you the right OS for the particular job you want to do.
Compiling the Linux kernel (that's the job) nowadays is best done on a Linux system (that's the right OS for it), period.
I'm looking for to compile a minimal linux 3.5 kernel for Hyper-V.
The "selecting" hyper-v drivers part is quite easy. However, how to remove unnecessary modules/drivers and improve performance.
Read Linux Kernel in a Nutshell by Greg Kroah
http://www.kroah.com/lkn/
I want to learn it like developing some device driver etc and use QEMU for this because i have no hardware board for ARM like beagle board. What you guys suggest? Can i use Qemu simulator to learn Linux kernel on ARM targets? or any other option i should try ?
It depends on what you want to learn: hardware or software. If you really want to experiment with the different GPIO output to implement things like servo motor control, LED light blinking and display, a cheap board (eg, Raspberry Pi, about USD25) is much preferred.
But if you want to learn software in general, qemu is definitely much faster, and it lets you see the internal of what is happening. Experimenting with hardware will require oscilloscope etc. But experiment with software will depends on the error output of what others has implemented in their software.
As for drivers development, first version should be rapidly developed on QEMU. But testing which naturally involved hardware, should be done on the hardware.
Bottomline is: x86 is so much faster, that cross-crompilation is always done on x86 before it gets booted on the ARM board. Compiling on the board is too time consuming, and sometimes it may involved considerable amount of storage space for development libraries and source codes.
I used Qemu a while back to develop device drivers for an embedded programming class. It worked quite well. At the time we were learning device driver programming and then transitioning to Gumstix boards. I don't remember exactly what core we were using, but Qemu worked well.
I haven't done any ARM development, so I don't know if it is the best choice for learning ARM. But if you are new to drivers, it is probably a good place to start.
QEMU + Buildroot is great combination for ARM kernel development
Here is my setup that supports (mostly) both x86 and ARM: https://github.com/cirosantilli/linux-kernel-module-cheat
The kernel, toolchain, userland and QEMU are amazingly portable, that going from x86 to ARM is almost trivial.
Actually, you will seldom touch arch specifics, so you might as well start with x86.
I haven't played with ARM devices yet, only x86, but I bet it will be equally easy (i.e. not trivial due to lack of tutorials, but doable).
Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 months ago.
The community reviewed whether to reopen this question 6 months ago and left it closed:
Original close reason(s) were not resolved
Improve this question
Can I run a 64-bit VMware image on a 32-bit machine?
I've googled this, but there doesn't seem to be a conclusive answer.
I know that it would have to be completely emulated and would run like a dog - but slow performance isn't necessarily an issue as I'm just interested in testing some of my background services code on 64-bit platforms.
The easiest way to check your workstation is to download the VMware Processor Check for 64-Bit Compatibility tool from the VMware website.
You can't run a 64-bit VM session on a 32-bit processor. However, you can run a 64-bit VM session if you have a 64-bit processor but have installed a 32-bit host OS and your processor supports the right extensions. The tool linked above will tell you if yours does.
If you have 32-bit hardware, no, you cannot run a 64-bit guest OS. "VMware software does not emulate an instruction set for different hardware not physically present".
However, QEMU can emulate a 64-bit processor, so you could convert the VMWare machine and run it with this
From this 2008-era blog post (mirrored by archive.org):
$ cd /path/to/vmware/guestos
$ for i in \`ls *[0-9].vmdk\`; do qemu-img convert -f vmdk $i -O raw {i/vmdk/raw};done
$ cat *.raw >> guestos.img
To run it,
qemu -m 256 -hda guestos.img
The downside? Most of us runs VMware without preallocation space for the virtual disk. So, when we make a conversion from VMware to QEMU, the raw file will be the total space WITH preallocation. I am still testing with -f qcow format will it solve the
problem or not. Such as:
for i in `ls *[0-9].vmdk`; do qemu-img convert -f vmdk $i -O qcow ${i/vmdk/qcow}; done && cat *.qcow >> debian.img
Yes, running a 64-bit OS in VMWare is possible from a 32-bit OS if you have a 64 bit processor.
I have an old Intel Core 2 Duo with Windows XP Professional 2002 running on it, and I got it to work.
First of all, see if your CPU is capable of running a 64-bit OS. Search for 'Processor check for 64-bit compatibility' on the VMware site. Run the program.
If it says your processor is capable, restart your computer and go into the BIOS and see if you have 'Virtualization' and are able to enable it. I was able to and got Windows Server 2008 R2 running under VMware on this old laptop.
I hope it works for you!
If your hardware is 32-bit only, then no. If you have 64 bit hardware and a 32-bit operating system, then maybe. See Hardware and Firmware Requirements for 64-Bit Guest Operating Systems for details. It has nothing to do with one vs. multiple processors.
It boils down to whether the CPU in your machine has the the VT bit (Virtualization), and the BIOS enables you to turn it on. For instance, my laptop is a Core 2 Duo which is capable of using this. However, my BIOS doesn't enable me to turn it on.
Note that I've read that turning on this feature can slow normal operations down by 10-12%, which is why it's normally turned off.
I honestly doubt it, for a number of reasons, but the most important one is that there are some instructions that are allowed in 32-bit mode, but not in 64-bit mode. Specifically, the REX prefix that is used to encode some instructions and registers in 64-bit mode is a byte of the form 0x4f:0x40, but in 32 bit mode the same byte is either INC or DEC with a fixed operand.
Because of this, any 64-bit instruction that is prefixed by REX will be interpreted as either INC or DEC, and won't give the VMM the chance to emulate the 64-bit instruction (for instance by signaling an undefined opcode exception).
The only way it might be done is to use a trap exception to return to the VMM after each and every instruction so that it can see if it needs special 64-bit handling. I simply can't see that happening.
VMware? No. However, QEMU has an x86_64 system target that you can use. You likely won't be able to use a VMware image directly (IIRC, there's no conversion tool), but you can install the OS and such yourself and work inside it. QEMU can be a bit of a PITA to get up and running, but it tends to work quite nicely.
VMware does not allow you to run a 64-bit guest on a 32-bit host. You just have to read the documentation to find this out.
If you really want to do this, you can use QEMU, and I recommend a Linux host, but it's going to be very slow (I really mean slow).
Yes, you can. I have a 64-bit Debian running in VMware on Windows XP 32-Bit. As long as you set the Guest to use two processors, it will work just fine.
You can if your processor is 64-bit and Virtualization Technology (VT) extension is enabled (it can be switched off in BIOS). You can't do it on 32-bit processor.
To check this under Linux you just need to look into /proc/cpuinfo file. Just look for the appropriate flag (vmx for Intel processor or svm for AMD processor)
egrep '(vmx|svm)' /proc/cpuinfo
To check this under Windows you need to use a program like CPU-Z which will display your processor architecture and supported extensions.