diff options
39 files changed, 1224 insertions, 25 deletions
@@ -65,6 +65,11 @@ source "target/linux/Config.in" endmenu endmenu +menu "Frosted configuration" + visible if ADK_TARGET_OS_FROSTED && !ADK_TARGET_CHOOSE_ARCH +source "target/frosted/Config.in" +endmenu + menu "Toolchain settings" visible if !ADK_TARGET_CHOOSE_ARCH diff --git a/mk/build.mk b/mk/build.mk index de911508c..67a53896a 100644 --- a/mk/build.mk +++ b/mk/build.mk @@ -175,6 +175,9 @@ else ifeq ($(ADK_TARGET_OS_BAREMETAL),y) $(MAKE) -f mk/build.mk package/hostcompile toolchain/final endif +ifeq ($(ADK_TARGET_OS_FROSTED),y) + $(MAKE) -f mk/build.mk package/hostcompile toolchain/final target/config-prepare target/compile target/install +endif ifeq ($(ADK_TARGET_OS_LINUX),y) $(MAKE) -f mk/build.mk package/hostcompile toolchain/final target/config-prepare target/compile package_clean package/compile root_clean package/install target/install package_index endif diff --git a/mk/fetch.mk b/mk/fetch.mk index 636c93154..b6164c03c 100644 --- a/mk/fetch.mk +++ b/mk/fetch.mk @@ -87,6 +87,9 @@ $(1): git clone --progress --depth 1 $${PKG_SITES} $${PKG_NAME}-$${PKG_VERSION} $(DL_TRACE); \ if [ $$$$? -ne 0 ]; then echo "git clone error"; exit 1; fi; \ fi; \ + if [ ! -z "$${PKG_GIT_SUBMODULE}" ]; then \ + (cd $${PKG_NAME}-$${PKG_VERSION}; git submodule update --init --recursive) $(DL_TRACE); \ + fi; \ rm -rf $${PKG_NAME}-$${PKG_VERSION}/.git; \ tar cJf $${PKG_NAME}-$${PKG_VERSION}.tar.xz $${PKG_NAME}-$${PKG_VERSION}; \ touch $$$${filename}.nohash; \ diff --git a/mk/vars.mk b/mk/vars.mk index 7ed0f0c67..ddc015fff 100644 --- a/mk/vars.mk +++ b/mk/vars.mk @@ -85,8 +85,12 @@ ifeq ($(ADK_TARGET_ARCH_CSKY),y) GNU_TARGET_NAME:= $(ADK_TARGET_CPU_ARCH)-unknown-$(ADK_TARGET_LINUXTYPE) endif ifeq ($(ADK_TARGET_LIB_NEWLIB),y) +ifeq ($(ADK_TARGET_OS_FROSTED),y) +GNU_TARGET_NAME:= $(ADK_TARGET_CPU_ARCH)-frosted-$(ADK_TARGET_SUFFIX) +else GNU_TARGET_NAME:= $(ADK_TARGET_CPU_ARCH)-$(ADK_TARGET_SUFFIX) endif +endif TARGET_CROSS:= $(TOOLCHAIN_DIR)/usr/bin/$(GNU_TARGET_NAME)- TARGET_COMPILER_PREFIX?=${TARGET_CROSS} CONFIGURE_TRIPLE:= --build=${GNU_HOST_NAME} \ @@ -235,6 +239,11 @@ ifneq ($(ADK_TARGET_USE_GNU_HASHSTYLE),) TARGET_LDFLAGS+= -Wl,--hash-style=gnu endif +# special operating system flags +ifeq ($(ADK_TARGET_OS_FROSTED),y) +TARGET_CFLAGS+= -mlong-calls -fno-common -msingle-pic-base -mno-pic-data-is-text-relative +endif + # special architecture optimization flags ifeq ($(ADK_TARGET_ARCH_XTENSA),y) ifeq ($(ADK_TARGET_BIG_ENDIAN),) diff --git a/scripts/create-menu b/scripts/create-menu index 0fca6a49f..3c0d87ca9 100755 --- a/scripts/create-menu +++ b/scripts/create-menu @@ -71,8 +71,15 @@ config ADK_TARGET_ARCH EOD for arch in $(cat $topdir/target/arch.lst);do - ARCH=$(echo $arch | tr '[:lower:]' '[:upper:]') - printf "\tdefault \"$arch\" if ADK_TARGET_ARCH_$ARCH\n" >> target/config/Config.in.arch.default + ARCH=$(echo $arch | tr '[:lower:]' '[:upper:]') + printf "\tdefault \"$arch\" if ADK_TARGET_ARCH_$ARCH\n" >> target/config/Config.in.arch.default +done +printf "\n\n" >> target/config/Config.in.arch.default + +for arch in $(cat $topdir/target/arch.lst);do + ARCH=$(echo $arch | tr '[:lower:]' '[:upper:]') + printf "config ADK_TARGET_ARCH_${ARCH}\n" >> $topdir/target/config/Config.in.arch.default + printf "\tbool\n\n" >> $topdir/target/config/Config.in.arch.default done cat > $topdir/target/config/Config.in.arch.choice << EOD @@ -84,21 +91,18 @@ config ADK_TARGET_CHOOSE_ARCH bool "choose architecture" EOD - -for arch in $(cat $topdir/target/arch.lst);do - ARCH=$(echo $arch | tr '[:lower:]' '[:upper:]') - printf "config ADK_TARGET_ARCH_$ARCH\n" >> $topdir/target/config/Config.in.arch.choice - printf "\tbool \"$arch\"\n" >> $topdir/target/config/Config.in.arch.choice - case $arch in - alpha|s390|tile|ppc64|mips64) - printf "\tdepends on ADK_TARGET_OS_LINUX\n" >> $topdir/target/config/Config.in.arch.choice - ;; - cr16|epiphany|m32c|m32r|mn10300|moxie|msp430|rx|v850) - printf "\tdepends on ADK_TARGET_OS_BAREMETAL\n" >> $topdir/target/config/Config.in.arch.choice - ;; - esac - printf "\thelp\n" >> $topdir/target/config/Config.in.arch.choice - printf "\t Support for $ARCH systems.\n\n" >> $topdir/target/config/Config.in.arch.choice +for os in linux frosted baremetal; do + for arch in $(cat $topdir/target/$os/arch.lst);do + OS=$(echo $os | tr '[:lower:]' '[:upper:]') + ARCH=$(echo $arch | tr '[:lower:]' '[:upper:]') + printf "config ADK_TARGET_${OS}_ARCH_${ARCH}\n" >> $topdir/target/config/Config.in.arch.choice + printf "\tbool \"$arch\"\n" >> $topdir/target/config/Config.in.arch.choice + printf "\tdepends on ADK_TARGET_OS_${OS}\n" >> $topdir/target/config/Config.in.arch.choice + printf "\tselect ADK_TARGET_ARCH_${ARCH}\n" >> $topdir/target/config/Config.in.arch.choice + printf "\thelp\n" >> $topdir/target/config/Config.in.arch.choice + printf "\t Support for $ARCH systems.\n\n" >> $topdir/target/config/Config.in.arch.choice + done done printf "endchoice\n" >> $topdir/target/config/Config.in.arch.choice + exit 0 diff --git a/target/Makefile b/target/Makefile index 2b6498011..47626deaa 100644 --- a/target/Makefile +++ b/target/Makefile @@ -31,6 +31,7 @@ ADK_PACKAGE_CRYPTINIT_ROOT:=$(strip $(subst ",, $(ADK_PACKAGE_CRYPTINIT_ROOT))) ADK_PACKAGE_CRYPTINIT_SWAP:=$(strip $(subst ",, $(ADK_PACKAGE_CRYPTINIT_SWAP))) ADK_PACKAGE_CMDLINE:=root=$(ADK_PACKAGE_CRYPTINIT_ROOT) swap=$(ADK_PACKAGE_CRYPTINIT_SWAP) resume=/dev/mapper/swapcrypt +ifeq ($(ADK_TARGET_OS_LINUX),y) ifeq ($(ADK_TARGET_KERNEL_USE_MINICONFIG),y) ifeq ($(ADK_TARGET_KERNEL_CUSTOMISING),y) config-prepare: $(ADK_TOPDIR)/.config @@ -129,13 +130,29 @@ else config-prepare: $(ADK_TOPDIR)/.config @true endif +endif + +ifeq ($(ADK_TARGET_OS_FROSTED),y) +config-prepare: $(ADK_TOPDIR)/.config + @PATH='$(HOST_PATH)' sed -n '/^FROSTED_/s///p' $(ADK_TOPDIR)/.config \ + >$(BUILD_DIR)/.frosted +endif +ifeq ($(ADK_TARGET_OS_FROSTED),y) +prepare: frosted-prepare +compile: frosted-compile +install: frosted-install +endif + + +ifeq ($(ADK_TARGET_OS_LINUX),y) prepare: $(ADK_TARGET_ARCH)-prepare compile: $(ADK_TARGET_ARCH)-compile image: $(ADK_TARGET_ARCH)-imageclean $(ADK_TARGET_ARCH)-imageinstall targethelp: $(ADK_TARGET_ARCH)-targethelp install: $(ADK_TARGET_ARCH)-imageclean $(ADK_TARGET_ARCH)-install $(ADK_TARGET_ARCH)-imageinstall clean: $(ADK_TARGET_ARCH)-clean $(ADK_TARGET_ARCH)-imageclean +endif %-clean: $(START_TRACE) "target/$(patsubst %-clean,%,$@)-clean.. " diff --git a/target/arm/systems/banana-pro b/target/arm/systems/banana-pro index e5bcc2b1c..7a30cb1ed 100644 --- a/target/arm/systems/banana-pro +++ b/target/arm/systems/banana-pro @@ -1,5 +1,6 @@ config ADK_TARGET_SYSTEM_BANANA_PRO bool "Banana Pro" + depends on ADK_TARGET_OS_LINUX depends on ADK_TARGET_LITTLE_ENDIAN select ADK_TARGET_CPU_ARM_CORTEX_A7 select ADK_TARGET_CPU_WITH_NEON diff --git a/target/arm/systems/beaglebone-black b/target/arm/systems/beaglebone-black index d14e6da19..9874d04c7 100644 --- a/target/arm/systems/beaglebone-black +++ b/target/arm/systems/beaglebone-black @@ -1,5 +1,6 @@ config ADK_TARGET_SYSTEM_BEAGLEBONE_BLACK bool "BeagleBone Black" + depends on ADK_TARGET_OS_LINUX depends on ADK_TARGET_LITTLE_ENDIAN select ADK_TARGET_CPU_ARM_CORTEX_A8 select ADK_TARGET_CPU_WITH_NEON diff --git a/target/arm/systems/kinetis-k70 b/target/arm/systems/kinetis-k70 index 82f757bb1..b9373dc1f 100644 --- a/target/arm/systems/kinetis-k70 +++ b/target/arm/systems/kinetis-k70 @@ -1,5 +1,6 @@ config ADK_TARGET_SYSTEM_KINETIS_K70 bool "Kinetis K70" + depends on ADK_TARGET_OS_LINUX depends on ADK_EXPERIMENTAL depends on ADK_TARGET_LITTLE_ENDIAN select ADK_TARGET_CPU_ARM_CORTEX_M3 diff --git a/target/arm/systems/linksys-nslu2 b/target/arm/systems/linksys-nslu2 index 180d6d974..c53bd2799 100644 --- a/target/arm/systems/linksys-nslu2 +++ b/target/arm/systems/linksys-nslu2 @@ -1,5 +1,6 @@ config ADK_TARGET_SYSTEM_LINKSYS_NSLU2 bool "Linksys NSLU2" + depends on ADK_TARGET_OS_LINUX depends on ADK_TARGET_BIG_ENDIAN select ADK_TARGET_CPU_ARM_XSCALE select ADK_TARGET_WITH_USB diff --git a/target/arm/systems/orange-pi0 b/target/arm/systems/orange-pi0 index 9abc2100d..b1414dcfa 100644 --- a/target/arm/systems/orange-pi0 +++ b/target/arm/systems/orange-pi0 @@ -1,5 +1,6 @@ config ADK_TARGET_SYSTEM_ORANGE_PI0 bool "Orange PI Zero" + depends on ADK_TARGET_OS_LINUX depends on ADK_TARGET_LITTLE_ENDIAN select ADK_TARGET_CPU_ARM_CORTEX_A7 select ADK_TARGET_CPU_WITH_NEON diff --git a/target/arm/systems/qemu-arm-lm3s6965evb b/target/arm/systems/qemu-arm-lm3s6965evb new file mode 100644 index 000000000..e82cc04f3 --- /dev/null +++ b/target/arm/systems/qemu-arm-lm3s6965evb @@ -0,0 +1,10 @@ +config ADK_TARGET_SYSTEM_QEMU_ARM_LM3S6965EVB + bool "Qemu Emulator (lm3s6965evb) no MMU" + depends on ADK_TARGET_OS_FROSTED + depends on ADK_TARGET_LITTLE_ENDIAN + select ADK_TARGET_CPU_ARM_CORTEX_M3 + select ADK_TARGET_ARCH_ARM_WITH_THUMB + select ADK_TARGET_QEMU + help + Qemu Emulator for ARM architecture (lm3s6965evb) without MMU. + diff --git a/target/arm/systems/qemu-arm-realview-eb-mpcore b/target/arm/systems/qemu-arm-realview-eb-mpcore index 5a65aca72..e4d60e760 100644 --- a/target/arm/systems/qemu-arm-realview-eb-mpcore +++ b/target/arm/systems/qemu-arm-realview-eb-mpcore @@ -1,5 +1,6 @@ config ADK_TARGET_SYSTEM_QEMU_ARM_REALVIEW_EB_MPCORE bool "Qemu Emulator (Realview/EB-Mpcore)" + depends on ADK_TARGET_OS_LINUX depends on ADK_TARGET_LITTLE_ENDIAN select ADK_TARGET_CPU_ARM_ARM11MPCORE select ADK_TARGET_QEMU diff --git a/target/arm/systems/qemu-arm-spitz b/target/arm/systems/qemu-arm-spitz index a695065e6..f3d70314d 100644 --- a/target/arm/systems/qemu-arm-spitz +++ b/target/arm/systems/qemu-arm-spitz @@ -1,5 +1,6 @@ config ADK_TARGET_SYSTEM_QEMU_ARM_SPITZ bool "Qemu Emulator (Spitz PDA)" + depends on ADK_TARGET_OS_LINUX depends on ADK_TARGET_LITTLE_ENDIAN select ADK_TARGET_CPU_ARM_XSCALE select ADK_TARGET_QEMU diff --git a/target/arm/systems/qemu-arm-terrier b/target/arm/systems/qemu-arm-terrier index f6dbd6b6b..66bed2723 100644 --- a/target/arm/systems/qemu-arm-terrier +++ b/target/arm/systems/qemu-arm-terrier @@ -1,5 +1,6 @@ config ADK_TARGET_SYSTEM_QEMU_ARM_TERRIER bool "Qemu Emulator (Terrier PDA)" + depends on ADK_TARGET_OS_LINUX depends on ADK_TARGET_LITTLE_ENDIAN select ADK_TARGET_CPU_ARM_XSCALE select ADK_TARGET_QEMU diff --git a/target/arm/systems/qemu-arm-versatilepb b/target/arm/systems/qemu-arm-versatilepb index 2ab7f712f..ab100fc2c 100644 --- a/target/arm/systems/qemu-arm-versatilepb +++ b/target/arm/systems/qemu-arm-versatilepb @@ -1,5 +1,6 @@ config ADK_TARGET_SYSTEM_QEMU_ARM_VERSATILEPB bool "Qemu Emulator (Versatile/PB)" + depends on ADK_TARGET_OS_LINUX depends on ADK_TARGET_LITTLE_ENDIAN select ADK_TARGET_CPU_ARM_ARM926EJ_S select ADK_TARGET_QEMU diff --git a/target/arm/systems/qemu-arm-versatilepb-nommu b/target/arm/systems/qemu-arm-versatilepb-nommu index a1aef83db..599b1e7b3 100644 --- a/target/arm/systems/qemu-arm-versatilepb-nommu +++ b/target/arm/systems/qemu-arm-versatilepb-nommu @@ -1,5 +1,6 @@ config ADK_TARGET_SYSTEM_QEMU_ARM_VERSATILEPB_NOMMU bool "Qemu Emulator (Versatile/PB) no MMU" + depends on ADK_TARGET_OS_LINUX depends on ADK_TARGET_LITTLE_ENDIAN select ADK_TARGET_CPU_ARM_ARM926EJ_S_NOMMU select ADK_TARGET_QEMU diff --git a/target/arm/systems/qemu-arm-vexpress-a9 b/target/arm/systems/qemu-arm-vexpress-a9 index faff5f31b..b69ff7d59 100644 --- a/target/arm/systems/qemu-arm-vexpress-a9 +++ b/target/arm/systems/qemu-arm-vexpress-a9 @@ -1,5 +1,6 @@ config ADK_TARGET_SYSTEM_QEMU_ARM_VEXPRESS_A9 bool "Qemu Emulator (Vexpress A9)" + depends on ADK_TARGET_OS_LINUX depends on ADK_TARGET_LITTLE_ENDIAN select ADK_TARGET_CPU_ARM_CORTEX_A9 select ADK_TARGET_QEMU diff --git a/target/arm/systems/qemu-arm-xilinx-zynq b/target/arm/systems/qemu-arm-xilinx-zynq index fa6641d10..c00543509 100644 --- a/target/arm/systems/qemu-arm-xilinx-zynq +++ b/target/arm/systems/qemu-arm-xilinx-zynq @@ -1,5 +1,6 @@ config ADK_TARGET_SYSTEM_QEMU_ARM_XILINX_ZYNQ bool "Qemu Emulator (Xilinx Zynq)" + depends on ADK_TARGET_OS_LINUX select ADK_TARGET_CPU_ARM_CORTEX_A9 select ADK_TARGET_QEMU select ADK_TARGET_KERNEL_ZIMAGE diff --git a/target/arm/systems/raspberry-pi b/target/arm/systems/raspberry-pi index 2dd918c9d..4768f8978 100644 --- a/target/arm/systems/raspberry-pi +++ b/target/arm/systems/raspberry-pi @@ -1,5 +1,6 @@ config ADK_TARGET_SYSTEM_RASPBERRY_PI bool "Raspberry PI" + depends on ADK_TARGET_OS_LINUX depends on ADK_TARGET_LITTLE_ENDIAN select ADK_TARGET_CPU_ARM_ARM1176JZF_S select ADK_TARGET_BOARD_BCM28XX diff --git a/target/arm/systems/raspberry-pi0 b/target/arm/systems/raspberry-pi0 index 9072c2818..0c5d79a5a 100644 --- a/target/arm/systems/raspberry-pi0 +++ b/target/arm/systems/raspberry-pi0 @@ -1,5 +1,6 @@ config ADK_TARGET_SYSTEM_RASPBERRY_PI0 bool "Raspberry PI Zero W" + depends on ADK_TARGET_OS_LINUX depends on ADK_TARGET_LITTLE_ENDIAN select ADK_TARGET_CPU_ARM_ARM1176JZF_S select ADK_TARGET_BOARD_BCM28XX diff --git a/target/arm/systems/raspberry-pi2 b/target/arm/systems/raspberry-pi2 index 76abde793..7c782d2e2 100644 --- a/target/arm/systems/raspberry-pi2 +++ b/target/arm/systems/raspberry-pi2 @@ -1,5 +1,6 @@ config ADK_TARGET_SYSTEM_RASPBERRY_PI2 bool "Raspberry PI 2" + depends on ADK_TARGET_OS_LINUX depends on ADK_TARGET_LITTLE_ENDIAN select ADK_TARGET_CPU_ARM_CORTEX_A7 select ADK_TARGET_BOARD_BCM28XX diff --git a/target/arm/systems/raspberry-pi3 b/target/arm/systems/raspberry-pi3 index 61f4100d8..4c955d202 100644 --- a/target/arm/systems/raspberry-pi3 +++ b/target/arm/systems/raspberry-pi3 @@ -1,5 +1,6 @@ config ADK_TARGET_SYSTEM_RASPBERRY_PI3 bool "Raspberry PI 3" + depends on ADK_TARGET_OS_LINUX depends on ADK_TARGET_LITTLE_ENDIAN select ADK_TARGET_CPU_ARM_CORTEX_A53 select ADK_TARGET_BOARD_BCM28XX diff --git a/target/arm/systems/sharp-zaurus b/target/arm/systems/sharp-zaurus index f30c4922f..d2e9ea139 100644 --- a/target/arm/systems/sharp-zaurus +++ b/target/arm/systems/sharp-zaurus @@ -1,5 +1,6 @@ config ADK_TARGET_SYSTEM_SHARP_ZAURUS bool "Sharp Zaurus CL3200 (Terrier)" + depends on ADK_TARGET_OS_LINUX depends on ADK_TARGET_LITTLE_ENDIAN select ADK_TARGET_CPU_ARM_XSCALE select ADK_TARGET_CPU_WITH_IWMMXT diff --git a/target/arm/systems/solidrun-clearfog b/target/arm/systems/solidrun-clearfog index a0f61e091..d912c6c22 100644 --- a/target/arm/systems/solidrun-clearfog +++ b/target/arm/systems/solidrun-clearfog @@ -1,5 +1,6 @@ config ADK_TARGET_SYSTEM_SOLIDRUN_CLEARFOG bool "Solidrun Clearfog Embedded Systems" + depends on ADK_TARGET_OS_LINUX depends on ADK_EXPERIMENTAL depends on ADK_TARGET_LITTLE_ENDIAN select ADK_TARGET_CPU_ARM_CORTEX_A9 diff --git a/target/arm/systems/solidrun-imx6 b/target/arm/systems/solidrun-imx6 index 604a0b042..089161913 100644 --- a/target/arm/systems/solidrun-imx6 +++ b/target/arm/systems/solidrun-imx6 @@ -1,5 +1,6 @@ config ADK_TARGET_SYSTEM_SOLIDRUN_IMX6 bool "Solidrun IMX6 Embedded Systems" + depends on ADK_TARGET_OS_LINUX depends on ADK_TARGET_LITTLE_ENDIAN select ADK_TARGET_CPU_ARM_CORTEX_A9 select ADK_TARGET_WITH_VGA diff --git a/target/arm/systems/st-stm32f429 b/target/arm/systems/st-stm32f429 index 1190fddbf..7a9e0f1b6 100644 --- a/target/arm/systems/st-stm32f429 +++ b/target/arm/systems/st-stm32f429 @@ -1,6 +1,5 @@ config ADK_TARGET_SYSTEM_ST_STM32F429 bool "STMicroelectronics STM32F429" - depends on ADK_EXPERIMENTAL depends on ADK_TARGET_LITTLE_ENDIAN select ADK_TARGET_CPU_ARM_CORTEX_M4 select ADK_TARGET_ARCH_ARM_WITH_THUMB diff --git a/target/arm/systems/st-stm32f769 b/target/arm/systems/st-stm32f769 index 2227e16db..4f6571851 100644 --- a/target/arm/systems/st-stm32f769 +++ b/target/arm/systems/st-stm32f769 @@ -1,6 +1,5 @@ config ADK_TARGET_SYSTEM_ST_STM32F769 bool "STMicroelectronics STM32F769" - depends on ADK_EXPERIMENTAL depends on ADK_TARGET_LITTLE_ENDIAN select ADK_TARGET_CPU_ARM_CORTEX_M7 select ADK_TARGET_HARD_FLOAT_DP diff --git a/target/baremetal/arch.lst b/target/baremetal/arch.lst new file mode 100644 index 000000000..b54278d62 --- /dev/null +++ b/target/baremetal/arch.lst @@ -0,0 +1,38 @@ +aarch64 +arc +arm +avr32 +bfin +c6x +cr16 +cris +csky +epiphany +frv +h8300 +hppa +ia64 +lm32 +m32c +m32r +m68k +metag +microblaze +mips +mn10300 +moxie +msp430 +nds32 +nios2 +or1k +ppc +riscv32 +riscv64 +rx +sparc +sparc64 +sh +v850 +x86 +x86_64 +xtensa diff --git a/target/config/Config.in.binfmt b/target/config/Config.in.binfmt index 7567b07bc..9257fe69d 100644 --- a/target/config/Config.in.binfmt +++ b/target/config/Config.in.binfmt @@ -26,6 +26,11 @@ config ADK_TARGET_BINFMT_DSBT endchoice +config ADK_TARGET_BINFMT_FLAT + bool + depends on ADK_TARGET_OS_FROSTED + default y + # Set up flat binary type choice prompt "FLAT Binary type" diff --git a/target/config/Config.in.libc b/target/config/Config.in.libc index 07c643606..1989e1c00 100644 --- a/target/config/Config.in.libc +++ b/target/config/Config.in.libc @@ -125,7 +125,8 @@ config ADK_TARGET_LIB_NEWLIB ADK_TARGET_ARCH_V850 || \ ADK_TARGET_ARCH_X86 || \ ADK_TARGET_ARCH_X86_64 || \ - ADK_TARGET_ARCH_XTENSA) && ADK_TARGET_OS_BAREMETAL + ADK_TARGET_ARCH_XTENSA) && \ + (ADK_TARGET_OS_BAREMETAL || ADK_TARGET_OS_FROSTED) help https://sourceware.org/newlib/ @@ -164,15 +165,19 @@ config ADK_TARGET_LIB_MUSL_GIT config ADK_TARGET_LIB_NEWLIB_2_5_0 bool "2.5.0" - depends on ADK_TARGET_LIB_NEWLIB && !ADK_TARGET_ARCH_RISCV + depends on ADK_TARGET_LIB_NEWLIB && !ADK_TARGET_ARCH_RISCV && !ADK_TARGET_OS_FROSTED config ADK_TARGET_LIB_NEWLIB_RISCV bool "2.4.0-riscv" depends on ADK_TARGET_LIB_NEWLIB && ADK_TARGET_ARCH_RISCV +config ADK_TARGET_LIB_NEWLIB_FROSTED + bool "frosted-git" + depends on ADK_TARGET_LIB_NEWLIB && ADK_TARGET_OS_FROSTED + config ADK_TARGET_LIB_NEWLIB_GIT bool "git" - depends on ADK_TARGET_LIB_NEWLIB && !ADK_TARGET_ARCH_RISCV + depends on ADK_TARGET_LIB_NEWLIB && !ADK_TARGET_ARCH_RISCV && !ADK_TARGET_OS_FROSTED endchoice diff --git a/target/config/Config.in.os b/target/config/Config.in.os index 1d21d09e8..2eb420e14 100644 --- a/target/config/Config.in.os +++ b/target/config/Config.in.os @@ -9,6 +9,11 @@ config ADK_TARGET_OS_LINUX help Create a Linux system or toolchain. +config ADK_TARGET_OS_FROSTED + bool "Frosted" + help + Create a frosted appliance or toolchain. + config ADK_TARGET_OS_BAREMETAL bool "Bare metal" help diff --git a/target/frosted/Config.in b/target/frosted/Config.in new file mode 100644 index 000000000..3ed716f71 --- /dev/null +++ b/target/frosted/Config.in @@ -0,0 +1,988 @@ +menu "Compiler options" + config FROSTED_GDB_CFLAG + bool "Keep debugging symbols" + default y + + choice + prompt "Compiler optimization" + config FROSTED_OPTIMIZE_NONE + bool "No optimization" + + config FROSTED_OPTIMIZE_SIZE + bool "Optimize for size" + + config FROSTED_OPTIMIZE_PERF + bool "Optimize for performance" + endchoice + + +endmenu + + +menu "Platform Selection" + + choice FROSTED_ARCH + prompt "Architecture" + default FROSTED_ARCH_LM3S + + config FROSTED_ARCH_LM3S + bool "LM3S" + help + Enable support for Stellaris LM3S systems + + config FROSTED_ARCH_LPC17XX + bool "LPC17XX" + help + Enable support for NXP LPC17xx systems + + config FROSTED_ARCH_STM32F4 + bool "STM32F4" + help + Enable support for ST STM32F4 systems + + config FROSTED_ARCH_STM32F7 + bool "STM32F7" + help + Enable support for ST STM32F7 systems + endchoice + +if FROSTED_ARCH_STM32F7 + +choice + prompt "MCU" + default FROSTED_ARCH_STM32F746_NG + +config FROSTED_ARCH_STM32F746_NG + bool "STM32F746NG 1MB" + select FROSTED_FLASH_SIZE_1MB + select FROSTED_RAM_SIZE_320KB + select FROSTED_ARCH_STM32F746 + +config FROSTED_ARCH_STM32F769_NI + bool "STM32F769NI 2MB" + select FROSTED_FLASH_SIZE_2MB + select FROSTED_RAM_SIZE_368KB + select FROSTED_ARCH_STM32F769 + +endchoice + +endif + +if FROSTED_ARCH_STM32F4 + +choice + prompt "MCU" + default FROSTED_ARCH_STM32F407_XG + +config FROSTED_ARCH_STM32F401_XB + bool "STM32F401xB 128KB" + select FROSTED_FLASH_SIZE_128KB + select FROSTED_RAM_SIZE_64KB + select FROSTED_ARCH_STM32F401 +config FROSTED_ARCH_STM32F401_XC + bool "STM32F401xC 256KB" + select FROSTED_FLASH_SIZE_256KB + select FROSTED_RAM_SIZE_64KB + select FROSTED_ARCH_STM32F401 +config FROSTED_ARCH_STM32F401_XD + bool "STM32F401xD 384KB" + select FROSTED_FLASH_SIZE_384KB + select FROSTED_RAM_SIZE_96KB + select FROSTED_ARCH_STM32F401 +config FROSTED_ARCH_STM32F401_XE + bool "STM32F401xE 512KB" + select FROSTED_FLASH_SIZE_512KB + select FROSTED_RAM_SIZE_96KB + select FROSTED_ARCH_STM32F401 + +config FROSTED_ARCH_STM32F405_XG + bool "STM32F405xG 1MB" + select FROSTED_FLASH_SIZE_1MB + select FROSTED_RAM_SIZE_192KB + select FROSTED_ARCH_STM32F405 +config FROSTED_ARCH_STM32F405_XE + bool "STM32F407xE 512KB" + select FROSTED_FLASH_SIZE_512KB + select FROSTED_RAM_SIZE_192KB + select FROSTED_ARCH_STM32F405 + +config FROSTED_ARCH_STM32F407_XG + bool "STM32F407xG 1MB" + select FROSTED_FLASH_SIZE_1MB + select FROSTED_RAM_SIZE_192KB + select FROSTED_ARCH_STM32F407 +config FROSTED_ARCH_STM32F407_XE + bool "STM32F407xE 512KB" + select FROSTED_FLASH_SIZE_512KB + select FROSTED_RAM_SIZE_192KB + select FROSTED_ARCH_STM32F407 + +config FROSTED_ARCH_STM32F411_XE + bool "STM32F411xE 512KB" + select FROSTED_FLASH_SIZE_512KB + select FROSTED_RAM_SIZE_128KB + select FROSTED_ARCH_STM32F411 +config FROSTED_ARCH_STM32F411_XC + bool "STM32F411xC 256KB" + select FROSTED_FLASH_SIZE_256KB + select FROSTED_RAM_SIZE_128KB + select FROSTED_ARCH_STM32F411 + +config FROSTED_ARCH_STM32F429_XE + bool "STM32F429xE 512KB" + select FROSTED_FLASH_SIZE_512KB + select FROSTED_RAM_SIZE_256KB + select FROSTED_ARCH_STM32F429 +config FROSTED_ARCH_STM32F429_XG + bool "STM32F429xG 1MB" + select FROSTED_FLASH_SIZE_1MB + select FROSTED_RAM_SIZE_256KB + select FROSTED_ARCH_STM32F429 +config FROSTED_ARCH_STM32F429_XI + bool "STM32F429xI 2MB" + select FROSTED_FLASH_SIZE_2MB + select FROSTED_RAM_SIZE_256KB + select FROSTED_ARCH_STM32F429 +config FROSTED_ARCH_STM32F446_ZE + bool "STM32F446ZE 512KB" + select FROSTED_FLASH_SIZE_512KB + select FROSTED_RAM_SIZE_128KB + select FROSTED_ARCH_STM32F446 +endchoice + +endif + +if FROSTED_ARCH_LPC17XX + +choice + prompt "MCU" + default FROSTED_ARCH_LPC1768 +config FROSTED_ARCH_LPC1763 + bool "LPC1763" + select FROSTED_FLASH_SIZE_256KB + select FROSTED_RAM_SIZE_32KB + select FROSTED_CLK_100MHZ +config FROSTED_ARCH_LPC1764 + bool "LPC1764" + select FROSTED_FLASH_SIZE_128KB + select FROSTED_RAM_SIZE_16KB + select FROSTED_CLK_100MHZ +config FROSTED_ARCH_LPC1765 + bool "LPC1765" + select FROSTED_FLASH_SIZE_256KB + select FROSTED_RAM_SIZE_32KB + select FROSTED_CLK_100MHZ +config FROSTED_ARCH_LPC1766 + bool "LPC1766" + select FROSTED_FLASH_SIZE_256KB + select FROSTED_RAM_SIZE_32KB + select FROSTED_CLK_100MHZ +config FROSTED_ARCH_LPC1767 + bool "LPC1767" + select FROSTED_FLASH_SIZE_512KB + select FROSTED_RAM_SIZE_32KB + select FROSTED_CLK_100MHZ +config FROSTED_ARCH_LPC1768 + bool "LPC1768" + select FROSTED_FLASH_SIZE_512KB + select FROSTED_RAM_SIZE_32KB + select FROSTED_CLK_100MHZ +config FROSTED_ARCH_LPC1769 + bool "LPC1769" + select FROSTED_FLASH_SIZE_512KB + select FROSTED_RAM_SIZE_32KB +endchoice + +endif + +if FROSTED_ARCH_LM3S + +choice + prompt "MCU" + default FROSTED_LM3S6965 +config FROSTED_ARCH_LM3S6965 + bool "LM3S6965" + select FROSTED_FLASH_SIZE_256KB + select FROSTED_RAM_SIZE_64KB +config FROSTED_ARCH_LM3SVIRT + bool "LM3S-VIRTUAL" + select FROSTED_FLASH_SIZE_1MB + select FROSTED_RAM_SIZE_256KB +endchoice + +endif + + config FROSTED_FLASH_SIZE_2MB + bool + config FROSTED_FLASH_SIZE_1MB + bool + config FROSTED_FLASH_SIZE_512KB + bool + config FROSTED_FLASH_SIZE_384KB + bool + config FROSTED_FLASH_SIZE_256KB + bool + config FROSTED_FLASH_SIZE_128KB + bool + + config FROSTED_RAM_SIZE_368KB + bool + config FROSTED_RAM_SIZE_320KB + bool + config FROSTED_RAM_SIZE_256KB + bool + config FROSTED_RAM_SIZE_192KB + bool + config FROSTED_RAM_SIZE_128KB + bool + config FROSTED_RAM_SIZE_96KB + bool + config FROSTED_RAM_SIZE_64KB + bool + config FROSTED_RAM_SIZE_32KB + bool + config FROSTED_RAM_SIZE_16KB + bool + + config FROSTED_ARCH_STM32F401 + bool + config FROSTED_ARCH_STM32F405 + bool + config FROSTED_ARCH_STM32F407 + bool + config FROSTED_ARCH_STM32F411 + bool + config FROSTED_ARCH_STM32F429 + bool + config FROSTED_ARCH_STM32F446 + bool + config FROSTED_ARCH_STM32F746 + bool + config FROSTED_ARCH_STM32F769 + bool + + config FROSTED_DEVSTM32DMA + bool + + #Temp hack to allow '407 & '411 clock setups to coexist + choice + prompt "Clock Speed" + config FROSTED_CLK_48MHZ + bool "48MHz" + depends on (FROSTED_ARCH_STM32F401 || FROSTED_ARCH_STM32F411 || FROSTED_ARCH_STM32F429) + config FROSTED_CLK_84MHZ + bool "84MHz" + depends on (FROSTED_ARCH_STM32F401 ||FROSTED_ARCH_STM32F411 || FROSTED_ARCH_STM32F429) + config FROSTED_CLK_100MHZ + bool "100MHz" + depends on FROSTED_ARCH_LPC17XX + config FROSTED_CLK_120MHZ + bool "120MHz" + depends on (FROSTED_ARCH_STM32F407 || FROSTED_ARCH_STM32F405 || FROSTED_ARCH_LPC1769) + config FROSTED_CLK_168MHZ + bool "168MHz" + depends on (FROSTED_ARCH_STM32F407 || FROSTED_ARCH_STM32F405 || FROSTED_ARCH_STM32F429) + config FROSTED_CLK_180MHZ + bool "180MHz" + depends on (FROSTED_ARCH_STM32F446) + config FROSTED_CLK_216MHZ + bool "216MHZ" + depends on (FROSTED_ARCH_STM32F746 || FROSTED_ARCH_STM32F769) + endchoice + + choice + prompt "Board" + default FROSTED_MACH_STM32F407Discovery + config FROSTED_MACH_STM32F746Discovery + bool "STM32F746 Discovery" + depends on (FROSTED_ARCH_STM32F746) + default y + config FROSTED_MACH_STM32F769Discovery + bool "STM32F769 Discovery" + depends on (FROSTED_ARCH_STM32F769) + default y + config FROSTED_MACH_STM32F746Nucleo144 + bool "STM32F746 Nucleo-144" + depends on (FROSTED_ARCH_STM32F746) + default y + config FROSTED_MACH_STM32F407Discovery + bool "STM32F407Discovery" + depends on (FROSTED_ARCH_STM32F407) + default y + config FROSTED_MACH_STM32F405Pyboard + bool "STM32F405 PyBoard (micropython)" + depends on (FROSTED_ARCH_STM32F405) + default y + config FROSTED_MACH_STM32F4x1Discovery + bool "STM32F4x1Discovery" + depends on ( FROSTED_ARCH_STM32F401 ||FROSTED_ARCH_STM32F411) + default y + config FROSTED_MACH_STM32F429Discovery + bool "STM32F429Discovery" + depends on (FROSTED_ARCH_STM32F429) + default y + config FROSTED_MACH_STM32F446Nucleo + bool "STM32F446 Nucleo" + depends on (FROSTED_ARCH_STM32F446) + default y + + config FROSTED_MACH_LPC1768MBED + bool "LPC1768MBED" + depends on FROSTED_ARCH_LPC1768 + config FROSTED_MACH_SEEEDPRO + bool "SEEEDPRO" + depends on FROSTED_ARCH_LPC1768 + default y + config FROSTED_MACH_LPC1679XPRESSO + bool "LPC1679XPRESSO" + depends on FROSTED_ARCH_LPC1769 + default y + config FROSTED_MACH_LM3S6965EVB + bool "lm3s6965evb" + depends on FROSTED_ARCH_LM3S6965 + default y + config FROSTED_MACH_LM3SVIRT + bool "lm3s-qemu" + depends on FROSTED_ARCH_LM3SVIRT + default y + + endchoice + + config FROSTED_STM32F7_SDRAM + depends on FROSTED_ARCH_STM32F7 + bool "Enable external SDRAM" + default y + + config FROSTED_STM32F4_SDRAM + depends on FROSTED_ARCH_STM32F4 + bool "Enable external SDRAM" + default n + +endmenu + + +menu "Kernel Configuration" + +config FROSTED_KFLASHMEM_SIZE + int "Kernel Flash size (KB)" + default 64 + +config FROSTED_KRAMMEM_SIZE + int "Kernel RAM size (KB)" + default 64 + +choice +prompt "Tasks Stack Size" +default FROSTED_TASK_STACK_SIZE_2K + + config FROSTED_TASK_STACK_SIZE_1K + bool "Tiny stack (1024 Bytes)" + + config FROSTED_TASK_STACK_SIZE_2K + bool "Small stack (2048 Bytes)" + + config FROSTED_TASK_STACK_SIZE_4K + bool "Big stack (4096 Bytes)" + + config FROSTED_TASK_STACK_SIZE_8K + bool "Huge stack (8192 Bytes)" +endchoice + +config FROSTED_MPU +bool "Run-time Memory Protection" +default y + +config FROSTED_PTHREADS +bool "POSIX Threads (pthreads)" +default y + +config FROSTED_SIGNALS +bool "Process Signals" +default y + +config FROSTED_PIPE +bool "Pipe" +default y + +config FROSTED_SOCK_UNIX +bool "UNIX Sockets for IPC" +default n + + +endmenu + + + +menu "Debugging options" + +config FROSTED_KLOG + bool "Enable kernel logging" + default y + +config FROSTED_KLOG_SIZE + depends on FROSTED_KLOG + int "Kernel log buffer size" + default 256 + +config FROSTED_MEMFAULT_DBG + bool "Enable extended segfault debug" + default y + +config FROSTED_HARDFAULT_DBG + bool "Enable extended hardfault debug" + default n + +config FROSTED_STRACE + bool "Enable syscall tracer" + default n + +endmenu + + +menu "Filesystems" + config FROSTED_SYSFS + bool "SysFS (/sys)" + default y + + config FROSTED_MEMFS + bool "MemFS" + default y + + config FROSTED_XIPFS + bool "Xip FS" + default y + + config FROSTED_FATFS + bool "Fat FS" + default n + + config FROSTED_FAT32 + depends on FROSTED_FATFS + bool "Fat32 support" + default n + + config FROSTED_FAT16 + depends on FROSTED_FATFS + bool "Fat16 support" + default y + +endmenu + +menu "Networking" + config FROSTED_SOCK_INET + bool "TCP/IP Socket support" + default n + config FROSTED_TCPIP_MEMPOOL_YN + bool "Separate memory pool for TCP/IP stack" + default n + if FROSTED_TCPIP_MEMPOOL_YN + config FROSTED_TCPIP_MEMPOOL + string "TCP/IP pool base address" + default "0x10000000" + endif + choice FROSTED_NET_STACK + prompt "TCP/IP stack selection" + default FROSTED_PICOTCP + depends on FROSTED_SOCK_INET + + config FROSTED_PICOTCP + bool "Built-in PicoTCP" + default y + endchoice + +if FROSTED_PICOTCP + +menu "picoTCP configuration" + +config FROSTED_CONFIG_PICOTCP_IPV4 + bool "Support for IP version 4" + default y + +config FROSTED_CONFIG_PICOTCP_IPV6 + bool "Support for IP version 6" + default n + +config FROSTED_CONFIG_PICOTCP_TCP + bool "Support for TCP" + default y + +config FROSTED_CONFIG_PICOTCP_UDP + bool "Support for UDP" + default y + +config FROSTED_CONFIG_PICOTCP_DNS + bool "Support for DNS client" + default y + +config FROSTED_CONFIG_PICOTCP_MCAST + bool "Support for Multicast" + default n + +config FROSTED_CONFIG_PICOTCP_NAT + bool "Support for NAT" + default n + +config FROSTED_CONFIG_PICOTCP_IPFILTER + bool "Support for IP Filter" + default n + +config FROSTED_CONFIG_PICOTCP_LOOP + bool "Support for loopback device" + default y + +config FROSTED_CONFIG_PICOTCP_DEBUG + bool "Activate debugging symbols" + default n + +endmenu +endif + +endmenu + +menu "Device Drivers" + config FROSTED_DEVNULL + bool "Support for /dev/null and /dev/zero" + default y + + menuconfig FROSTED_DEVUART + bool "Generic UART driver" + default y + + if FROSTED_DEVUART + + config FROSTED_USART_0 + bool "USART 0" + depends on (FROSTED_ARCH_LM3S6965 || FROSTED_ARCH_LM3SVIRT) + + config FROSTED_USART_1 + bool "USART 1" + depends on (FROSTED_ARCH_LM3S6965 || FROSTED_ARCH_LM3SVIRT || \ + FROSTED_ARCH_STM32F401 ||FROSTED_ARCH_STM32F411 || FROSTED_ARCH_STM32F405 || FROSTED_ARCH_STM32F407 || FROSTED_ARCH_STM32F429 || FROSTED_ARCH_STM32F446 || \ + FROSTED_ARCH_STM32F746 || FROSTED_ARCH_STM32F769) + + config FROSTED_USART_2 + bool "USART 2" + depends on (FROSTED_ARCH_LM3S6965 || FROSTED_ARCH_LM3SVIRT || \ + FROSTED_ARCH_STM32F401 || FROSTED_ARCH_STM32F411 || FROSTED_ARCH_STM32F405 || FROSTED_ARCH_STM32F429 || FROSTED_ARCH_STM32F407 || FROSTED_ARCH_STM32F446 || \ + FROSTED_ARCH_STM32F746 || FROSTED_ARCH_STM32F769 ) + + config FROSTED_USART_3 + bool "USART 3" + depends on (FROSTED_ARCH_STM32F407 || FROSTED_ARCH_STM32F405 || FROSTED_ARCH_STM32F746 || FROSTED_ARCH_STM32F769 ) + + config FROSTED_USART_6 + bool "USART 6" + depends on (FROSTED_ARCH_STM32F401 ||FROSTED_ARCH_STM32F411 || FROSTED_ARCH_STM32F407 || FROSTED_ARCH_STM32F405 || FROSTED_ARCH_STM32F446 || \ + FROSTED_ARCH_STM32F746 || FROSTED_ARCH_STM32F769 ) + + config FROSTED_UART_0 + bool "UART 0" + depends on FROSTED_ARCH_LPC17XX + + config FROSTED_UART_1 + bool "UART 1" + depends on FROSTED_ARCH_LPC17XX + + config FROSTED_UART_2 + bool "UART 2" + depends on FROSTED_ARCH_LPC17XX + + config FROSTED_UART_3 + bool "UART 3" + depends on FROSTED_ARCH_LPC17XX + + endif + + config FROSTED_DEVF4DSP + bool "STM32F4 Sound driver" + depends on (FROSTED_ARCH_STM32F401 ||FROSTED_ARCH_STM32F411 || FROSTED_ARCH_STM32F407 || FROSTED_ARCH_STM32F405 || FROSTED_ARCH_STM32F429 || FROSTED_ARCH_STM32F446) + select FROSTED_DEVSTM32DMA + default n + + config FROSTED_DEVSTM32USB + bool + + menuconfig FROSTED_DEVSTM32USBFS + bool "Support for Full Speed USB OTG" + depends on (!FROSTED_DEVSTM32USBHFS) && (FROSTED_ARCH_STM32F401 ||FROSTED_ARCH_STM32F411 || FROSTED_ARCH_STM32F407 || FROSTED_ARCH_STM32F405 || FROSTED_ARCH_STM32F429 || FROSTED_ARCH_STM32F446 || \ + FROSTED_ARCH_STM32F746) + default n + select FROSTED_DEVSTM32USB + if FROSTED_DEVSTM32USBFS + choice + prompt "USB FS OTG mode" + default FROSTED_USBFS_GUEST + config FROSTED_USBFS_HOST + bool "Host mode" + + config FROSTED_USBFS_GUEST + bool "Device mode" + + endchoice + endif + + menuconfig FROSTED_DEVSTM32USBHS + bool "Support for High Speed USB OTG" + depends on (FROSTED_ARCH_STM32F746 || FROSTED_ARCH_STM32F769) + select FROSTED_DEVSTM32USB + default n + if FROSTED_DEVSTM32USBHS + choice + prompt "USB HS OTG mode" + default FROSTED_USBHS_GUEST + config FROSTED_USBHS_HOST + bool "Host mode" + + config FROSTED_USBHS_GUEST + bool "Device mode" + + endchoice + + endif + + config FROSTED_DEV_USB_ETH + depends on FROSTED_PICOTCP && ( (FROSTED_DEVSTM32USBHS && FROSTED_USBHS_GUEST) || (FROSTED_DEVSTM32USBFS && FROSTED_USBFS_GUEST) ) + select FROSTED_DEVSTM32USB + bool "Ethernet over USB (CDC-ECM)" + default n + + if FROSTED_DEV_USB_ETH + config FROSTED_USB_DEFAULT_IP + string "Default (boot-up) address for usb0" + default 192.168.6.150 + + config FROSTED_USB_DEFAULT_NM + string "Default (boot-up) netmask for usb0" + default 255.255.255.0 + + config FROSTED_USB_DEFAULT_GW + string "Default (boot-up) gateway for usb0" + default 192.168.6.1 + endif + + + config FROSTED_DEVTIM + bool "System CPU timer on TIM2" + depends on (FROSTED_ARCH_STM32F401 ||FROSTED_ARCH_STM32F411 || FROSTED_ARCH_STM32F407 || FROSTED_ARCH_STM32F405 || FROSTED_ARCH_STM32F429 || FROSTED_ARCH_STM32F446 || FROSTED_ARCH_STM32F746) + default n + + config FROSTED_DEVADC + bool "Generic ADC driver" + depends on (FROSTED_ARCH_STM32F401 ||FROSTED_ARCH_STM32F411 || FROSTED_ARCH_STM32F407 || FROSTED_ARCH_STM32F405 || FROSTED_ARCH_STM32F429 || FROSTED_ARCH_STM32F446) + select FROSTED_DEVSTM32DMA + default n + + + config FROSTED_DEVF4ETH + bool "STM32F4 Ethernet driver" + depends on ((FROSTED_ARCH_STM32F401 ||FROSTED_ARCH_STM32F411 || FROSTED_ARCH_STM32F407 || FROSTED_ARCH_STM32F405 || FROSTED_ARCH_STM32F429 || FROSTED_ARCH_STM32F446) && FROSTED_PICOTCP) + default n + + config FROSTED_DEVF7ETH + bool "STM32F7 Ethernet driver" + depends on ((FROSTED_ARCH_STM32F746 || FROSTED_ARCH_STM32F769) && FROSTED_PICOTCP) + default n + + config FROSTED_DEVLM3SETH + bool "LM3S Ethernet driver" + depends on ((FROSTED_ARCH_LM3S) && FROSTED_PICOTCP) + default n + + if FROSTED_DEVF4ETH || FROSTED_DEVF7ETH || FROSTED_DEVLM3SETH + config FROSTED_ETH_DEFAULT_IP + string "Default (boot-up) address for eth0" + default 192.168.2.150 + + config FROSTED_ETH_DEFAULT_NM + string "Default (boot-up) netmask for eth0" + default 255.255.255.0 + + config FROSTED_ETH_DEFAULT_GW + string "Default (boot-up) gateway for eth0" + default 192.168.2.1 + + endif + + config FROSTED_DEVSTM32SDIO + bool "STM32F4 SD I/O driver" + depends on (FROSTED_ARCH_STM32F401 ||FROSTED_ARCH_STM32F411 || FROSTED_ARCH_STM32F407 || FROSTED_ARCH_STM32F405 || FROSTED_ARCH_STM32F429 || FROSTED_ARCH_STM32F7|| FROSTED_ARCH_STM32F446) + default n + + menuconfig FROSTED_DEVSTM32I2C + bool "STM32 I2C driver" + depends on (FROSTED_ARCH_STM32F401 ||FROSTED_ARCH_STM32F411 || FROSTED_ARCH_STM32F407 || FROSTED_ARCH_STM32F405 || FROSTED_ARCH_STM32F429 || FROSTED_ARCH_STM32F446 || FROSTED_ARCH_STM32F746) + select FROSTED_DEVSTM32DMA + default n + + + if FROSTED_DEVSTM32I2C + config FROSTED_I2C1 + bool "I2C 1" + default n + config FROSTED_I2C2 + bool "I2C 2" + default n + config FROSTED_I2C3 + bool "I2C 3" + default y + endif + + config FROSTED_DEVCS43L22 + tristate "CS43L22 driver (Stereo DAC)" + depends on (FROSTED_DEVSTM32I2C) + default n + + + config FROSTED_DEVLSM303DLHC + tristate "LSM303DLHC driver (Accelerometer & Magnetometer)" + depends on (FROSTED_DEVSTM32I2C) + default n + + config FROSTED_DEVMCCOG21 + tristate "MCCOG21 driver (2-lines B/W display)" + depends on (FROSTED_DEVSTM32I2C) + default n + + config FROSTED_DEVFT5336 + tristate "FT5336 driver (Touchscreen STM32F746)" + depends on (FROSTED_DEVSTM32I2C) + default n + + config FROSTED_DEVSTMPE811 + tristate "STMPE811 driver (Touchscreen)" + depends on (FROSTED_DEVSTM32I2C) + default n + + + + menuconfig FROSTED_DEVSPI + bool "Generic SPI driver" + depends on (FROSTED_ARCH_STM32F4 || FROSTED_ARCH_STM32F7) + select FROSTED_DEVSTM32DMA + default n + + if FROSTED_DEVSPI + config FROSTED_SPI_1 + bool "SPI 1" + + config FROSTED_SPI_5 + bool "SPI 5" + + endif + + config FROSTED_DEVLIS3DSH + tristate "LIS3DSH driver (3-Axis Accelerometer)" + depends on (FROSTED_DEVSPI) + default n + + config FROSTED_DEVILI9341 + tristate "ILI9341 driver (LCD Controller)" + depends on (FROSTED_DEVSPI) + default n + + config FROSTED_DEVL3GD20 + tristate "L3GD20 driver (Gyro)" + depends on (FROSTED_DEVSPI) + default n + + config FROSTED_DEV_RANDOM + depends on (FROSTED_ARCH_STM32F4 || FROSTED_ARCH_STM32F7) + bool "STM32F2/F4/F7 Random devices" + default n + + if FROSTED_DEV_RANDOM + choice + prompt "Random device selection" + config FROSTED_DEVRNG + bool "Hardware TRNG driver" + + config FROSTED_DEVFRAND + bool "Fortuna PRNG device" + endchoice + endif + + menuconfig FROSTED_DEVFRAMEBUFFER + depends on (FROSTED_ARCH_STM32F7 || FROSTED_ARCH_STM32F4) + bool "STM32 Framebuffer driver" + default y + + config FROSTED_DEVFBCON + depends on FROSTED_DEVFRAMEBUFFER + bool "Console on Framebuffer via /dev/fbcon" + default y + + config FROSTED_DEVF7DISCOLTDC + depends on FROSTED_DEVFRAMEBUFFER + bool "F746 Discovery LTDC" + default y + +endmenu + +menu "Power Management" + if FROSTED_DEVTIM + config FROSTED_LOWPOWER + bool "Enable low-power optimizations" + default n + config FROSTED_TICKLESS + bool "Disable systick in between process switches (untested)" + default n + endif + if !FROSTED_DEVTIM + comment "Power Management requires CPU Timer support" + endif +endmenu + +menu "Libraries" + config FROSTED_LIB_WOLFSSL + bool "WolfSSL TLS + Encryption" + default n + + config FROSTED_LIB_MONGOOSE + bool "Cesanta's Mongoose REST API library" + default n + +endmenu + +menu "Applications" + +menu "Base binary utils" +config FROSTED_APP_INIT +bool "init: main task" +default y + +config FROSTED_APP_IDLING +bool "idling: flashing leds" +default y + +config FROSTED_APP_FRESH +bool "fresh: Frosted shell" +default y + +config FROSTED_APP_CAT + bool "cat" + +config FROSTED_APP_ECHO + bool "echo" +config FROSTED_APP_LS + bool "ls" +config FROSTED_APP_TOUCH + bool "touch" +config FROSTED_APP_RM + bool "rm" +config FROSTED_APP_KILL + bool "kill" +config FROSTED_APP_TRUE + bool "true" +config FROSTED_APP_FALSE + bool "false" +config FROSTED_APP_LN + bool "ln" +config FROSTED_APP_DIRNAME + bool "dirname" +config FROSTED_APP_MKDIR + bool "mkdir" +config FROSTED_APP_MOUNT + bool "mount" +config FROSTED_APP_PLAY + bool "play" +config FROSTED_APP_WC + bool "wc" +config FROSTED_APP_HEAD + bool "head" +config FROSTED_APP_TAIL + bool "tail" +config FROSTED_APP_YES + bool "yes" +config FROSTED_APP_SLEEP + bool "sleep" +config FROSTED_APP_UPTIME + bool "uptime" +config FROSTED_APP_KLOGD + bool "klogd" +config FROSTED_APP_GDBSERVER + bool "gdbserver" +config FROSTED_APP_REBOOT + bool "reboot" +config FROSTED_APP_RENICE + bool "renice" +config FROSTED_APP_CUT + bool "cut" +config FROSTED_APP_GREP + bool "grep" +config FROSTED_APP_KILO + bool "kilo (text editor)" +config FROSTED_APP_POWERCTL + bool "Remote power control (powerctl)" +config FROSTED_APP_PTHREADS + bool "Pthreads test (pthreads)" +config FROSTED_APP_SEM + bool "Semaphore test(sem)" +config FROSTED_APP_DATE + bool "date" +endmenu + +menu "Networking utils" +config FROSTED_APP_IFCONFIG + bool "ifconfig" +config FROSTED_APP_ROUTE + bool "route" +config FROSTED_APP_PING + bool "ping" +config FROSTED_APP_HOST + bool "host" +config FROSTED_APP_TELNETD + bool "telnetd" +config FROSTED_APP_NETCAT + bool "netcat" +config FROSTED_APP_HTTPD + bool "httpd" + depends on LIB_MONGOOSE +config FROSTED_APP_SSHD + bool "sshd" + depends on LIB_WOLFSSL +config FROSTED_APP_NTPC + bool "ntpc" +config FROSTED_APP_STARWARS + bool "starwars" +endmenu + +menu "Interpreters" +config FROSTED_APP_PYTHON + bool "python interpreter (micropython)" +endmenu + + +menu "Hardware utils" +config FROSTED_APP_BUSYLOOP + bool "busyloop - CPU busy test" +config FROSTED_APP_MORSE + bool "Morse led blinker" +config FROSTED_APP_RANDOM + bool "Random number generator" +config FROSTED_APP_SENSOR + bool "Test for sensors (obsolete)" +config FROSTED_APP_FBTEST + bool "Test for framebuffer" +config FROSTED_APP_FBCTL + bool "fbctl (screen on/off utility)" +config FROSTED_APP_GPIOCTL + bool "gpioctl - Tools to set up GPIOs" +config FROSTED_APP_LATENCY + bool "process latency measurement" +config FROSTED_APP_ACC + bool "Accelerometer tool (acc)" +endmenu + +menu "Games" +config FROSTED_APP_DOOM + bool "ID Software's DOOM" +config FROSTED_APP_DICE + bool "Roll the dice" +config FROSTED_APP_BYTEBEAT + bool "sample bytebeat" +config FROSTED_APP_GROOVY + bool "groovy - bytebeat positional generator" +endmenu + +endmenu + diff --git a/target/frosted/Makefile b/target/frosted/Makefile new file mode 100644 index 000000000..5c1a7f857 --- /dev/null +++ b/target/frosted/Makefile @@ -0,0 +1,26 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(ADK_TOPDIR)/rules.mk + +prepare: + @echo preparing frosted + if [ ! -d $(BUILD_DIR)/frosted ]; then \ + cd $(BUILD_DIR) ;\ + git clone https://github.com/insane-adding-machines/frosted.git ;\ + cd frosted ;\ + git submodule update --init --recursive ;\ + fi + cp $(BUILD_DIR)/.frosted $(BUILD_DIR)/frosted/kconfig/.config + cp $(BUILD_DIR)/.frosted $(BUILD_DIR)/frosted/frosted-userland/kconfig/.config + +compile: + PATH='$(HOST_PATH)' $(MAKE) V=1 -C $(BUILD_DIR)/frosted clean + @echo compiling frosted userland + PATH='$(HOST_PATH)' $(MAKE) V=1 -C $(BUILD_DIR)/frosted/frosted-userland + @echo compiling frosted kernel + PATH='$(HOST_PATH)' $(MAKE) V=1 -C $(BUILD_DIR)/frosted + +install: + @echo installing frosted + cp $(BUILD_DIR)/frosted/image.bin $(FW_DIR) diff --git a/target/frosted/arch.lst b/target/frosted/arch.lst new file mode 100644 index 000000000..fb05f39d3 --- /dev/null +++ b/target/frosted/arch.lst @@ -0,0 +1 @@ +arm diff --git a/target/linux/arch.lst b/target/linux/arch.lst new file mode 100644 index 000000000..0765129d3 --- /dev/null +++ b/target/linux/arch.lst @@ -0,0 +1,34 @@ +aarch64 +alpha +arc +arm +avr32 +bfin +c6x +cris +csky +frv +h8300 +hppa +ia64 +lm32 +m68k +metag +microblaze +mips +mips64 +nds32 +nios2 +or1k +ppc +ppc64 +riscv32 +riscv64 +s390 +sparc +sparc64 +sh +tile +x86 +x86_64 +xtensa diff --git a/toolchain/newlib/Makefile b/toolchain/newlib/Makefile index affbe239a..d2b3a5758 100644 --- a/toolchain/newlib/Makefile +++ b/toolchain/newlib/Makefile @@ -6,6 +6,18 @@ include ../rules.mk include Makefile.inc include ${ADK_TOPDIR}/mk/buildhlp.mk +NEWLIB_CONFIGURE_ARGS:= --enable-newlib-io-long-long \ + --enable-newlib-register-fini \ + --disable-newlib-supplied-syscalls + +ifeq ($(ADK_TARGET_OS_FROSTED),y) +NEWLIB_CONFIGURE_ARGS+= --enable-newlib-fvwrite-in-streamio=no \ + --enable-newlib-fseek-optimization=no \ + --enable-newlib_wide_orient=no \ + --enable-newlib-unbuf-stream-opt=yes +endif + + $(WRKBUILD)/.configured: (cd $(WRKBUILD); \ CC='' \ @@ -13,10 +25,8 @@ $(WRKBUILD)/.configured: LDFLAGS='' \ ./configure --prefix=/usr \ --target=$(GNU_TARGET_NAME) \ - --enable-newlib-io-long-long \ - --enable-newlib-register-fini \ - --disable-newlib-supplied-syscalls \ --disable-nls \ + $(NEWLIB_CONFIGURE_ARGS) \ ) touch $@ diff --git a/toolchain/newlib/Makefile.inc b/toolchain/newlib/Makefile.inc index c006f553b..3fe740835 100644 --- a/toolchain/newlib/Makefile.inc +++ b/toolchain/newlib/Makefile.inc @@ -22,3 +22,10 @@ PKG_RELEASE:= 1 PKG_SITES:= https://github.com/riscv/riscv-newlib.git DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.xz endif +ifeq ($(ADK_TARGET_LIB_NEWLIB_FROSTED),y) +PKG_VERSION:= git +PKG_RELEASE:= 1 +PKG_GIT_SUBMODULE:= 1 +PKG_SITES:= https://github.com/insane-adding-machines/newlib.git +DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.xz +endif diff --git a/toolchain/newlib/patches/git/fix-tooldir.patch b/toolchain/newlib/patches/git/fix-tooldir.patch new file mode 100644 index 000000000..652f7494b --- /dev/null +++ b/toolchain/newlib/patches/git/fix-tooldir.patch @@ -0,0 +1,12 @@ +diff -Nur newlib-2.2.0-1.orig/configure newlib-2.2.0-1/configure +--- newlib-2.2.0-1.orig/configure 2014-07-05 23:09:07.000000000 +0200 ++++ newlib-2.2.0-1/configure 2015-11-25 06:33:11.461178398 +0100 +@@ -6985,7 +6985,7 @@ + + # Some systems (e.g., one of the i386-aix systems the gas testers are + # using) don't handle "\$" correctly, so don't use it here. +-tooldir='${exec_prefix}'/${target_noncanonical} ++tooldir='${exec_prefix}' + build_tooldir=${tooldir} + + # Create a .gdbinit file which runs the one in srcdir |