@@ -64,11 +64,11 @@ steps:
64
64
displayName : ' Print Rust Version'
65
65
continueOnError : true
66
66
67
- - script : rustup component add rust-src
68
- displayName : ' Install Rustup Src Component '
67
+ - script : rustup component add rust-src llvm-tools-preview
68
+ displayName : ' Install Rustup Components '
69
69
70
- - script : cargo install cargo-xbuild bootimage --debug
71
- displayName : ' Install cargo-xbuild and bootimage '
70
+ - script : cargo install cargo-xbuild cargo-binutils --debug
71
+ displayName : ' Install cargo-xbuild cargo-binutils '
72
72
73
73
- script : sudo apt update && sudo apt install qemu-system-x86
74
74
condition : eq( variables['Agent.OS'], 'Linux' )
@@ -96,12 +96,15 @@ steps:
96
96
workingDirectory : example-kernel
97
97
displayName : ' Build Example Kernel'
98
98
99
- - script : cargo run -- --kernel ../example-kernel/target/x86_64-example-kernel/debug/example-kernel
100
- workingDirectory : builder
99
+ - script : cargo xbuild --release
101
100
displayName : ' Build Bootloader'
101
+ env : { KERNEL: "example-kernel/target/x86_64-example-kernel/debug/example-kernel" }
102
+
103
+ - script : cargo objcopy -I elf64-x86-64 -O binary --binary-architecture=i386:x86-64 target/x86_64-bootloader/release/bootloader target/x86_64-bootloader/release/bootloader.bin
104
+ displayName : ' Convert Bootloader ELF to Binary'
102
105
103
106
- bash : |
104
- qemu-system-x86_64 -drive format=raw,file=target/x86_64-bootloader/release/bootimage .bin -device isa-debug-exit,iobase=0xf4,iosize=0x04 -display none
107
+ qemu-system-x86_64 -drive format=raw,file=target/x86_64-bootloader/release/bootloader .bin -device isa-debug-exit,iobase=0xf4,iosize=0x04 -display none
105
108
if [ $? -eq 123 ]; then (exit 0); else (exit 1); fi
106
109
displayName : ' Test Bootloader'
107
110
@@ -110,6 +113,6 @@ steps:
110
113
displayName : ' Build Bootloader (Feature vga_320x200)'
111
114
112
115
- bash : |
113
- qemu-system-x86_64 -drive format=raw,file=target/x86_64-bootloader/release/bootimage .bin -device isa-debug-exit,iobase=0xf4,iosize=0x04 -display none
116
+ qemu-system-x86_64 -drive format=raw,file=target/x86_64-bootloader/release/bootloader .bin -device isa-debug-exit,iobase=0xf4,iosize=0x04 -display none
114
117
if [ $? -eq 123 ]; then (exit 0); else (exit 1); fi
115
118
displayName : ' Test Bootloader (Feature vga_320x200)'
0 commit comments