Pages

Showing posts with label qemu. Show all posts
Showing posts with label qemu. Show all posts

Sunday, April 11, 2021

Fedora 34 : Testing the new Fedora 34 beta.

Approaching the release date for Fedora Linux 34, the development team has included a number of testing steps.
For each test stage, some events were set up in which users participate and test the new Fedora distribution. Here are these see events.
Here is a screenshot with the virtualization test step for the ISO file called Fedora 34: x86_64 DVD ISO Beta! from the official page:

Friday, June 15, 2018

Fedora 28 : ARM programming and testing .

This is a simple tutorial about ARM programming and QEMU:
The test.c program is this :
volatile unsigned int * const UART0DR = (unsigned int *)0x101f1000;
 
void print_uart0(const char *s) {
 while(*s != '\0') { /* Loop until end of string */
 *UART0DR = (unsigned int)(*s); /* Transmit char */
 s++; /* Next char */
 }
}
 
void c_entry() {
 print_uart0("Hello world!\n");
}

Using volatile keyword is necessary to instruct the compiler that the memory pointed.
The unsigned int type enforces 32-bits read and write access.
The QEMU model like in a real system on chip the Transmit FIFO Full flag must be checked in the UARTFR register before writing on the UARTDR register.
Create the startup.s assembler file:
.global _Reset
_Reset:
 LDR sp, =stack_top
 BL c_entry
 B .
Create the script linker named test.ld:
ENTRY(_Reset)
SECTIONS
{
 . = 0x10000;
 .startup . : { startup.o(.text) }
 .text : { *(.text) }
 .data : { *(.data) }
 .bss : { *(.bss COMMON) }
 . = ALIGN(8);
 . = . + 0x1000; /* 4kB of stack memory */
 stack_top = .;
}
Next step is the install of arm-none-eabi x86_64 tools :
[root@desk arm-source]# dnf install arm-none-eabi-gcc-cs-c++.x86_64 
Last metadata expiration check: 1:54:04 ago on Fri 15 Jun 2018 06:55:54 PM EEST.
Package arm-none-eabi-gcc-cs-c++-1:7.1.0-5.fc27.x86_64 is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!
[root@desk arm-source]# dnf install arm-none-eabi-gdb.x86_64 
Last metadata expiration check: 1:54:48 ago on Fri 15 Jun 2018 06:55:54 PM EEST.
Package arm-none-eabi-gdb-7.6.2-4.fc24.x86_64 is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!
[mythcat@desk arm-source]$ ll
total 12
-rw-rw-r--. 1 mythcat mythcat  60 Jun 15 20:28 startup.s
-rw-rw-r--. 1 mythcat mythcat 288 Jun 15 20:26 test.c
-rw-rw-r--. 1 mythcat mythcat 223 Jun 15 20:29 test.ld
Let's test this with qemu virtual tool ( use Ctr+A and X keys to stop qemu) :
[mythcat@desk arm-source]$ qemu-system-arm -M versatilepb -m 64M -nographic -kernel test.bin
pulseaudio: set_sink_input_volume() failed
pulseaudio: Reason: Invalid argument
pulseaudio: set_sink_input_mute() failed
pulseaudio: Reason: Invalid argument
Hello world!
QEMU: Terminated

Tuesday, March 14, 2017

QEMU - Devil Linux on Fedora 25.

QEMU (short for Quick Emulator) is a free and open-source hosted hypervisor that performs hardware virtualization QEMU is a hosted virtual machine monitor. You can install this software using dnf tool.
dnf install qemu.x86_64 
You can use any iso image from internet to run and test your distro linux. Just use this command:
I tested with Devil Linux iso without network ( the main reason was the settings of Devil Linux distro).
qemu-system-x86_64 -boot d -cdrom ~/devil-linux-1.8.0-rc2-x86_64/bootcd.iso --enable-kvm -m 2048
 -netdev user,id=user.0
Some args of qemu tool:
- qemu-system-x86_64 is the option for x86 architecture (64 bit);
- boot and -d set options for booting and debug;
- the -cdrom option set the iso file path and file;
- the --enable-kvm enable Kernel Virtual Machine;
- the -m 2048 set memory;
- the -netdev user,id=user.0 that tells us about qemu to use the user mode network stack which requires no administrator privilege to run;  
About QEMU VLAN.
QEMU networking uses a networking technology that is like VLAN. The QEMU forward packets to guest operating systems that are on the same VLAN. Examples with qemu-kvm options:
-net nic,model=virtio,vlan=0,macaddr=00:16:3e:00:01:01 
-net tap,vlan=0,script=/root/ifup-br0,downscript=/root/ifdown-br0 
-net nic,model=virtio,vlan=1,macaddr=00:16:3e:00:01:02 
-net tap,vlan=1,script=/root/ifup-br1,downscript=/root/ifdown-br1
- net nic command defines a network adapter in the guest operating system. - net tap command defines how QEMU configures the host. You can disabling networking entirely:
-net none