Created
July 20, 2016 05:31
-
-
Save rchatsiri/879f6a88e6bb26c309b778b4250b59b9 to your computer and use it in GitHub Desktop.
Simple start includeos
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/sdc1/workspacecpp/IncludeOS/examples/demo_service ~/sdc1/workspacecpp/IncludeOS | |
>> Compiling the service | |
/usr/bin/clang-3.7 -target i686-elf -mstackrealign -fstack-protector-all -msse3 -O2 -Wall -Wextra -c -m32 -std=c++14 -I/home/rchatsiri/IncludeOS_install/libcxx/include -I/home/rchatsiri/IncludeOS_install/api/sys -I/home/rchatsiri/IncludeOS_install/newlib/include -I/home/rchatsiri/IncludeOS_install/api -I/home/rchatsiri/IncludeOS_install/mod/GSL/include -D_LIBCPP_HAS_NO_THREADS=1 -D_GNU_SOURCE -o service.o service.cpp | |
/usr/bin/clang-3.7 -target i686-elf -mstackrealign -fstack-protector-all -msse3 -O2 -Wall -Wextra -c -m32 -std=c++14 -I/home/rchatsiri/IncludeOS_install/libcxx/include -I/home/rchatsiri/IncludeOS_install/api/sys -I/home/rchatsiri/IncludeOS_install/newlib/include -I/home/rchatsiri/IncludeOS_install/api -I/home/rchatsiri/IncludeOS_install/mod/GSL/include -D_LIBCPP_HAS_NO_THREADS=1 -D_GNU_SOURCE -DSERVICE_NAME="\"IncludeOS Demo Service\"" -o .service_name.o /home/rchatsiri/IncludeOS_install/service_name.cpp | |
>> Linking service with OS | |
ld -nostdlib -melf_i386 -N --script=/home/rchatsiri/IncludeOS_install/linker.ld /home/rchatsiri/IncludeOS_install/crt/crtbegin.o /home/rchatsiri/IncludeOS_install/crt/crti.o service.o .service_name.o /home/rchatsiri/IncludeOS_install/os.a /home/rchatsiri/IncludeOS_install/libcxx/libc++.a /home/rchatsiri/IncludeOS_install/libcxx/libc++abi.a /home/rchatsiri/IncludeOS_install/os.a /home/rchatsiri/IncludeOS_install/newlib/libc.a /home/rchatsiri/IncludeOS_install/newlib/libm.a /home/rchatsiri/IncludeOS_install/libgcc/libgcc.a /home/rchatsiri/IncludeOS_install/crt/crtend.o /home/rchatsiri/IncludeOS_install/crt/crtn.o -o IncludeOS_Demo_Service | |
>> Building IncludeOS_Demo_Service.img | |
/home/rchatsiri/IncludeOS_install/vmbuild /home/rchatsiri/IncludeOS_install/bootloader IncludeOS_Demo_Service | |
Creating VM disk image './IncludeOS_Demo_Service.img' where N = 2 | |
Size of bootloader: 512 | |
Size of service: 2192376 bytes | |
Total disk size: 2192896 bytes, => 4283 sectors. | |
Creating disk of size: => 4285 sectors | |
=> 2193920 bytes | |
Read 512 bytes from boot image | |
Read 2192376 bytes from service image | |
Reading ELF headers... | |
Signature: ELF | |
Type: ELF Executable | |
Machine: Intel 80386 | |
Version: 1 | |
Entry point: 0x201bd0 | |
Number of program headers: 2 | |
Program header offset: 34 | |
Number of section headers: 19 | |
Section header offset: 217010 | |
Size of ELF-header: 34 bytes | |
Fetching offset of section .text (the service starting point) | |
Starting at pheader 1, phys.addr: 0x200074 | |
Applying magic signature: 0xFA7CA7 | |
Data currently at location: 217600 | |
Location on image: 0x217600 | |
Wrote 2193920 bytes => 4285 sectors to IncludeOS_Demo_Service.img | |
Build complete | |
Starting VM with Qemu. | |
(Once inside Qemu, 'Ctrl+a c' will enter the Qemu console, from which you can type 'q' to quit.) | |
You should now get a boot message from the virtual machine: | |
>>> KVM: ON | |
------------------------------------------------------------ | |
Starting VM: 'IncludeOS_Demo_Service.img' | |
------------------------------------------------------------ | |
qemu-system-x86_64 --enable-kvm -drive file=IncludeOS_Demo_Service.img,format=raw,if=ide -device virtio-net,netdev=net0,mac=c0:01:0a:00:00:2a -netdev tap,id=net0,script=/home/rchatsiri/IncludeOS_install/etc/qemu-ifup -nographic -smp 1 -m 128 | |
[sudo] password for rchatsiri: | |
bridge include0 does not exist! | |
================================================================================ | |
#include<os> // Literally | |
================================================================================ | |
[ Kernel ] Heap start: @ 0x2fa000 | |
[ Kernel ] Current end is: @ 0x2f9000 | |
[ IRQ manager ] Creating interrupt handlers | |
+ Exception gates set for irq < 32 | |
+ Default interrupt gates set for irq >= 32 | |
+ Enabling IRQ 0, mask: 0xfffe | |
[ PCI Manager ] Probing PCI bus | |
| | |
+--+ Host Bridge (0x0) | |
| | |
+--+ ISA Bridge (0x1) | |
| | |
+--+ Mass Storage Controller | |
| | |
+--+ Other Bridge (0x80) | |
| | |
+--+ Display Controller | |
| | |
+--+ Ethernet Network Controller (0x0) | |
| | |
o | |
[ Kernel ] Starting IncludeOS Demo Service | |
================================================================================ | |
[ Virtio ] Attaching to PCI addr 0x18 | |
[x] Vendor ID is VIRTIO | |
[x] Device ID 0x1000 is in a valid range (Virtio LEGACY) | |
[x] Device Revision ID (0x0) supported | |
[ Resource @ BAR 0 ] | |
Address: 0xc000 Size: 0x20 | |
Type: IO Resource | |
[ Resource @ BAR 1 ] | |
Address: 0xfebd1000 Size: 0x1000 | |
Type: Memory Resource | |
[x] Unit has valid I/O base (0xc000) | |
[*] Reset device | |
[x] Unit has IRQ 11 | |
[ Virtio ] Enabling IRQ Handler | |
+ Enabling IRQ 11, mask: 0xf7fa | |
[ IRQ manager ] Updated subscriptions: 0x800 irq: 11 | |
+ Enabling IRQ 11, mask: 0xf7fa | |
[ Virtio ] Initialization complete | |
[ VirtioNet ] Driver initializing | |
[x] Negotiated needed features | |
[x] Negotiated wanted features | |
[x] Device handles packets w. partial checksum | |
[x] Guest handles packets w. partial checksum | |
[x] There's a control queue | |
[x] Queue can handle any header/data layout | |
[x] We can use indirect descriptors | |
[x] There's a Ring Event Index to use | |
[ ] There are multiple queue pairs | |
[x] Merge RX buffers | |
[x] RX queue assigned (0x2fa000) to device | |
[x] TX queue assigned (0x2fe000) to device | |
[x] CTRL queue assigned (0x302000) to device | |
[ VirtioNet ] Adding 128 receive buffers of size 1528 | |
[x] Valid Mac address: c0:1:a:0:0:2a | |
[x] Signalled driver OK | |
+ Enabling IRQ 11, mask: 0xf7fa | |
[ IRQ manager ] Updated subscriptions: 0x800 irq: 11 | |
+ Enabling IRQ 11, mask: 0xf7fa | |
[ VirtioNet ] Driver initialization complete | |
[x] Link up | |
[ Inet4 ] Bringing up the IP stack | |
[ Inet4 ] Trying DHCP... | |
+ Enabling IRQ 0, mask: 0xf7fa | |
[ IRQ manager ] Updated subscriptions: 0x801 irq: 0 | |
[ DHCPv4 ] Negotiating IP-address (xid=1887138561) | |
[ Inet4 ] Reconfiguring network. New IP: 10.0.0.42 | |
*** TEST SERVICE STARTED *** | |
================================================================================ | |
IncludeOS v0.8.1-3-g84605c1-dirty | |
+--> Running [ IncludeOS Demo Service ] | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
[ DHCPv4 ] Negotiation timed out | |
<Service> TCP STATUS: | |
LISTENING SOCKETS: | |
10.0.0.42:80 0.0.0.0:0 (LISTENING) | |
CONNECTIONS: | |
Proto Recv Send In Out Local Remote State |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment