4
4
# make justrun Run the last build
5
5
# make runnet Build and run in QEMU with nic
6
6
# make justrunnet Run the last build with nic
7
- # make runui Build and run in QEMU with gui
8
- # make justrunui Run the last build with gui
9
7
# make runtest Build and run in QEMU with specified program
10
8
# make justruntest Run the last build with specified program
11
9
# make doc Generate docs
@@ -50,7 +48,6 @@ kernel_img := $(build_path)/kernel.img
50
48
bootimage := $(build_path ) /bootimage.bin
51
49
bootloader_dir = ../bootloader
52
50
bootloader := $(bootloader_dir ) /target/$(target ) /$(mode ) /rcore-bootloader
53
- bbl_path := $(PWD ) /../riscv-pk
54
51
user_dir := ../user
55
52
56
53
@@ -126,13 +123,12 @@ qemu_opts += \
126
123
-kernel ../tools/opensbi/virt_rv32.elf \
127
124
-device loader,addr=0x80400000,file=$(kernel_img ) \
128
125
-drive file=$(USER_QCOW2 ) ,format=qcow2,id=sfs \
129
- -device virtio-blk-device,drive=sfs
126
+ -device virtio-blk-device,drive=sfs \
127
+ -device virtio-gpu-device \
128
+ -device virtio-mouse-device
130
129
qemu_net_opts += \
131
130
-netdev type=tap,id=net0,script=no,downscript=no \
132
131
-device virtio-net-device,netdev=net0
133
- qemu_ui_opts += \
134
- -device virtio-gpu-device \
135
- -device virtio-mouse-device
136
132
137
133
else ifeq ($(arch), riscv64)
138
134
ifeq ($(board ) , u540)
@@ -148,14 +144,13 @@ qemu_opts += \
148
144
-kernel ../tools/opensbi/virt_rv64.elf \
149
145
-device loader,addr=0x80200000,file=$(kernel_img ) \
150
146
-drive file=$(USER_QCOW2 ) ,format=qcow2,id=sfs \
151
- -device virtio-blk-device,drive=sfs
147
+ -device virtio-blk-device,drive=sfs \
148
+ -device virtio-gpu-device \
149
+ -device virtio-mouse-device
152
150
endif
153
151
qemu_net_opts += \
154
152
-netdev type=tap,id=net0,script=no,downscript=no \
155
153
-device virtio-net-device,netdev=net0
156
- qemu_ui_opts += \
157
- -device virtio-gpu-device \
158
- -device virtio-mouse-device
159
154
160
155
else ifeq ($(arch), aarch64)
161
156
qemu_opts += \
@@ -233,10 +228,7 @@ prefix := riscv64-unknown-elf-
233
228
else ifeq ($(arch), mipsel)
234
229
prefix ?= mipsel-linux-musln32-
235
230
else ifeq ($(arch), aarch64)
236
- prefix ?= aarch64-none-elf-
237
- ifeq (,$(shell which $(prefix ) ld) )
238
- prefix := aarch64-elf-
239
- endif
231
+ prefix ?= aarch64-linux-musl-
240
232
endif
241
233
242
234
gdb := $(prefix ) gdb
@@ -246,7 +238,7 @@ strip := cargo strip --
246
238
dtc := dtc
247
239
hostcc := gcc
248
240
249
- .PHONY : all clean build asm doc debug kernel sfsimg install run justrun runnet justrunnet runui justrunui runtest justruntest
241
+ .PHONY : all clean build asm doc debug kernel sfsimg install run justrun runnet justrunnet runtest justruntest
250
242
251
243
all : kernel
252
244
260
252
261
253
run : build justrun
262
254
runnet : build justrunnet
263
- runui : build justrunui
264
255
runtest : build justruntest
265
256
266
257
justrun :
@@ -269,9 +260,6 @@ justrun:
269
260
justrunnet : build
270
261
@sudo qemu-system-$(arch ) $(qemu_opts ) $(qemu_net_opts )
271
262
272
- justrunui : build
273
- @qemu-system-$(arch ) $(qemu_opts ) $(qemu_ui_opts )
274
-
275
263
justruntest : build
276
264
@qemu-system-$(arch ) $(filter-out -serial mon:stdio, $(qemu_opts ) ) --append $(init ) -serial file:../tests/stdout -monitor null
277
265
0 commit comments