-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
examples/virtio: make: add userlevel snippets
Signed-off-by: Alex Brown <[email protected]>
- Loading branch information
1 parent
0768f92
commit 30cbc41
Showing
5 changed files
with
102 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# | ||
# Copyright 2024, UNSW | ||
# | ||
# SPDX-License-Identifier: BSD-2-Clause | ||
# | ||
|
||
ifeq ($(strip $(LIBVMM)),) | ||
$(error LIBVMM must be specified) | ||
endif | ||
ifeq ($(strip $(MICROKIT_BOARD)),) | ||
$(error MICROKIT_BOARD must be specified) | ||
endif | ||
|
||
blk_client_init: $(LIBVMM)/tools/linux/blk/blk_client_init | ||
cp $^ $@ | ||
|
||
blk_driver_init: $(LIBVMM)/tools/linux/blk/board/$(MICROKIT_BOARD)/blk_driver_init | ||
cp $^ $@ | ||
|
||
clobber:: | ||
rm -f blk_client_init blk_driver_init |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# | ||
# Copyright 2024, UNSW | ||
# | ||
# SPDX-License-Identifier: BSD-2-Clause | ||
# | ||
# This Makefile snippet builds block UIO driver | ||
# | ||
|
||
ifeq ($(strip $(VMM_TOOLS)),) | ||
$(error VMM_TOOLS must be specified) | ||
endif | ||
ifeq ($(strip $(SDDF)),) | ||
$(error SDDF must be specified) | ||
endif | ||
ifeq ($(strip $(CC_USERLEVEL)),) | ||
$(error CC_USERLEVEL must be specified) | ||
endif | ||
|
||
UIO_BLK_IMAGES := uio_blk_driver | ||
|
||
CFLAGS_uio_blk_driver := -I$(SDDF)/include -I$(VMM_TOOLS)/linux/include | ||
|
||
CHECK_UIO_BLK_DRIVER_FLAGS_MD5:=.uio_blk_driver_cflags-$(shell echo -- $(CFLAGS_USERLEVEL) $(CFLAGS_uio_blk_driver) | shasum | sed 's/ *-//') | ||
|
||
$(CHECK_UIO_BLK_DRIVER_FLAGS_MD5): | ||
-rm -f .uio_blk_driver_cflags-* | ||
touch $@ | ||
|
||
|
||
# This shouldn't have a -c but for some reason it only works with one | ||
uio_blk_driver: uio_blk_driver.o | ||
$(CC_USERLEVEL) $(CFLAGS_USERLEVEL) $(CFLAGS_uio_blk_driver) -o $@ -c $< | ||
|
||
uio_blk_driver.o: $(CHECK_UIO_BLK_DRIVER_FLAGS_MD5) | ||
uio_blk_driver.o: $(VMM_TOOLS)/linux/uio_drivers/blk/blk.c | ||
$(CC_USERLEVEL) $(CFLAGS_USERLEVEL) $(CFLAGS_uio_blk_driver) -o $@ -c $< | ||
|
||
clean:: | ||
rm -f uio_blk_driver.[od] .uio_blk_driver_cflags-* | ||
|
||
clobber:: | ||
rm -f $(UIO_BLK_IMAGES) | ||
|
||
-include uio_blk_driver.d |