-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
5 changed files
with
153 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
include(${PROJECT_SOURCE_DIR}/compile/platform-cmake/arm-common.cmake) | ||
|
||
##################################################################### | ||
# Platform Specific Build Targets # | ||
##################################################################### | ||
|
||
|
||
##################################################################### | ||
# Platform Specific Installation Targets # | ||
##################################################################### | ||
|
||
install(FILES ${PROJECT_BINARY_DIR}/${XINU_BOOT_NAME} | ||
DESTINATION ${XINU_TFTP_ROOT}) | ||
|
||
##################################################################### | ||
# Platform Specific Build Variables # | ||
##################################################################### | ||
|
||
include(CMakeForceCompiler) | ||
|
||
unset(XINU_PLATFORM CACHE) | ||
set(XINU_PLATFORM "arm-bbb" | ||
CACHE STRING "Target platform" FORCE) | ||
|
||
unset(XINU_PLATFORM_C_FLAGS CACHE) | ||
set(XINU_PLATFORM_C_FLAGS "-mcpu=cortex-a8 -g" | ||
CACHE STRING "Platform specific compiler flags." FORCE) | ||
|
||
unset(XINU_PLATFORM_CMAKE_FILE CACHE) | ||
set(XINU_PLATFORM_CMAKE_FILE ${PROJECT_SOURCE_DIR}/compile/platform-cmake/arm-bbb.cmake | ||
CACHE STRING "Location of platform CMake file.") | ||
|
||
##################################################################### | ||
# Platform Specific Device Configuration # | ||
##################################################################### | ||
|
||
set(XINU_HAS_DEV_ETH true ) | ||
set(XINU_HAS_DEV_LFS true ) | ||
set(XINU_HAS_DEV_LOOPBACK false) | ||
set(XINU_HAS_DEV_NAM true ) | ||
set(XINU_HAS_DEV_RAM true ) | ||
set(XINU_HAS_DEV_RDS true ) | ||
set(XINU_HAS_DEV_RFS true ) | ||
set(XINU_HAS_DEV_TTY true ) | ||
set(XINU_HAS_DEV_UART false) | ||
set(XINU_HAS_DEV_UART_PL011 false) |
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,24 @@ | ||
##################################################################### | ||
# Architecture Specific Toolchain: arm-none-eabi # | ||
##################################################################### | ||
|
||
set(CMAKE_SYSTEM_NAME Generic) | ||
set(CMAKE_SYSTEM_VERSION ${XINU_VERSION_STRING}) | ||
|
||
unset(XINU_ARCH CACHE) | ||
set(XINU_ARCH "arm" | ||
CACHE STRING "Target architecture" FORCE) | ||
|
||
CMAKE_FORCE_C_COMPILER(arm-none-eabi-gcc GNU) | ||
|
||
unset(XINU_ARCH_C_FLAGS CACHE) | ||
set(XINU_ARCH_C_FLAGS "-marm -mno-unaligned-access" | ||
CACHE STRING "Architecture specific compiler flags." FORCE) | ||
|
||
unset(XINU_LINK_FLAGS CACHE) | ||
set(XINU_LINK_FLAGS -dn -m armelf -Map ${PROJECT_BINARY_DIR}/xinu.map -T ${PROJECT_SOURCE_DIR}/arch/ARM/ld.script | ||
CACHE STRING "Flags used to link the XINU binary." FORCE) | ||
|
||
unset(XINU_MKIMAGE_FLAGS CACHE) | ||
set(XINU_MKIMAGE_FLAGS -A arm -O linux -T kernel -C none -a 0x81000000 -e 0x81000000 | ||
CACHE STRING "Flags used by the mkimage command." FORCE) |
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,71 @@ | ||
include(${PROJECT_SOURCE_DIR}/compile/platform-cmake/arm-common.cmake) | ||
|
||
##################################################################### | ||
# Platform Specific Build Targets # | ||
##################################################################### | ||
|
||
find_program(QEMU_BINARY qemu-system-arm) | ||
|
||
unset(QEMU_DEBUG_PORT CACHE) | ||
set(QEMU_DEBUG_PORT "5560" | ||
CACHE STRING "TCP port to use when connecting to QEMU's GDB interface.") | ||
|
||
unset(QEMU_FLAGS CACHE) | ||
set(QEMU_FLAGS -M versatilepb -m 512M -nographic -cpu arm1176 | ||
CACHE STRING "Command line arguments for QEMU.") | ||
|
||
unset(QEMU_ENV CACHE) | ||
set(QEMU_ENV export QEMU_AUDIO_DRV=wav; export QEMU_WAV_PATH=$(PROJECT_SOURCE_DIR)/compile/.wav.wav;) | ||
|
||
# QEMU boot command | ||
|
||
add_custom_target(qemu | ||
${QEMU_ENV} ${QEMU_BINARY} ${QEMU_FLAGS} -kernel ${PROJECT_BINARY_DIR}/${XINU_BOOT_NAME} | ||
DEPENDS ${XINU_BOOT_NAME} | ||
VERBATIM | ||
USES_TERMINAL) | ||
|
||
# QEMU boot command w/ GDB | ||
|
||
add_custom_target(qemu-gdb | ||
${QEMU_ENV} ${QEMU_BINARY} ${QEMU_FLAGS} -kernel ${PROJECT_BINARY_DIR}/${XINU_BOOT_NAME} -S -gdb tcp::${QEMU_DEBUG_PORT} | ||
DEPENDS ${XINU_BOOT_NAME} | ||
VERBATIM | ||
USES_TERMINAL) | ||
|
||
##################################################################### | ||
# Platform Specific Installation Targets # | ||
##################################################################### | ||
|
||
##################################################################### | ||
# Platform Specific Build Variables # | ||
##################################################################### | ||
|
||
include(CMakeForceCompiler) | ||
|
||
unset(XINU_PLATFORM CACHE) | ||
set(XINU_PLATFORM "arm-qemu" | ||
CACHE STRING "Target platform" FORCE) | ||
|
||
unset(XINU_PLATFORM_C_FLAGS CACHE) | ||
set(XINU_PLATFORM_C_FLAGS "-mcpu=arm1176jz-s -ggdb3" | ||
CACHE STRING "Platform specific compiler flags." FORCE) | ||
|
||
unset(XINU_PLATFORM_CMAKE_FILE CACHE) | ||
set(XINU_PLATFORM_CMAKE_FILE ${PROJECT_SOURCE_DIR}/compile/platform-cmake/arm-qemu.cmake | ||
CACHE STRING "Location of platform CMake file.") | ||
|
||
##################################################################### | ||
# Platform Specific Device Configuration # | ||
##################################################################### | ||
|
||
set(XINU_HAS_DEV_ETH false) | ||
set(XINU_HAS_DEV_LFS true ) | ||
set(XINU_HAS_DEV_LOOPBACK true ) | ||
set(XINU_HAS_DEV_NAM true ) | ||
set(XINU_HAS_DEV_RAM true ) | ||
set(XINU_HAS_DEV_RDS false) | ||
set(XINU_HAS_DEV_RFS false) | ||
set(XINU_HAS_DEV_TTY true ) | ||
set(XINU_HAS_DEV_UART true ) | ||
set(XINU_HAS_DEV_UART_PL011 true ) |
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