includeos 创建 输出一个hello world的过程
来源:互联网 发布:r软件使用统计分析 编辑:程序博客网 时间:2024/05/17 07:03
shm@ubuntu:~$ cd IncludeOS
shm@ubuntu:~/IncludeOS$ cp -r seed/service ~/my_service
shm@ubuntu:~/IncludeOS$ cd ~/my_service
shm@ubuntu:~/my_service$ ls
cmake_build.sh CMakeLists.txt docker_run.sh service.cpp
shm@ubuntu:~/my_service$ gedit service.cpp
shm@ubuntu:~/my_service$ gedit CMakeLists.txt
shm@ubuntu:~/my_service$ mkdir build && cd build
shm@ubuntu:~/my_service/build$ cmake ..
-- The C compiler identification is Clang 3.8.0
-- The CXX compiler identification is Clang 3.8.0
-- Check for working C compiler: /usr/bin/clang-3.8
-- Check for working C compiler: /usr/bin/clang-3.8 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/clang++-3.8
-- Check for working CXX compiler: /usr/bin/clang++-3.8 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The ASM_NASM compiler identification is unknown
-- Found assembler: /usr/bin/nasm
-- Configuring done
-- Generating done
-- Build files have been written to: /home/shm/my_service/build
shm@ubuntu:~/my_service/build$ make
Scanning dependencies of target service
[ 33%] Building CXX object CMakeFiles/service.dir/service.cpp.o
[ 66%] Building CXX object CMakeFiles/service.dir/home/shm/includeos/includeos/src/service_name.cpp.o
[100%] Linking CXX executable my_service
[100%] Built target service
Scanning dependencies of target pruned_elf_symbols
/usr/bin/objcopy: stHaWMm6: section .bss lma 0x1e2000 adjusted to 0x2188f6
/usr/bin/strip: stV8RXJl: section .bss lma 0x1e2000 adjusted to 0x2188f6
[100%] Built target pruned_elf_symbols
Scanning dependencies of target prepend_bootloader
[100%] Built target prepend_bootloader
shm@ubuntu:~/my_service/build$ boot my_service
[ WARNING ] Running with sudo
[sudo] password for shm:
================================================================================
#include<os> // Literally
================================================================================
[ Kernel ] Stack: 0x9fc94
[ Kernel ] Boot args: 0x2badb002 (multiboot magic), 0x9500 (bootinfo addr)
[ Kernel ] Max mem (from linker): 128 MiB
[ Kernel ] Booted with multiboot
* magic value: 0x2badb002 Multiboot info at 0x9500
* Valid memory (130559 Kib):
0x00000000 - 0x0009fbff (639 Kib)
0x00100000 - 0x07fdffff (129920 Kib)
* Booted with parameters @ 0x3000: my_service
* Multiboot provided memory map (6 entries @ 0x9000)
0x00000000 - 0x0009fbff FREE (639 Kb.)
0x0009fc00 - 0x0009ffff RESERVED (1 Kb.)
0x000f0000 - 0x000fffff RESERVED (64 Kb.)
0x00100000 - 0x07fdffff FREE (129920 Kb.)
0x07fe0000 - 0x07ffffff RESERVED (128 Kb.)
0xfffc0000 - 0xffffffff RESERVED (256 Kb.)
[ Kernel ] Assigning fixed memory ranges (Memory map)
[ Kernel ] Assigning heap
[ Kernel ] Printing memory map
* Statman 4000 - 5fff (Statistics, 8192 / 8192 bytes used)
* Kernel / service main stack a000 - 9fbff (N/A, 613376 / 613376 bytes used)
* Reserved 9fc00 - 9ffff (Multiboot / BIOS, 1024 / 1024 bytes used)
* Reserved f0000 - fffff (Multiboot / BIOS, 65536 / 65536 bytes used)
* ELF 100000 - 1e8920 (Your service binary including OS, 952609 / 952609 bytes used)
* Pre-heap 1e8921 - 1e897f (Heap randomization area (not for use)), 95 / 95 bytes used)
* Heap 1e8980 - 7fdffff (Dynamic memory, 231040 / 132085376 bytes used)
* Reserved 7fe0000 - 7ffffff (Multiboot / BIOS, 131072 / 131072 bytes used)
* Reserved fffc0000 - ffffffff (Multiboot / BIOS, 262144 / 262144 bytes used)
[ INTR ] Creating exception handlers
+ Default interrupt gates set for irq >= 32
[ ACPI ] Reading headers
OEM: BOCHS Rev. 0
[ ACPI ] Reading APIC information
LAPIC base: 0xfee00000 (flags: 0x1)
-> CPU 0 ID 0 (flags=0x1)
I/O APIC 0 ADDR 0xfec00000 INTR 0x0
IRQ redirect for bus 0 from IRQ 0 to VEC 2
IRQ redirect for bus 0 from IRQ 5 to VEC 5
IRQ redirect for bus 0 from IRQ 9 to VEC 9
IRQ redirect for bus 0 from IRQ 10 to VEC 10
IRQ redirect for bus 0 from IRQ 11 to VEC 11
LAPIC id: 0 ver: 50014
[ APIC ] Enabling BSP LAPIC
APIC_BASE MSR is now 0xfee00900
[ IOAPIC ] Initializing
Base addr: 0xfec00000 Redirection entries: 24
[ IOAPIC ] Done
[ BSP ] Enabling interrupts
Enabled redirected IRQ 0 -> 2 on lapic 0
[ PCI Manager ] Probing PCI bus
|
+--+ Host Bridge (0x0)
|
+--+ ISA Bridge (0x1)
|
+--+ Mass Storage Controller
| +--+ Driver: Not found
|
+--+ Other Bridge (0x80)
|
+--+ Display Controller
|
+--+ Ethernet Network Controller (0x0)
| +--+ Driver: Not found
|
o
[ Devices ] Listing registered devices
|
o
[ Kernel ] Estimating CPU-frequency
|
+--(2 samples, 0.000100 sec. interval)
|
+--> 2499.553281 MHz
[ APIC ] Measuring APIC timer...
Enabled redirected IRQ 0 -> 2 on lapic 0
[ CMOS ] RTC is 24 hour format, BCD mode
[ RTC ] Enabling regular clock sync with CMOS
[ Kernel ] Initializing plugins
[ Kernel ] Starting IncludeOS my_service
================================================================================
this is a test about unikernels
**********Hello world - OS included!*****************
Args = my_service
================================================================================
IncludeOS v0.10.0
+--> Running [ IncludeOS my_service ]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hello world
^A^C
[ WARNING ] Process interrupted - stopping vms
[ ABORT ] Process terminated by user
shm@ubuntu:~/my_service/build$
shm@ubuntu:~/IncludeOS$ cp -r seed/service ~/my_service
shm@ubuntu:~/IncludeOS$ cd ~/my_service
shm@ubuntu:~/my_service$ ls
cmake_build.sh CMakeLists.txt docker_run.sh service.cpp
shm@ubuntu:~/my_service$ gedit service.cpp
shm@ubuntu:~/my_service$ gedit CMakeLists.txt
shm@ubuntu:~/my_service$ mkdir build && cd build
shm@ubuntu:~/my_service/build$ cmake ..
-- The C compiler identification is Clang 3.8.0
-- The CXX compiler identification is Clang 3.8.0
-- Check for working C compiler: /usr/bin/clang-3.8
-- Check for working C compiler: /usr/bin/clang-3.8 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/clang++-3.8
-- Check for working CXX compiler: /usr/bin/clang++-3.8 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The ASM_NASM compiler identification is unknown
-- Found assembler: /usr/bin/nasm
-- Configuring done
-- Generating done
-- Build files have been written to: /home/shm/my_service/build
shm@ubuntu:~/my_service/build$ make
Scanning dependencies of target service
[ 33%] Building CXX object CMakeFiles/service.dir/service.cpp.o
[ 66%] Building CXX object CMakeFiles/service.dir/home/shm/includeos/includeos/src/service_name.cpp.o
[100%] Linking CXX executable my_service
[100%] Built target service
Scanning dependencies of target pruned_elf_symbols
/usr/bin/objcopy: stHaWMm6: section .bss lma 0x1e2000 adjusted to 0x2188f6
/usr/bin/strip: stV8RXJl: section .bss lma 0x1e2000 adjusted to 0x2188f6
[100%] Built target pruned_elf_symbols
Scanning dependencies of target prepend_bootloader
[100%] Built target prepend_bootloader
shm@ubuntu:~/my_service/build$ boot my_service
[ WARNING ] Running with sudo
[sudo] password for shm:
================================================================================
#include<os> // Literally
================================================================================
[ Kernel ] Stack: 0x9fc94
[ Kernel ] Boot args: 0x2badb002 (multiboot magic), 0x9500 (bootinfo addr)
[ Kernel ] Max mem (from linker): 128 MiB
[ Kernel ] Booted with multiboot
* magic value: 0x2badb002 Multiboot info at 0x9500
* Valid memory (130559 Kib):
0x00000000 - 0x0009fbff (639 Kib)
0x00100000 - 0x07fdffff (129920 Kib)
* Booted with parameters @ 0x3000: my_service
* Multiboot provided memory map (6 entries @ 0x9000)
0x00000000 - 0x0009fbff FREE (639 Kb.)
0x0009fc00 - 0x0009ffff RESERVED (1 Kb.)
0x000f0000 - 0x000fffff RESERVED (64 Kb.)
0x00100000 - 0x07fdffff FREE (129920 Kb.)
0x07fe0000 - 0x07ffffff RESERVED (128 Kb.)
0xfffc0000 - 0xffffffff RESERVED (256 Kb.)
[ Kernel ] Assigning fixed memory ranges (Memory map)
[ Kernel ] Assigning heap
[ Kernel ] Printing memory map
* Statman 4000 - 5fff (Statistics, 8192 / 8192 bytes used)
* Kernel / service main stack a000 - 9fbff (N/A, 613376 / 613376 bytes used)
* Reserved 9fc00 - 9ffff (Multiboot / BIOS, 1024 / 1024 bytes used)
* Reserved f0000 - fffff (Multiboot / BIOS, 65536 / 65536 bytes used)
* ELF 100000 - 1e8920 (Your service binary including OS, 952609 / 952609 bytes used)
* Pre-heap 1e8921 - 1e897f (Heap randomization area (not for use)), 95 / 95 bytes used)
* Heap 1e8980 - 7fdffff (Dynamic memory, 231040 / 132085376 bytes used)
* Reserved 7fe0000 - 7ffffff (Multiboot / BIOS, 131072 / 131072 bytes used)
* Reserved fffc0000 - ffffffff (Multiboot / BIOS, 262144 / 262144 bytes used)
[ INTR ] Creating exception handlers
+ Default interrupt gates set for irq >= 32
[ ACPI ] Reading headers
OEM: BOCHS Rev. 0
[ ACPI ] Reading APIC information
LAPIC base: 0xfee00000 (flags: 0x1)
-> CPU 0 ID 0 (flags=0x1)
I/O APIC 0 ADDR 0xfec00000 INTR 0x0
IRQ redirect for bus 0 from IRQ 0 to VEC 2
IRQ redirect for bus 0 from IRQ 5 to VEC 5
IRQ redirect for bus 0 from IRQ 9 to VEC 9
IRQ redirect for bus 0 from IRQ 10 to VEC 10
IRQ redirect for bus 0 from IRQ 11 to VEC 11
LAPIC id: 0 ver: 50014
[ APIC ] Enabling BSP LAPIC
APIC_BASE MSR is now 0xfee00900
[ IOAPIC ] Initializing
Base addr: 0xfec00000 Redirection entries: 24
[ IOAPIC ] Done
[ BSP ] Enabling interrupts
Enabled redirected IRQ 0 -> 2 on lapic 0
[ PCI Manager ] Probing PCI bus
|
+--+ Host Bridge (0x0)
|
+--+ ISA Bridge (0x1)
|
+--+ Mass Storage Controller
| +--+ Driver: Not found
|
+--+ Other Bridge (0x80)
|
+--+ Display Controller
|
+--+ Ethernet Network Controller (0x0)
| +--+ Driver: Not found
|
o
[ Devices ] Listing registered devices
|
o
[ Kernel ] Estimating CPU-frequency
|
+--(2 samples, 0.000100 sec. interval)
|
+--> 2499.553281 MHz
[ APIC ] Measuring APIC timer...
Enabled redirected IRQ 0 -> 2 on lapic 0
[ CMOS ] RTC is 24 hour format, BCD mode
[ RTC ] Enabling regular clock sync with CMOS
[ Kernel ] Initializing plugins
[ Kernel ] Starting IncludeOS my_service
================================================================================
this is a test about unikernels
**********Hello world - OS included!*****************
Args = my_service
================================================================================
IncludeOS v0.10.0
+--> Running [ IncludeOS my_service ]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hello world
^A^C
[ WARNING ] Process interrupted - stopping vms
[ ABORT ] Process terminated by user
shm@ubuntu:~/my_service/build$
0 0
- includeos 创建 输出一个hello world的过程
- 创建tornado应用输出hello world
- 创建tornado应用输出hello world
- 考你一个输出“Hello World”程序
- 使用Secure CRT 输出一个hello world!
- 一个简单的"Hello World"
- Physx的一个hello world
- includeOS完整启动过程
- 在控制台输出彩色的Hello World!
- 输出"HELLO WORLD" ASM
- 汇编程序输出“Hello world”
- django输出 hello world
- php 输出Hello World
- 页面输出Hello World
- Java:输出Hello World!
- 1.5 输出Hello World
- python输出Hello World
- 输出hello world
- 【揭秘】内部优惠券是真的吗?独家揭秘微信淘宝天猫内部优惠券群的真相!
- ReactiveCocoa 小总结
- jQuery选择器之基本筛选选择器
- 完整java开发中JDBC连接数据库代码和步骤
- 仿京东的一个MVC框架的使用
- includeos 创建 输出一个hello world的过程
- android studio NDK使用,编译c生成.so实践记录
- 分享一款很实用的数据恢复软件 easyrecovery
- spring配置文件中分别使用多个properties文件
- MySQL5.7 运行SELECT DISTINCT 遇到3065问题
- Linux下快速查看CPU使用情况的相关命令
- 前端框架与库的区别
- 数据库连接错误The Network Adapter could not establish the connection
- Required int[] parameter 'ids' is not present