Skip to content

Commit 8d03c74

Browse files
committed
Update azure pipelines script for new build system
1 parent e82169a commit 8d03c74

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

azure-pipelines.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ steps:
6464
displayName: 'Print Rust Version'
6565
continueOnError: true
6666

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'
6969

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'
7272

7373
- script: sudo apt update && sudo apt install qemu-system-x86
7474
condition: eq( variables['Agent.OS'], 'Linux' )
@@ -96,12 +96,15 @@ steps:
9696
workingDirectory: example-kernel
9797
displayName: 'Build Example Kernel'
9898

99-
- script: cargo run -- --kernel ../example-kernel/target/x86_64-example-kernel/debug/example-kernel
100-
workingDirectory: builder
99+
- script: cargo xbuild --release
101100
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'
102105

103106
- 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
105108
if [ $? -eq 123 ]; then (exit 0); else (exit 1); fi
106109
displayName: 'Test Bootloader'
107110

@@ -110,6 +113,6 @@ steps:
110113
displayName: 'Build Bootloader (Feature vga_320x200)'
111114

112115
- 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
114117
if [ $? -eq 123 ]; then (exit 0); else (exit 1); fi
115118
displayName: 'Test Bootloader (Feature vga_320x200)'

0 commit comments

Comments
 (0)