diff options
Diffstat (limited to 'firmware/export/config.h')
-rw-r--r-- | firmware/export/config.h | 63 |
1 files changed, 47 insertions, 16 deletions
diff --git a/firmware/export/config.h b/firmware/export/config.h index 5ea5c71c70..bedf7df4e2 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h | |||
@@ -635,6 +635,12 @@ Lyre prototype 1 */ | |||
635 | #endif | 635 | #endif |
636 | #endif | 636 | #endif |
637 | 637 | ||
638 | #if defined(__PCTOOL__) || defined(SIMULATOR) | ||
639 | #ifndef CONFIG_PLATFORM | ||
640 | #define CONFIG_PLATFORM PLATFORM_HOSTED | ||
641 | #endif | ||
642 | #endif | ||
643 | |||
638 | #ifndef CONFIG_PLATFORM | 644 | #ifndef CONFIG_PLATFORM |
639 | #define CONFIG_PLATFORM PLATFORM_NATIVE | 645 | #define CONFIG_PLATFORM PLATFORM_NATIVE |
640 | #endif | 646 | #endif |
@@ -868,22 +874,41 @@ Lyre prototype 1 */ | |||
868 | #define CONFIG_STORAGE_MULTI | 874 | #define CONFIG_STORAGE_MULTI |
869 | #endif | 875 | #endif |
870 | 876 | ||
871 | /* Explicit HAVE_MULTIVOLUME in the config file. Allow the maximum number */ | ||
872 | #ifdef HAVE_MULTIVOLUME | ||
873 | #define NUM_VOLUMES_PER_DRIVE 4 | ||
874 | #else | ||
875 | #define NUM_VOLUMES_PER_DRIVE 1 | ||
876 | #endif | ||
877 | #if defined(CONFIG_STORAGE_MULTI) && !defined(HAVE_MULTIDRIVE) | 877 | #if defined(CONFIG_STORAGE_MULTI) && !defined(HAVE_MULTIDRIVE) |
878 | #define HAVE_MULTIDRIVE | 878 | #define HAVE_MULTIDRIVE |
879 | #endif | 879 | #endif |
880 | 880 | ||
881 | #if defined(HAVE_MULTIDRIVE) && !defined(HAVE_MULTIVOLUME) | 881 | #if defined(HAVE_MULTIDRIVE) && !defined(NUM_DRIVES) |
882 | #error HAVE_MULTIDRIVE needs to have an explicit NUM_DRIVES | ||
883 | #endif | ||
884 | |||
885 | #ifndef NUM_DRIVES | ||
886 | #define NUM_DRIVES 1 | ||
887 | #endif | ||
888 | |||
889 | #if !defined(HAVE_MULTIVOLUME) | ||
890 | #if defined(HAVE_MULTIDRIVE) | ||
891 | /* Multidrive strongly implies multivolume */ | ||
882 | #define HAVE_MULTIVOLUME | 892 | #define HAVE_MULTIVOLUME |
893 | #elif (CONFIG_STORAGE & STORAGE_SD) | ||
894 | /* SD routinely have multiple partitions */ | ||
895 | #elif (CONFIG_STORAGE & STORAGE_ATA) && defined(HAVE_LBA48) | ||
896 | /* ATA routinely haves multiple partitions, but don't bother if we can't do LBA48 */ | ||
897 | #define HAVE_MULTIVOLUME | ||
898 | #endif | ||
883 | #endif | 899 | #endif |
884 | 900 | ||
885 | #if defined(HAVE_MULTIDRIVE) && !defined(NUM_DRIVES) | 901 | /* Bootloaders don't need multivolume awareness */ |
886 | #error HAVE_MULTIDRIVE needs to have an explicit NUM_DRIVES | 902 | #if defined(BOOTLOADER) && defined(HAVE_MULTIVOLUME) \ |
903 | && !(CONFIG_PLATFORM & PLATFORM_HOSTED) && !defined(BOOT_REDIR) | ||
904 | #undef HAVE_MULTIVOLUME | ||
905 | #endif | ||
906 | |||
907 | /* Number of volumes per drive */ | ||
908 | #if defined(HAVE_MULTIVOLUME) && !defined(SIMULATOR) && !(CONFIG_PLATFORM & PLATFORM_HOSTED) | ||
909 | #define NUM_VOLUMES_PER_DRIVE 4 | ||
910 | #else | ||
911 | #define NUM_VOLUMES_PER_DRIVE 1 | ||
887 | #endif | 912 | #endif |
888 | 913 | ||
889 | /* note to remove multi-partition booting this could be changed to MULTIDRIVE */ | 914 | /* note to remove multi-partition booting this could be changed to MULTIDRIVE */ |
@@ -897,10 +922,6 @@ Lyre prototype 1 */ | |||
897 | # define MULTIBOOT_MIN_VOLUME 0 | 922 | # define MULTIBOOT_MIN_VOLUME 0 |
898 | #endif | 923 | #endif |
899 | 924 | ||
900 | #ifndef NUM_DRIVES | ||
901 | #define NUM_DRIVES 1 | ||
902 | #endif | ||
903 | |||
904 | #define NUM_VOLUMES (NUM_DRIVES * NUM_VOLUMES_PER_DRIVE) | 925 | #define NUM_VOLUMES (NUM_DRIVES * NUM_VOLUMES_PER_DRIVE) |
905 | 926 | ||
906 | #if defined(BOOTLOADER) && defined(HAVE_ADJUSTABLE_CPU_FREQ) | 927 | #if defined(BOOTLOADER) && defined(HAVE_ADJUSTABLE_CPU_FREQ) |
@@ -934,31 +955,35 @@ Lyre prototype 1 */ | |||
934 | #ifdef HAVE_BOOTLOADER_USB_MODE | 955 | #ifdef HAVE_BOOTLOADER_USB_MODE |
935 | /* Priority in bootloader is wanted */ | 956 | /* Priority in bootloader is wanted */ |
936 | #define HAVE_PRIORITY_SCHEDULING | 957 | #define HAVE_PRIORITY_SCHEDULING |
958 | |||
937 | #if (CONFIG_CPU == S5L8702) | 959 | #if (CONFIG_CPU == S5L8702) |
938 | #define USB_DRIVER_CLOSE | 960 | #define USB_DRIVER_CLOSE |
939 | #else | 961 | #else |
940 | #define USB_STATUS_BY_EVENT | 962 | #define USB_STATUS_BY_EVENT |
941 | #define USB_DETECT_BY_REQUEST | 963 | #define USB_DETECT_BY_REQUEST |
942 | #endif | 964 | #endif |
965 | |||
943 | #if defined(HAVE_USBSTACK) && CONFIG_USBOTG == USBOTG_ARC | 966 | #if defined(HAVE_USBSTACK) && CONFIG_USBOTG == USBOTG_ARC |
944 | #define INCLUDE_TIMEOUT_API | 967 | #define INCLUDE_TIMEOUT_API |
945 | #define USB_DRIVER_CLOSE | 968 | #define USB_DRIVER_CLOSE |
946 | #endif | 969 | #endif |
970 | |||
947 | #if defined(HAVE_USBSTACK) && CONFIG_USBOTG == USBOTG_TNETV105 | 971 | #if defined(HAVE_USBSTACK) && CONFIG_USBOTG == USBOTG_TNETV105 |
948 | #define INCLUDE_TIMEOUT_API | 972 | #define INCLUDE_TIMEOUT_API |
949 | #define USB_DRIVER_CLOSE | 973 | #define USB_DRIVER_CLOSE |
950 | #endif | 974 | #endif |
975 | |||
951 | #if CONFIG_CPU == X1000 | 976 | #if CONFIG_CPU == X1000 |
952 | #define USB_DRIVER_CLOSE | 977 | #define USB_DRIVER_CLOSE |
953 | #endif | 978 | #endif |
954 | #endif | 979 | |
980 | #endif /* BOOTLOADER_USB_MODE */ | ||
955 | 981 | ||
956 | #else /* !BOOTLOADER */ | 982 | #else /* !BOOTLOADER */ |
957 | 983 | ||
958 | #define HAVE_EXTENDED_MESSAGING_AND_NAME | 984 | #define HAVE_EXTENDED_MESSAGING_AND_NAME |
959 | #define HAVE_WAKEUP_EXT_CB | 985 | #define HAVE_WAKEUP_EXT_CB |
960 | 986 | ||
961 | |||
962 | #if defined(ASSEMBLER_THREADS) \ | 987 | #if defined(ASSEMBLER_THREADS) \ |
963 | || defined(HAVE_WIN32_FIBER_THREADS) \ | 988 | || defined(HAVE_WIN32_FIBER_THREADS) \ |
964 | || defined(HAVE_SIGALTSTACK_THREADS) | 989 | || defined(HAVE_SIGALTSTACK_THREADS) |
@@ -993,7 +1018,7 @@ Lyre prototype 1 */ | |||
993 | #endif /* CONFIG_USB == */ | 1018 | #endif /* CONFIG_USB == */ |
994 | #endif /* HAVE_USBSTACK */ | 1019 | #endif /* HAVE_USBSTACK */ |
995 | 1020 | ||
996 | #endif /* BOOTLOADER */ | 1021 | #endif /* !BOOTLOADER */ |
997 | 1022 | ||
998 | #if defined(HAVE_USBSTACK) || (CONFIG_CPU == JZ4732) || (CONFIG_CPU == JZ4760B) \ | 1023 | #if defined(HAVE_USBSTACK) || (CONFIG_CPU == JZ4732) || (CONFIG_CPU == JZ4760B) \ |
999 | || (CONFIG_CPU == AS3525) || (CONFIG_CPU == AS3525v2) \ | 1024 | || (CONFIG_CPU == AS3525) || (CONFIG_CPU == AS3525v2) \ |
@@ -1240,6 +1265,12 @@ Lyre prototype 1 */ | |||
1240 | #endif | 1265 | #endif |
1241 | #endif | 1266 | #endif |
1242 | 1267 | ||
1268 | #if defined(HAVE_SIGALTSTACK_THREADS) | ||
1269 | #ifndef _XOPEN_SOURCE | ||
1270 | #define _XOPEN_SOURCE 600 /* For sigaltstack */ | ||
1271 | #endif | ||
1272 | #endif | ||
1273 | |||
1243 | #ifdef CPU_MIPS | 1274 | #ifdef CPU_MIPS |
1244 | #include <stdbool.h> /* MIPS GCC fix? */ | 1275 | #include <stdbool.h> /* MIPS GCC fix? */ |
1245 | #endif | 1276 | #endif |