diff --git a/.gitignore b/.gitignore index 1d3ecbc1a..8f6eeebcf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ *.vscode *.o +*libmusl.a +*liblwip.a .DS_Store \ No newline at end of file diff --git a/APP_Framework/Framework/transform_layer/xizi/transform.c b/APP_Framework/Framework/transform_layer/xizi/transform.c index c3bd52813..62e226b35 100644 --- a/APP_Framework/Framework/transform_layer/xizi/transform.c +++ b/APP_Framework/Framework/transform_layer/xizi/transform.c @@ -101,12 +101,12 @@ int PrivTaskDelay(int32_t ms) { UserTaskDelay(ms); } - +#ifndef SEPARATE_COMPILE uint32_t PrivGetTickTime() { return CalculteTimeMsFromTick(CurrentTicksGain()); } - +#endif /*********************fs**************************/ #ifdef FS_VFS /************************Driver Posix Transform***********************/ diff --git a/APP_Framework/Framework/transform_layer/xizi/user_api/posix_support/include/pthread.h b/APP_Framework/Framework/transform_layer/xizi/user_api/posix_support/include/pthread.h index 780ab30b1..efe995dc7 100644 --- a/APP_Framework/Framework/transform_layer/xizi/user_api/posix_support/include/pthread.h +++ b/APP_Framework/Framework/transform_layer/xizi/user_api/posix_support/include/pthread.h @@ -31,7 +31,8 @@ extern "C" { #if defined(ARCH_ARM) && !defined(LIB_MUSLLIB) #include "pthread arm.h" - +#endif + // enum { // PTHREAD_BARRIER_SERIAL_THREAD, // PTHREAD_CANCEL_ASYNCHRONOUS, @@ -105,7 +106,6 @@ int pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int *type); int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type); int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr, int pshared); int pthread_mutexattr_getpshared(const pthread_mutexattr_t *attr, int *pshared); -#endif #ifdef __cplusplus } diff --git a/APP_Framework/Framework/transform_layer/xizi/user_api/posix_support/pthread.c b/APP_Framework/Framework/transform_layer/xizi/user_api/posix_support/pthread.c index 7bc1aea0c..3b8b170fd 100644 --- a/APP_Framework/Framework/transform_layer/xizi/user_api/posix_support/pthread.c +++ b/APP_Framework/Framework/transform_layer/xizi/user_api/posix_support/pthread.c @@ -49,7 +49,7 @@ int pthread_create(pthread_t *thread, const pthread_attr_t *attr, return -1 ; ret = UserTaskStartup(pid); - *thread = (pthread_t)pid; + *thread = (pthread_t)(long)pid; return ret; @@ -63,7 +63,7 @@ void pthread_exit(void *value_ptr){ pthread_t pthread_self(void){ pthread_t pthread ; - pthread = (pthread_t)UserGetTaskID(); + pthread = (pthread_t)(long)UserGetTaskID(); return pthread; } @@ -112,7 +112,8 @@ int pthread_join(pthread_t thread, void **retval) int pthread_kill(pthread_t thread, int sig) { /* This api should not be used, and will not be supported */ - UserTaskDelete((int32_t)thread); + int32_t *thread_id_tmp = (void *)&thread; + UserTaskDelete(*thread_id_tmp); return -1; } diff --git a/APP_Framework/Framework/transform_layer/xizi/user_api/posix_support/pthread_mutex.c b/APP_Framework/Framework/transform_layer/xizi/user_api/posix_support/pthread_mutex.c index 4782592c3..5db1275a6 100644 --- a/APP_Framework/Framework/transform_layer/xizi/user_api/posix_support/pthread_mutex.c +++ b/APP_Framework/Framework/transform_layer/xizi/user_api/posix_support/pthread_mutex.c @@ -24,7 +24,8 @@ #include #include -#if defined(ARCH_ARM) && defined(LIB_MUSLLIB) +// #if defined(ARCH_ARM) && defined(LIB_MUSLLIB) +#if defined(LIB_MUSLLIB) int pthread_mutex_init(pthread_mutex_t* p_mutex, const pthread_mutexattr_t* attr) { pthread_mutexattr_t mutexAttr; diff --git a/Ubiquitous/XiZi/Makefile b/Ubiquitous/XiZi/Makefile index 673984c2d..2244868d1 100755 --- a/Ubiquitous/XiZi/Makefile +++ b/Ubiquitous/XiZi/Makefile @@ -2,7 +2,7 @@ MAKEFLAGS += --no-print-directory .PHONY:all clean distclean show_info menuconfig -.PHONY:COMPILE_APP COMPILE_KERNEL +.PHONY:COMPILE_APP COMPILE_KERNEL support :=kd233 stm32f407-st-discovery maix-go stm32f407zgt6 aiit-riscv64-board aiit-arm32-board hifive1-rev-B hifive1-emulator k210-emulator cortex-m3-emulator cortex-m4-emulator ok1052-c gapuino stm32f103-nano gd32vf103-rvstar cortex-m0-emulator rv32m1-vega nuvoton-m2354 @@ -61,11 +61,11 @@ else PART := ifeq ($(CONFIG_LIB_MUSLLIB), y) -PART += COMPILE_MUSL clean +PART += COMPILE_MUSL endif ifeq ($(CONFIG_RESOURCES_LWIP), y) -PART += COMPILE_LWIP clean +PART += COMPILE_LWIP endif PART += COMPILE_ALL @@ -85,11 +85,11 @@ COMPILE_ALL: COMPILE_MUSL: @for dir in $(MUSL_DIR);do \ - $(MAKE) -C $$dir CONFIG_RESOURCES_LWIP=n; \ + $(MAKE) -C $$dir COMPILE_TYPE=$@ CONFIG_RESOURCES_LWIP=n; \ done @cp link_libc.mk build/Makefile @$(MAKE) -C build TARGET=libmusl.a LINK_FLAGS=LFLAGS - @cp build/libmusl.a $(KERNEL_ROOT)/lib/musllib/libmusl.a + @cp build/libmusl.a $(KERNEL_ROOT)/lib/musllib/libmusl.a @rm build/Makefile build/make.obj COMPILE_LWIP: @@ -112,10 +112,10 @@ COMPILE_KERNEL: COMPILE_APP: @echo $(SRC_APP_DIR) @for dir in $(SRC_APP_DIR);do \ - $(MAKE) -C $$dir; \ + $(MAKE) -C $$dir USE_APP_INCLUDEPATH=y; \ done @cp link.mk build/Makefile - @$(MAKE) -C build COMPILE_TYPE="_app" TARGET=XiZi-$(BOARD)_app.elf LINK_FLAGS=APPLFLAGS USE_APP_INCLUDEPATH=y + @$(MAKE) -C build COMPILE_TYPE="_app" TARGET=XiZi-$(BOARD)_app.elf LINK_FLAGS=APPLFLAGS @rm build/Makefile build/make.obj show_info: @@ -175,4 +175,6 @@ distclean: @echo Clean all configuration @make clean @rm -f .config* + @rm -f $(KERNEL_ROOT)/lib/musllib/libmusl.a + @rm -f $(KERNEL_ROOT)/resources/ethernet/LwIP/liblwip.a @rm -f $(KERNEL_ROOT)/board/*/.config diff --git a/Ubiquitous/XiZi/arch/arm/cortex-m0/prepare_ahwstack.c b/Ubiquitous/XiZi/arch/arm/cortex-m0/prepare_ahwstack.c index 1abd6562c..3562c1cf7 100644 --- a/Ubiquitous/XiZi/arch/arm/cortex-m0/prepare_ahwstack.c +++ b/Ubiquitous/XiZi/arch/arm/cortex-m0/prepare_ahwstack.c @@ -156,14 +156,12 @@ uint8 KTaskStackSetup(struct TaskDescriptor *task) } #else StackContex->ExErrorStackContex.lr = (unsigned long)KTaskQuit; - KPrintf("DEBUG: ExErrorStackContex.lr set KTaskQuit..\n"); #endif #if USE_FPU StackContex->flag = 0; #endif - KPrintf("DEBUG: KTaskStackSetup end, task: %i.\n", task->id.id); return EOK; } diff --git a/Ubiquitous/XiZi/arch/risc-v/k210/smp_support.c b/Ubiquitous/XiZi/arch/risc-v/k210/smp_support.c index 10001b5de..c3ebc8d33 100644 --- a/Ubiquitous/XiZi/arch/risc-v/k210/smp_support.c +++ b/Ubiquitous/XiZi/arch/risc-v/k210/smp_support.c @@ -20,7 +20,7 @@ Author: AIIT XUOS Lab *************************************************/ #include "board.h" -#include +#include #include #include #include diff --git a/Ubiquitous/XiZi/board/aiit-riscv64-board/include/bsp.h b/Ubiquitous/XiZi/board/aiit-riscv64-board/include/bsp.h index ea1e7bc71..269429b88 100644 --- a/Ubiquitous/XiZi/board/aiit-riscv64-board/include/bsp.h +++ b/Ubiquitous/XiZi/board/aiit-riscv64-board/include/bsp.h @@ -24,7 +24,7 @@ #ifndef _KENDRYTE_BSP_H #define _KENDRYTE_BSP_H -#include "atomic.h" +#include "bsp_atomic.h" #include "entry.h" #include "sleep.h" #include "encoding.h" diff --git a/Ubiquitous/XiZi/board/aiit-riscv64-board/include/atomic.h b/Ubiquitous/XiZi/board/aiit-riscv64-board/include/bsp_atomic.h similarity index 100% rename from Ubiquitous/XiZi/board/aiit-riscv64-board/include/atomic.h rename to Ubiquitous/XiZi/board/aiit-riscv64-board/include/bsp_atomic.h diff --git a/Ubiquitous/XiZi/board/aiit-riscv64-board/third_party_driver/uart/hardware_uart.c b/Ubiquitous/XiZi/board/aiit-riscv64-board/third_party_driver/uart/hardware_uart.c index 6dcfbee6b..41e44d9e3 100644 --- a/Ubiquitous/XiZi/board/aiit-riscv64-board/third_party_driver/uart/hardware_uart.c +++ b/Ubiquitous/XiZi/board/aiit-riscv64-board/third_party_driver/uart/hardware_uart.c @@ -22,7 +22,7 @@ * @date 2021-04-25 */ -#include +#include #include #include #include diff --git a/Ubiquitous/XiZi/board/k210-emulator/include/bsp.h b/Ubiquitous/XiZi/board/k210-emulator/include/bsp.h index ea1e7bc71..269429b88 100644 --- a/Ubiquitous/XiZi/board/k210-emulator/include/bsp.h +++ b/Ubiquitous/XiZi/board/k210-emulator/include/bsp.h @@ -24,7 +24,7 @@ #ifndef _KENDRYTE_BSP_H #define _KENDRYTE_BSP_H -#include "atomic.h" +#include "bsp_atomic.h" #include "entry.h" #include "sleep.h" #include "encoding.h" diff --git a/Ubiquitous/XiZi/board/k210-emulator/include/atomic.h b/Ubiquitous/XiZi/board/k210-emulator/include/bsp_atomic.h similarity index 100% rename from Ubiquitous/XiZi/board/k210-emulator/include/atomic.h rename to Ubiquitous/XiZi/board/k210-emulator/include/bsp_atomic.h diff --git a/Ubiquitous/XiZi/board/k210-emulator/third_party_driver/uart/hardware_uart.c b/Ubiquitous/XiZi/board/k210-emulator/third_party_driver/uart/hardware_uart.c index be0103d32..b103a456e 100644 --- a/Ubiquitous/XiZi/board/k210-emulator/third_party_driver/uart/hardware_uart.c +++ b/Ubiquitous/XiZi/board/k210-emulator/third_party_driver/uart/hardware_uart.c @@ -28,7 +28,7 @@ #include "sysctl.h" #include "hardware_uart.h" #include "utils.h" -#include "atomic.h" +#include "bsp_atomic.h" #define __UART_BRATE_CONST 16 diff --git a/Ubiquitous/XiZi/board/kd233/config.mk b/Ubiquitous/XiZi/board/kd233/config.mk index fcfe0ce01..41960bd99 100644 --- a/Ubiquitous/XiZi/board/kd233/config.mk +++ b/Ubiquitous/XiZi/board/kd233/config.mk @@ -1,4 +1,4 @@ -export CFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -O0 -ggdb -fgnu89-inline -Werror +export CFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -O0 -ggdb -fgnu89-inline #-Werror # $(warning, "DEBUG, here add cflags.") # export CFLAGS += -nostdlib -nostdinc -fno-builtin export AFLAGS := -c -mcmodel=medany -march=rv64imafdc -mabi=lp64d -x assembler-with-cpp -ggdb @@ -6,6 +6,15 @@ export LFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -nostartfiles -Wl export APPLFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -nostartfiles -Wl,--gc-sections,-Map=XiZi-app.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds +ifeq ($(CONFIG_LIB_MUSLLIB), y) +export LFLAGS += -nostdlib -nostdinc -fno-builtin -nodefaultlibs +export LIBCC := -lgcc +export LINK_MUSLLIB := $(KERNEL_ROOT)/lib/musllib/libmusl.a +endif + +ifeq ($(CONFIG_RESOURCES_LWIP), y) +export LINK_LWIP := $(KERNEL_ROOT)/resources/ethernet/LwIP/liblwip.a +endif export CXXFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -O0 -ggdb -Werror diff --git a/Ubiquitous/XiZi/board/kd233/include/bsp.h b/Ubiquitous/XiZi/board/kd233/include/bsp.h index ea1e7bc71..269429b88 100644 --- a/Ubiquitous/XiZi/board/kd233/include/bsp.h +++ b/Ubiquitous/XiZi/board/kd233/include/bsp.h @@ -24,7 +24,7 @@ #ifndef _KENDRYTE_BSP_H #define _KENDRYTE_BSP_H -#include "atomic.h" +#include "bsp_atomic.h" #include "entry.h" #include "sleep.h" #include "encoding.h" diff --git a/Ubiquitous/XiZi/board/kd233/include/atomic.h b/Ubiquitous/XiZi/board/kd233/include/bsp_atomic.h similarity index 100% rename from Ubiquitous/XiZi/board/kd233/include/atomic.h rename to Ubiquitous/XiZi/board/kd233/include/bsp_atomic.h diff --git a/Ubiquitous/XiZi/board/kd233/third_party_driver/uart/hardware_uart.c b/Ubiquitous/XiZi/board/kd233/third_party_driver/uart/hardware_uart.c index be0103d32..b103a456e 100644 --- a/Ubiquitous/XiZi/board/kd233/third_party_driver/uart/hardware_uart.c +++ b/Ubiquitous/XiZi/board/kd233/third_party_driver/uart/hardware_uart.c @@ -28,7 +28,7 @@ #include "sysctl.h" #include "hardware_uart.h" #include "utils.h" -#include "atomic.h" +#include "bsp_atomic.h" #define __UART_BRATE_CONST 16 diff --git a/Ubiquitous/XiZi/board/maix-go/include/bsp.h b/Ubiquitous/XiZi/board/maix-go/include/bsp.h index ea1e7bc71..269429b88 100644 --- a/Ubiquitous/XiZi/board/maix-go/include/bsp.h +++ b/Ubiquitous/XiZi/board/maix-go/include/bsp.h @@ -24,7 +24,7 @@ #ifndef _KENDRYTE_BSP_H #define _KENDRYTE_BSP_H -#include "atomic.h" +#include "bsp_atomic.h" #include "entry.h" #include "sleep.h" #include "encoding.h" diff --git a/Ubiquitous/XiZi/board/maix-go/include/atomic.h b/Ubiquitous/XiZi/board/maix-go/include/bsp_atomic.h similarity index 100% rename from Ubiquitous/XiZi/board/maix-go/include/atomic.h rename to Ubiquitous/XiZi/board/maix-go/include/bsp_atomic.h diff --git a/Ubiquitous/XiZi/board/maix-go/third_party_driver/uart/hardware_uart.c b/Ubiquitous/XiZi/board/maix-go/third_party_driver/uart/hardware_uart.c index be0103d32..b103a456e 100644 --- a/Ubiquitous/XiZi/board/maix-go/third_party_driver/uart/hardware_uart.c +++ b/Ubiquitous/XiZi/board/maix-go/third_party_driver/uart/hardware_uart.c @@ -28,7 +28,7 @@ #include "sysctl.h" #include "hardware_uart.h" #include "utils.h" -#include "atomic.h" +#include "bsp_atomic.h" #define __UART_BRATE_CONST 16 diff --git a/Ubiquitous/XiZi/board/xidatong-arm32/config.mk b/Ubiquitous/XiZi/board/xidatong-arm32/config.mk index 25338a2ec..e05bd2e19 100644 --- a/Ubiquitous/XiZi/board/xidatong-arm32/config.mk +++ b/Ubiquitous/XiZi/board/xidatong-arm32/config.mk @@ -6,7 +6,7 @@ export AFLAGS := -c -mcpu=cortex-m7 -mthumb -ffunction-sections -fdata-sections ### if use USB function, use special lds file because USB uses ITCM ifeq ($(CONFIG_LIB_MUSLLIB), y) -export LFLAGS += -nostdlib -nostdinc -fno-builtin -nodefaultlibs +export LFLAGS += -nostdlib -nostdinc # -fno-builtin -nodefaultlibs export LIBCC := -lgcc export LINK_MUSLLIB := $(KERNEL_ROOT)/lib/musllib/libmusl.a endif diff --git a/Ubiquitous/XiZi/board/xidatong-arm32/third_party_driver/ethernet/enet_ethernetif.c b/Ubiquitous/XiZi/board/xidatong-arm32/third_party_driver/ethernet/enet_ethernetif.c index 6360d9911..823c76a37 100755 --- a/Ubiquitous/XiZi/board/xidatong-arm32/third_party_driver/ethernet/enet_ethernetif.c +++ b/Ubiquitous/XiZi/board/xidatong-arm32/third_party_driver/ethernet/enet_ethernetif.c @@ -116,7 +116,7 @@ void ethernetif_gpio_init(void) GPIO_WritePinOutput(GPIO1, 3, 1); } -void ETH_BSP_Config(void) +int ETH_BSP_Config(void) { static int flag = 0; if(flag == 0) @@ -125,6 +125,7 @@ void ETH_BSP_Config(void) ethernetif_gpio_init(); flag = 1; } + return 0; } void ethernetif_phy_init(struct ethernetif *ethernetif, diff --git a/Ubiquitous/XiZi/board/xidatong-arm32/third_party_driver/include/enet_ethernetif.h b/Ubiquitous/XiZi/board/xidatong-arm32/third_party_driver/include/enet_ethernetif.h index 8416d75bc..bb97d3348 100755 --- a/Ubiquitous/XiZi/board/xidatong-arm32/third_party_driver/include/enet_ethernetif.h +++ b/Ubiquitous/XiZi/board/xidatong-arm32/third_party_driver/include/enet_ethernetif.h @@ -181,7 +181,7 @@ err_t ethernetif1_init(struct netif *netif); */ void ethernetif_input( struct netif *netif); -void ETH_BSP_Config(void); +int ETH_BSP_Config(void); int32 lwip_obtain_semaphore(struct netif *netif); diff --git a/Ubiquitous/XiZi/board/xidatong-riscv64/config.mk b/Ubiquitous/XiZi/board/xidatong-riscv64/config.mk index 94d0efb08..691a2634d 100644 --- a/Ubiquitous/XiZi/board/xidatong-riscv64/config.mk +++ b/Ubiquitous/XiZi/board/xidatong-riscv64/config.mk @@ -2,6 +2,16 @@ export CFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -fno-common -ffun export AFLAGS := -c -mcmodel=medany -march=rv64imafdc -mabi=lp64d -x assembler-with-cpp -ggdb export LFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -nostartfiles -Wl,--gc-sections,-Map=XiZi-xidatong-riscv64.map,-cref,-u,_start -T $(BSP_ROOT)/link.lds +ifeq ($(CONFIG_LIB_MUSLLIB), y) +export LFLAGS += -nostdlib -nostdinc # -fno-builtin -nodefaultlibs +export LIBCC := -lgcc +export LINK_MUSLLIB := $(KERNEL_ROOT)/lib/musllib/libmusl.a +endif + +ifeq ($(CONFIG_RESOURCES_LWIP), y) +export LINK_LWIP := $(KERNEL_ROOT)/resources/ethernet/LwIP/liblwip.a +endif + export APPLFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -nostartfiles -Wl,--gc-sections,-Map=XiZi-xidatong-riscv64.map,-cref,-u, -T $(BSP_ROOT)/link_userspace.lds export CXXFLAGS := -mcmodel=medany -march=rv64imafdc -mabi=lp64d -fno-common -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -O0 -ggdb -Werror diff --git a/Ubiquitous/XiZi/board/xidatong-riscv64/include/bsp.h b/Ubiquitous/XiZi/board/xidatong-riscv64/include/bsp.h index ea1e7bc71..269429b88 100644 --- a/Ubiquitous/XiZi/board/xidatong-riscv64/include/bsp.h +++ b/Ubiquitous/XiZi/board/xidatong-riscv64/include/bsp.h @@ -24,7 +24,7 @@ #ifndef _KENDRYTE_BSP_H #define _KENDRYTE_BSP_H -#include "atomic.h" +#include "bsp_atomic.h" #include "entry.h" #include "sleep.h" #include "encoding.h" diff --git a/Ubiquitous/XiZi/board/xidatong-riscv64/include/atomic.h b/Ubiquitous/XiZi/board/xidatong-riscv64/include/bsp_atomic.h similarity index 100% rename from Ubiquitous/XiZi/board/xidatong-riscv64/include/atomic.h rename to Ubiquitous/XiZi/board/xidatong-riscv64/include/bsp_atomic.h diff --git a/Ubiquitous/XiZi/board/xidatong-riscv64/third_party_driver/uart/hardware_uart.c b/Ubiquitous/XiZi/board/xidatong-riscv64/third_party_driver/uart/hardware_uart.c index 55d36f1ba..76f4ced93 100644 --- a/Ubiquitous/XiZi/board/xidatong-riscv64/third_party_driver/uart/hardware_uart.c +++ b/Ubiquitous/XiZi/board/xidatong-riscv64/third_party_driver/uart/hardware_uart.c @@ -28,7 +28,7 @@ #include "sysctl.h" #include "hardware_uart.h" #include "utils.h" -#include "atomic.h" +#include "bsp_atomic.h" #define __UART_BRATE_CONST 16 diff --git a/Ubiquitous/XiZi/fs/shared/src/iot-vfs.c b/Ubiquitous/XiZi/fs/shared/src/iot-vfs.c index 0983fecf0..e340d08fe 100644 --- a/Ubiquitous/XiZi/fs/shared/src/iot-vfs.c +++ b/Ubiquitous/XiZi/fs/shared/src/iot-vfs.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -592,7 +593,7 @@ int ioctl(int fd, int cmd, ...) va_list ap; va_start(ap, cmd); - ret = fdp->mntp->fs->ioctl(fdp, cmd, (void*)va_arg(ap, int)); + ret = fdp->mntp->fs->ioctl(fdp, cmd, (void*)va_arg(ap, long)); va_end(ap); if (ret < 0) { SYS_ERR("%s: ioctl file failed\n", __func__); diff --git a/Ubiquitous/XiZi/kernel/include/xs_ktask.h b/Ubiquitous/XiZi/kernel/include/xs_ktask.h index cce200f64..e2dc74849 100644 --- a/Ubiquitous/XiZi/kernel/include/xs_ktask.h +++ b/Ubiquitous/XiZi/kernel/include/xs_ktask.h @@ -75,7 +75,7 @@ struct TaskDyncSchedMember { void *isolation; ///< task isolation pointer uint8 isolation_status; #if defined(ARCH_ARM) - uint32_t svc_return; + uint32 svc_return; #endif #endif diff --git a/Ubiquitous/XiZi/kernel/thread/assign.c b/Ubiquitous/XiZi/kernel/thread/assign.c index 93b4ef325..bd4cb46b7 100644 --- a/Ubiquitous/XiZi/kernel/thread/assign.c +++ b/Ubiquitous/XiZi/kernel/thread/assign.c @@ -270,7 +270,6 @@ static inline void SwitchToFirstRunningTask(struct TaskDescriptor* task) Assign.ready_vector_done->remove(task); KTaskStatSetAsRunning(task); - KPrintf("DEBUG: calling SwitchKtaskContextTo, task: %i.\n", task->id.id); SwitchKtaskContextTo((x_ubase)&task->stack_point, task); } @@ -373,7 +372,6 @@ void StartupOsAssign(void) FirstRunningTask = ChooseTaskWithHighestPrio(&Assign.os_assign_read_vector); SetSystemRunningTask(FirstRunningTask); - KPrintf("DEBUG: calling SwitchToFirstRunningTask.\n"); SwitchToFirstRunningTask(FirstRunningTask); } diff --git a/Ubiquitous/XiZi/kernel/thread/init.c b/Ubiquitous/XiZi/kernel/thread/init.c index 5ad6c9aa5..ce2b5c2fc 100644 --- a/Ubiquitous/XiZi/kernel/thread/init.c +++ b/Ubiquitous/XiZi/kernel/thread/init.c @@ -155,7 +155,6 @@ void _InitSubCmpts(struct InitSequenceDesc sub_cmpts[]) #ifdef KERNEL_COMPONENTS_INIT void EnvInitKTask(void *parameter) { - KPrintf("DEBUG: RUNNING ENV TASK\n"); x_base lock = 0; lock = DISABLE_INTERRUPT(); _InitSubCmpts(prev_cmpts_init); @@ -188,14 +187,12 @@ void CreateEnvInitTask(void) env_init = KTaskCreate("env_init", EnvInitKTask, NONE, ENV_INIT_KTASK_STACK_SIZE, KTASK_PRIORITY_MAX - 1); - KPrintf("DEBUG: Env KTaskCreate end. env_init: %i.\n", env_init); if (env_init < 0) { KPrintf("env_init create failed ...%s %d.\n",__FUNCTION__,__LINE__); return; } StartupKTask(env_init); - KPrintf("DEBUG: Env StartupTask end.\n"); } #endif /* KERNEL_COMPONENTS_INIT */ @@ -253,7 +250,6 @@ extern int InitUserspace(void); StartWatchdog(); #endif - KPrintf("DEBUG: calling StartipOsAssign.\n"); StartupOsAssign(); return 0; } diff --git a/Ubiquitous/XiZi/lib/musllib/include/bits/alltypes.h b/Ubiquitous/XiZi/lib/musllib/arch/arm/bits/alltypes.h similarity index 99% rename from Ubiquitous/XiZi/lib/musllib/include/bits/alltypes.h rename to Ubiquitous/XiZi/lib/musllib/arch/arm/bits/alltypes.h index 0696b3dba..1a6c98256 100644 --- a/Ubiquitous/XiZi/lib/musllib/include/bits/alltypes.h +++ b/Ubiquitous/XiZi/lib/musllib/arch/arm/bits/alltypes.h @@ -1,5 +1,3 @@ -/* The time64 has not been used yet in liteos_m */ - #define _REDIR_TIME64 0 #define _Addr int #define _Int64 long long diff --git a/Ubiquitous/XiZi/lib/musllib/arch/arm/bits/alltypes.h.in b/Ubiquitous/XiZi/lib/musllib/arch/arm/bits/alltypes.h.in deleted file mode 100644 index d62bd7bde..000000000 --- a/Ubiquitous/XiZi/lib/musllib/arch/arm/bits/alltypes.h.in +++ /dev/null @@ -1,21 +0,0 @@ -#define _REDIR_TIME64 1 -#define _Addr int -#define _Int64 long long -#define _Reg int - -#if __ARMEB__ -#define __BYTE_ORDER 4321 -#else -#define __BYTE_ORDER 1234 -#endif - -#define __LONG_MAX 0x7fffffffL - -#ifndef __cplusplus -TYPEDEF unsigned wchar_t; -#endif - -TYPEDEF float float_t; -TYPEDEF double double_t; - -TYPEDEF struct { long long __ll; long double __ld; } max_align_t; diff --git a/Ubiquitous/XiZi/lib/musllib/arch/generic/bits/dirent.h b/Ubiquitous/XiZi/lib/musllib/arch/arm/bits/dirent.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/arch/generic/bits/dirent.h rename to Ubiquitous/XiZi/lib/musllib/arch/arm/bits/dirent.h diff --git a/Ubiquitous/XiZi/lib/musllib/include/bits/errno.h b/Ubiquitous/XiZi/lib/musllib/arch/arm/bits/errno.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/include/bits/errno.h rename to Ubiquitous/XiZi/lib/musllib/arch/arm/bits/errno.h diff --git a/Ubiquitous/XiZi/lib/musllib/arch/generic/bits/io.h b/Ubiquitous/XiZi/lib/musllib/arch/arm/bits/io.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/arch/generic/bits/io.h rename to Ubiquitous/XiZi/lib/musllib/arch/arm/bits/io.h diff --git a/Ubiquitous/XiZi/lib/musllib/arch/generic/bits/ioctl.h b/Ubiquitous/XiZi/lib/musllib/arch/arm/bits/ioctl.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/arch/generic/bits/ioctl.h rename to Ubiquitous/XiZi/lib/musllib/arch/arm/bits/ioctl.h diff --git a/Ubiquitous/XiZi/lib/musllib/arch/generic/bits/ipc.h b/Ubiquitous/XiZi/lib/musllib/arch/arm/bits/ipc.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/arch/generic/bits/ipc.h rename to Ubiquitous/XiZi/lib/musllib/arch/arm/bits/ipc.h diff --git a/Ubiquitous/XiZi/lib/musllib/arch/generic/bits/kd.h b/Ubiquitous/XiZi/lib/musllib/arch/arm/bits/kd.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/arch/generic/bits/kd.h rename to Ubiquitous/XiZi/lib/musllib/arch/arm/bits/kd.h diff --git a/Ubiquitous/XiZi/lib/musllib/arch/generic/bits/limits.h b/Ubiquitous/XiZi/lib/musllib/arch/arm/bits/limits.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/arch/generic/bits/limits.h rename to Ubiquitous/XiZi/lib/musllib/arch/arm/bits/limits.h diff --git a/Ubiquitous/XiZi/lib/musllib/arch/generic/bits/link.h b/Ubiquitous/XiZi/lib/musllib/arch/arm/bits/link.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/arch/generic/bits/link.h rename to Ubiquitous/XiZi/lib/musllib/arch/arm/bits/link.h diff --git a/Ubiquitous/XiZi/lib/musllib/arch/generic/bits/mman.h b/Ubiquitous/XiZi/lib/musllib/arch/arm/bits/mman.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/arch/generic/bits/mman.h rename to Ubiquitous/XiZi/lib/musllib/arch/arm/bits/mman.h diff --git a/Ubiquitous/XiZi/lib/musllib/arch/generic/bits/poll.h b/Ubiquitous/XiZi/lib/musllib/arch/arm/bits/poll.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/arch/generic/bits/poll.h rename to Ubiquitous/XiZi/lib/musllib/arch/arm/bits/poll.h diff --git a/Ubiquitous/XiZi/lib/musllib/arch/generic/bits/resource.h b/Ubiquitous/XiZi/lib/musllib/arch/arm/bits/resource.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/arch/generic/bits/resource.h rename to Ubiquitous/XiZi/lib/musllib/arch/arm/bits/resource.h diff --git a/Ubiquitous/XiZi/lib/musllib/arch/generic/bits/socket.h b/Ubiquitous/XiZi/lib/musllib/arch/arm/bits/socket.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/arch/generic/bits/socket.h rename to Ubiquitous/XiZi/lib/musllib/arch/arm/bits/socket.h diff --git a/Ubiquitous/XiZi/lib/musllib/arch/generic/bits/soundcard.h b/Ubiquitous/XiZi/lib/musllib/arch/arm/bits/soundcard.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/arch/generic/bits/soundcard.h rename to Ubiquitous/XiZi/lib/musllib/arch/arm/bits/soundcard.h diff --git a/Ubiquitous/XiZi/lib/musllib/arch/generic/bits/statfs.h b/Ubiquitous/XiZi/lib/musllib/arch/arm/bits/statfs.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/arch/generic/bits/statfs.h rename to Ubiquitous/XiZi/lib/musllib/arch/arm/bits/statfs.h diff --git a/Ubiquitous/XiZi/lib/musllib/include/bits/syscall.h b/Ubiquitous/XiZi/lib/musllib/arch/arm/bits/syscall.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/include/bits/syscall.h rename to Ubiquitous/XiZi/lib/musllib/arch/arm/bits/syscall.h diff --git a/Ubiquitous/XiZi/lib/musllib/arch/arm/bits/syscall.h.in b/Ubiquitous/XiZi/lib/musllib/arch/arm/bits/syscall.h.in deleted file mode 100644 index 048fdea79..000000000 --- a/Ubiquitous/XiZi/lib/musllib/arch/arm/bits/syscall.h.in +++ /dev/null @@ -1,409 +0,0 @@ -#define __NR_restart_syscall 0 -#define __NR_exit 1 -#define __NR_fork 2 -#define __NR_read 3 -#define __NR_write 4 -#define __NR_open 5 -#define __NR_close 6 -#define __NR_creat 8 -#define __NR_link 9 -#define __NR_unlink 10 -#define __NR_execve 11 -#define __NR_chdir 12 -#define __NR_mknod 14 -#define __NR_chmod 15 -#define __NR_lchown 16 -#define __NR_lseek 19 -#define __NR_getpid 20 -#define __NR_mount 21 -#define __NR_setuid 23 -#define __NR_getuid 24 -#define __NR_ptrace 26 -#define __NR_pause 29 -#define __NR_access 33 -#define __NR_nice 34 -#define __NR_sync 36 -#define __NR_kill 37 -#define __NR_rename 38 -#define __NR_mkdir 39 -#define __NR_rmdir 40 -#define __NR_dup 41 -#define __NR_pipe 42 -#define __NR_times 43 -#define __NR_brk 45 -#define __NR_setgid 46 -#define __NR_getgid 47 -#define __NR_geteuid 49 -#define __NR_getegid 50 -#define __NR_acct 51 -#define __NR_umount2 52 -#define __NR_ioctl 54 -#define __NR_fcntl 55 -#define __NR_setpgid 57 -#define __NR_umask 60 -#define __NR_chroot 61 -#define __NR_ustat 62 -#define __NR_dup2 63 -#define __NR_getppid 64 -#define __NR_getpgrp 65 -#define __NR_setsid 66 -#define __NR_sigaction 67 -#define __NR_setreuid 70 -#define __NR_setregid 71 -#define __NR_sigsuspend 72 -#define __NR_sigpending 73 -#define __NR_sethostname 74 -#define __NR_setrlimit 75 -#define __NR_getrusage 77 -#define __NR_gettimeofday_time32 78 -#define __NR_settimeofday_time32 79 -#define __NR_getgroups 80 -#define __NR_setgroups 81 -#define __NR_symlink 83 -#define __NR_readlink 85 -#define __NR_uselib 86 -#define __NR_swapon 87 -#define __NR_reboot 88 -#define __NR_munmap 91 -#define __NR_truncate 92 -#define __NR_ftruncate 93 -#define __NR_fchmod 94 -#define __NR_fchown 95 -#define __NR_getpriority 96 -#define __NR_setpriority 97 -#define __NR_statfs 99 -#define __NR_fstatfs 100 -#define __NR_syslog 103 -#define __NR_setitimer 104 -#define __NR_getitimer 105 -#define __NR_stat 106 -#define __NR_lstat 107 -#define __NR_fstat 108 -#define __NR_vhangup 111 -#define __NR_wait4 114 -#define __NR_swapoff 115 -#define __NR_sysinfo 116 -#define __NR_fsync 118 -#define __NR_sigreturn 119 -#define __NR_clone 120 -#define __NR_setdomainname 121 -#define __NR_uname 122 -#define __NR_adjtimex 124 -#define __NR_mprotect 125 -#define __NR_sigprocmask 126 -#define __NR_init_module 128 -#define __NR_delete_module 129 -#define __NR_quotactl 131 -#define __NR_getpgid 132 -#define __NR_fchdir 133 -#define __NR_bdflush 134 -#define __NR_sysfs 135 -#define __NR_personality 136 -#define __NR_setfsuid 138 -#define __NR_setfsgid 139 -#define __NR__llseek 140 -#define __NR_getdents 141 -#define __NR__newselect 142 -#define __NR_flock 143 -#define __NR_msync 144 -#define __NR_readv 145 -#define __NR_writev 146 -#define __NR_getsid 147 -#define __NR_fdatasync 148 -#define __NR__sysctl 149 -#define __NR_mlock 150 -#define __NR_munlock 151 -#define __NR_mlockall 152 -#define __NR_munlockall 153 -#define __NR_sched_setparam 154 -#define __NR_sched_getparam 155 -#define __NR_sched_setscheduler 156 -#define __NR_sched_getscheduler 157 -#define __NR_sched_yield 158 -#define __NR_sched_get_priority_max 159 -#define __NR_sched_get_priority_min 160 -#define __NR_sched_rr_get_interval 161 -#define __NR_nanosleep 162 -#define __NR_mremap 163 -#define __NR_setresuid 164 -#define __NR_getresuid 165 -#define __NR_poll 168 -#define __NR_nfsservctl 169 -#define __NR_setresgid 170 -#define __NR_getresgid 171 -#define __NR_prctl 172 -#define __NR_rt_sigreturn 173 -#define __NR_rt_sigaction 174 -#define __NR_rt_sigprocmask 175 -#define __NR_rt_sigpending 176 -#define __NR_rt_sigtimedwait 177 -#define __NR_rt_sigqueueinfo 178 -#define __NR_rt_sigsuspend 179 -#define __NR_pread64 180 -#define __NR_pwrite64 181 -#define __NR_chown 182 -#define __NR_getcwd 183 -#define __NR_capget 184 -#define __NR_capset 185 -#define __NR_sigaltstack 186 -#define __NR_sendfile 187 -#define __NR_vfork 190 -#define __NR_ugetrlimit 191 -#define __NR_mmap2 192 -#define __NR_truncate64 193 -#define __NR_ftruncate64 194 -#define __NR_stat64 195 -#define __NR_lstat64 196 -#define __NR_fstat64 197 -#define __NR_lchown32 198 -#define __NR_getuid32 199 -#define __NR_getgid32 200 -#define __NR_geteuid32 201 -#define __NR_getegid32 202 -#define __NR_setreuid32 203 -#define __NR_setregid32 204 -#define __NR_getgroups32 205 -#define __NR_setgroups32 206 -#define __NR_fchown32 207 -#define __NR_setresuid32 208 -#define __NR_getresuid32 209 -#define __NR_setresgid32 210 -#define __NR_getresgid32 211 -#define __NR_chown32 212 -#define __NR_setuid32 213 -#define __NR_setgid32 214 -#define __NR_setfsuid32 215 -#define __NR_setfsgid32 216 -#define __NR_getdents64 217 -#define __NR_pivot_root 218 -#define __NR_mincore 219 -#define __NR_madvise 220 -#define __NR_fcntl64 221 -#define __NR_gettid 224 -#define __NR_readahead 225 -#define __NR_setxattr 226 -#define __NR_lsetxattr 227 -#define __NR_fsetxattr 228 -#define __NR_getxattr 229 -#define __NR_lgetxattr 230 -#define __NR_fgetxattr 231 -#define __NR_listxattr 232 -#define __NR_llistxattr 233 -#define __NR_flistxattr 234 -#define __NR_removexattr 235 -#define __NR_lremovexattr 236 -#define __NR_fremovexattr 237 -#define __NR_tkill 238 -#define __NR_sendfile64 239 -#define __NR_futex 240 -#define __NR_sched_setaffinity 241 -#define __NR_sched_getaffinity 242 -#define __NR_io_setup 243 -#define __NR_io_destroy 244 -#define __NR_io_getevents 245 -#define __NR_io_submit 246 -#define __NR_io_cancel 247 -#define __NR_exit_group 248 -#define __NR_lookup_dcookie 249 -#define __NR_epoll_create 250 -#define __NR_epoll_ctl 251 -#define __NR_epoll_wait 252 -#define __NR_remap_file_pages 253 -#define __NR_set_tid_address 256 -#define __NR_timer_create 257 -#define __NR_timer_settime32 258 -#define __NR_timer_gettime32 259 -#define __NR_timer_getoverrun 260 -#define __NR_timer_delete 261 -#define __NR_clock_settime32 262 -#define __NR_clock_gettime32 263 -#define __NR_clock_getres_time32 264 -#define __NR_clock_nanosleep_time32 265 -#define __NR_statfs64 266 -#define __NR_fstatfs64 267 -#define __NR_tgkill 268 -#define __NR_utimes 269 -#define __NR_fadvise64_64 270 -#define __NR_arm_fadvise64_64 270 -#define __NR_pciconfig_iobase 271 -#define __NR_pciconfig_read 272 -#define __NR_pciconfig_write 273 -#define __NR_mq_open 274 -#define __NR_mq_unlink 275 -#define __NR_mq_timedsend 276 -#define __NR_mq_timedreceive 277 -#define __NR_mq_notify 278 -#define __NR_mq_getsetattr 279 -#define __NR_waitid 280 -#define __NR_socket 281 -#define __NR_bind 282 -#define __NR_connect 283 -#define __NR_listen 284 -#define __NR_accept 285 -#define __NR_getsockname 286 -#define __NR_getpeername 287 -#define __NR_socketpair 288 -#define __NR_send 289 -#define __NR_sendto 290 -#define __NR_recv 291 -#define __NR_recvfrom 292 -#define __NR_shutdown 293 -#define __NR_setsockopt 294 -#define __NR_getsockopt 295 -#define __NR_sendmsg 296 -#define __NR_recvmsg 297 -#define __NR_semop 298 -#define __NR_semget 299 -#define __NR_semctl 300 -#define __NR_msgsnd 301 -#define __NR_msgrcv 302 -#define __NR_msgget 303 -#define __NR_msgctl 304 -#define __NR_shmat 305 -#define __NR_shmdt 306 -#define __NR_shmget 307 -#define __NR_shmctl 308 -#define __NR_add_key 309 -#define __NR_request_key 310 -#define __NR_keyctl 311 -#define __NR_semtimedop 312 -#define __NR_vserver 313 -#define __NR_ioprio_set 314 -#define __NR_ioprio_get 315 -#define __NR_inotify_init 316 -#define __NR_inotify_add_watch 317 -#define __NR_inotify_rm_watch 318 -#define __NR_mbind 319 -#define __NR_get_mempolicy 320 -#define __NR_set_mempolicy 321 -#define __NR_openat 322 -#define __NR_mkdirat 323 -#define __NR_mknodat 324 -#define __NR_fchownat 325 -#define __NR_futimesat 326 -#define __NR_fstatat64 327 -#define __NR_unlinkat 328 -#define __NR_renameat 329 -#define __NR_linkat 330 -#define __NR_symlinkat 331 -#define __NR_readlinkat 332 -#define __NR_fchmodat 333 -#define __NR_faccessat 334 -#define __NR_pselect6 335 -#define __NR_ppoll 336 -#define __NR_unshare 337 -#define __NR_set_robust_list 338 -#define __NR_get_robust_list 339 -#define __NR_splice 340 -#define __NR_sync_file_range2 341 -#define __NR_arm_sync_file_range 341 -#define __NR_tee 342 -#define __NR_vmsplice 343 -#define __NR_move_pages 344 -#define __NR_getcpu 345 -#define __NR_epoll_pwait 346 -#define __NR_kexec_load 347 -#define __NR_utimensat 348 -#define __NR_signalfd 349 -#define __NR_timerfd_create 350 -#define __NR_eventfd 351 -#define __NR_fallocate 352 -#define __NR_timerfd_settime32 353 -#define __NR_timerfd_gettime32 354 -#define __NR_signalfd4 355 -#define __NR_eventfd2 356 -#define __NR_epoll_create1 357 -#define __NR_dup3 358 -#define __NR_pipe2 359 -#define __NR_inotify_init1 360 -#define __NR_preadv 361 -#define __NR_pwritev 362 -#define __NR_rt_tgsigqueueinfo 363 -#define __NR_perf_event_open 364 -#define __NR_recvmmsg 365 -#define __NR_accept4 366 -#define __NR_fanotify_init 367 -#define __NR_fanotify_mark 368 -#define __NR_prlimit64 369 -#define __NR_name_to_handle_at 370 -#define __NR_open_by_handle_at 371 -#define __NR_clock_adjtime 372 -#define __NR_syncfs 373 -#define __NR_sendmmsg 374 -#define __NR_setns 375 -#define __NR_process_vm_readv 376 -#define __NR_process_vm_writev 377 -#define __NR_kcmp 378 -#define __NR_finit_module 379 -#define __NR_sched_setattr 380 -#define __NR_sched_getattr 381 -#define __NR_renameat2 382 -#define __NR_seccomp 383 -#define __NR_getrandom 384 -#define __NR_memfd_create 385 -#define __NR_bpf 386 -#define __NR_execveat 387 -#define __NR_userfaultfd 388 -#define __NR_membarrier 389 -#define __NR_mlock2 390 -#define __NR_copy_file_range 391 -#define __NR_preadv2 392 -#define __NR_pwritev2 393 -#define __NR_pkey_mprotect 394 -#define __NR_pkey_alloc 395 -#define __NR_pkey_free 396 -#define __NR_statx 397 -#define __NR_rseq 398 -#define __NR_io_pgetevents 399 -#define __NR_migrate_pages 400 -#define __NR_kexec_file_load 401 -#define __NR_clock_gettime64 403 -#define __NR_clock_settime64 404 -#define __NR_clock_adjtime64 405 -#define __NR_clock_getres_time64 406 -#define __NR_clock_nanosleep_time64 407 -#define __NR_timer_gettime64 408 -#define __NR_timer_settime64 409 -#define __NR_timerfd_gettime64 410 -#define __NR_timerfd_settime64 411 -#define __NR_utimensat_time64 412 -#define __NR_pselect6_time64 413 -#define __NR_ppoll_time64 414 -#define __NR_io_pgetevents_time64 416 -#define __NR_recvmmsg_time64 417 -#define __NR_mq_timedsend_time64 418 -#define __NR_mq_timedreceive_time64 419 -#define __NR_semtimedop_time64 420 -#define __NR_rt_sigtimedwait_time64 421 -#define __NR_futex_time64 422 -#define __NR_sched_rr_get_interval_time64 423 -#define __NR_pidfd_send_signal 424 -#define __NR_io_uring_setup 425 -#define __NR_io_uring_enter 426 -#define __NR_io_uring_register 427 -#define __NR_open_tree 428 -#define __NR_move_mount 429 -#define __NR_fsopen 430 -#define __NR_fsconfig 431 -#define __NR_fsmount 432 -#define __NR_fspick 433 -#define __NR_pidfd_open 434 -#define __NR_clone3 435 -#define __NR_close_range 436 -#define __NR_openat2 437 -#define __NR_pidfd_getfd 438 -#define __NR_faccessat2 439 -#define __NR_process_madvise 440 -#define __NR_epoll_pwait2 441 -#define __NR_mount_setattr 442 -#define __NR_landlock_create_ruleset 444 -#define __NR_landlock_add_rule 445 -#define __NR_landlock_restrict_self 446 - -#define __ARM_NR_breakpoint 0x0f0001 -#define __ARM_NR_cacheflush 0x0f0002 -#define __ARM_NR_usr26 0x0f0003 -#define __ARM_NR_usr32 0x0f0004 -#define __ARM_NR_set_tls 0x0f0005 -#define __ARM_NR_get_tls 0x0f0006 - diff --git a/Ubiquitous/XiZi/lib/musllib/include/bits/syscall_arch.h b/Ubiquitous/XiZi/lib/musllib/arch/arm/bits/syscall_arch.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/include/bits/syscall_arch.h rename to Ubiquitous/XiZi/lib/musllib/arch/arm/bits/syscall_arch.h diff --git a/Ubiquitous/XiZi/lib/musllib/arch/generic/bits/termios.h b/Ubiquitous/XiZi/lib/musllib/arch/arm/bits/termios.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/arch/generic/bits/termios.h rename to Ubiquitous/XiZi/lib/musllib/arch/arm/bits/termios.h diff --git a/Ubiquitous/XiZi/lib/musllib/arch/generic/bits/vt.h b/Ubiquitous/XiZi/lib/musllib/arch/arm/bits/vt.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/arch/generic/bits/vt.h rename to Ubiquitous/XiZi/lib/musllib/arch/arm/bits/vt.h diff --git a/Ubiquitous/XiZi/lib/musllib/arch/generic/bits/fenv.h b/Ubiquitous/XiZi/lib/musllib/arch/generic/bits/fenv.h deleted file mode 100644 index edbdea2a5..000000000 --- a/Ubiquitous/XiZi/lib/musllib/arch/generic/bits/fenv.h +++ /dev/null @@ -1,10 +0,0 @@ -#define FE_ALL_EXCEPT 0 -#define FE_TONEAREST 0 - -typedef unsigned long fexcept_t; - -typedef struct { - unsigned long __cw; -} fenv_t; - -#define FE_DFL_ENV ((const fenv_t *) -1) diff --git a/Ubiquitous/XiZi/lib/musllib/arch/generic/fp_arch.h b/Ubiquitous/XiZi/lib/musllib/arch/generic/fp_arch.h deleted file mode 100644 index e69de29bb..000000000 diff --git a/Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/alltypes.h b/Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/alltypes.h new file mode 100644 index 000000000..13aec7282 --- /dev/null +++ b/Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/alltypes.h @@ -0,0 +1,465 @@ +#define _Addr long +#define _Int64 long +#define _Reg long + +#define __BYTE_ORDER 1234 +#define __LONG_MAX 0x7fffffffffffffffL + +#ifndef __cplusplus +#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t) +typedef int wchar_t; +#define __DEFINED_wchar_t +#endif + +#endif + +#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t) +typedef int blksize_t; +#define __DEFINED_blksize_t +#endif + +#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t) +typedef unsigned int nlink_t; +#define __DEFINED_nlink_t +#endif + +#if defined(__NEED_float_t) && !defined(__DEFINED_float_t) +typedef float float_t; +#define __DEFINED_float_t +#endif + +#if defined(__NEED_double_t) && !defined(__DEFINED_double_t) +typedef double double_t; +#define __DEFINED_double_t +#endif + + +#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t) +typedef struct { long long __ll; long double __ld; } max_align_t; +#define __DEFINED_max_align_t +#endif + +#define __LITTLE_ENDIAN 1234 +#define __BIG_ENDIAN 4321 +#define __USE_TIME_BITS64 1 + +#if defined(__NEED_size_t) && !defined(__DEFINED_size_t) +typedef unsigned _Addr size_t; +#define __DEFINED_size_t +#endif + +#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t) +typedef unsigned _Addr uintptr_t; +#define __DEFINED_uintptr_t +#endif + +#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t) +typedef _Addr ptrdiff_t; +#define __DEFINED_ptrdiff_t +#endif + +#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t) +typedef _Addr ssize_t; +#define __DEFINED_ssize_t +#endif + +#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t) +typedef _Addr intptr_t; +#define __DEFINED_intptr_t +#endif + +#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t) +typedef _Addr regoff_t; +#define __DEFINED_regoff_t +#endif + +#if defined(__NEED_register_t) && !defined(__DEFINED_register_t) +typedef _Reg register_t; +#define __DEFINED_register_t +#endif + +#if defined(__NEED_time_t) && !defined(__DEFINED_time_t) +typedef _Int64 time_t; +#define __DEFINED_time_t +#endif + +#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t) +typedef _Int64 suseconds_t; +#define __DEFINED_suseconds_t +#endif + + +#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t) +typedef signed char int8_t; +#define __DEFINED_int8_t +#endif + +#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t) +typedef signed short int16_t; +#define __DEFINED_int16_t +#endif + +#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t) +typedef signed int int32_t; +#define __DEFINED_int32_t +#endif + +#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t) +typedef signed _Int64 int64_t; +#define __DEFINED_int64_t +#endif + +#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t) +typedef signed _Int64 intmax_t; +#define __DEFINED_intmax_t +#endif + +#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t) +typedef unsigned char uint8_t; +#define __DEFINED_uint8_t +#endif + +#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t) +typedef unsigned short uint16_t; +#define __DEFINED_uint16_t +#endif + +#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t) +typedef unsigned int uint32_t; +#define __DEFINED_uint32_t +#endif + +#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t) +typedef unsigned _Int64 uint64_t; +#define __DEFINED_uint64_t +#endif + +#if defined(__NEED_u_int64_t) && !defined(__DEFINED_u_int64_t) +typedef unsigned _Int64 u_int64_t; +#define __DEFINED_u_int64_t +#endif + +#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t) +typedef unsigned _Int64 uintmax_t; +#define __DEFINED_uintmax_t +#endif + + +#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t) +typedef unsigned mode_t; +#define __DEFINED_mode_t +#endif + +#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t) +typedef unsigned _Reg nlink_t; +#define __DEFINED_nlink_t +#endif + +#if defined(__NEED_off_t) && !defined(__DEFINED_off_t) +typedef _Int64 off_t; +#define __DEFINED_off_t +#endif + +#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t) +typedef unsigned _Int64 ino_t; +#define __DEFINED_ino_t +#endif + +#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t) +typedef unsigned _Int64 dev_t; +#define __DEFINED_dev_t +#endif + +#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t) +typedef long blksize_t; +#define __DEFINED_blksize_t +#endif + +#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t) +typedef _Int64 blkcnt_t; +#define __DEFINED_blkcnt_t +#endif + +#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t) +typedef unsigned _Int64 fsblkcnt_t; +#define __DEFINED_fsblkcnt_t +#endif + +#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t) +typedef unsigned _Int64 fsfilcnt_t; +#define __DEFINED_fsfilcnt_t +#endif + + +#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t) +typedef unsigned wint_t; +#define __DEFINED_wint_t +#endif + +#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t) +typedef unsigned long wctype_t; +#define __DEFINED_wctype_t +#endif + + +#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t) +typedef void * timer_t; +#define __DEFINED_timer_t +#endif + +#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t) +typedef int clockid_t; +#define __DEFINED_clockid_t +#endif + +#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t) +typedef long clock_t; +#define __DEFINED_clock_t +#endif + +#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval) +struct timeval { time_t tv_sec; suseconds_t tv_usec; }; +#define __DEFINED_struct_timeval +#endif + +#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec) +struct timespec { time_t tv_sec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER==4321); long tv_nsec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER!=4321); }; +#define __DEFINED_struct_timespec +#endif + + +#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t) +typedef int pid_t; +#define __DEFINED_pid_t +#endif + +#if defined(__NEED_id_t) && !defined(__DEFINED_id_t) +typedef unsigned id_t; +#define __DEFINED_id_t +#endif + +#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t) +typedef unsigned uid_t; +#define __DEFINED_uid_t +#endif + +#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t) +typedef unsigned gid_t; +#define __DEFINED_gid_t +#endif + +#if defined(__NEED_key_t) && !defined(__DEFINED_key_t) +typedef int key_t; +#define __DEFINED_key_t +#endif + +#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t) +typedef unsigned useconds_t; +#define __DEFINED_useconds_t +#endif + + +#ifdef __cplusplus +#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) +typedef unsigned long pthread_t; +#define __DEFINED_pthread_t +#endif + +#else +#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) +typedef struct __pthread * pthread_t; +#define __DEFINED_pthread_t +#endif + +#endif +#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t) +typedef int pthread_once_t; +#define __DEFINED_pthread_once_t +#endif + +#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t) +typedef unsigned pthread_key_t; +#define __DEFINED_pthread_key_t +#endif + +#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t) +typedef int pthread_spinlock_t; +#define __DEFINED_pthread_spinlock_t +#endif + +#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t) +typedef struct { unsigned type; } pthread_mutexattr_t; +#define __DEFINED_pthread_mutexattr_t +#endif + +#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t) +typedef struct { int clock; } pthread_condattr_t; +#define __DEFINED_pthread_condattr_t +#endif + +#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t) +typedef struct { unsigned __attr; } pthread_barrierattr_t; +#define __DEFINED_pthread_barrierattr_t +#endif + +#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t) +typedef struct { unsigned __attr[2]; } pthread_rwlockattr_t; +#define __DEFINED_pthread_rwlockattr_t +#endif + + +#if defined(__NEED_struct__IO_FILE) && !defined(__DEFINED_struct__IO_FILE) +struct _IO_FILE { + unsigned flags; + unsigned char *rpos, *rend; + int (*close)(struct _IO_FILE *); + unsigned char *wend, *wpos; + unsigned char *mustbezero_1; + unsigned char *wbase; + size_t (*read)(struct _IO_FILE *, unsigned char *, size_t); + size_t (*write)(struct _IO_FILE *, const unsigned char *, size_t); + off_t (*seek)(struct _IO_FILE *, off_t, int); + unsigned char *buf; + size_t buf_size; + struct _IO_FILE *prev, *next; + int fd; + int pipe_pid; + int mode; + void *lock; + int lbf; + void *cookie; + off_t off; + char *getln_buf; + void *mustbezero_2; + unsigned char *shend; + off_t shlim, shcnt; + struct __locale_struct *locale; +}; +#define __DEFINED_struct__IO_FILE +#endif + +#if defined(__NEED_FILE) && !defined(__DEFINED_FILE) +typedef struct _IO_FILE FILE; +#define __DEFINED_FILE +#endif + + +#if defined(__NEED_va_list) && !defined(__DEFINED_va_list) +typedef __builtin_va_list va_list; +#define __DEFINED_va_list +#endif + +#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list) +typedef __builtin_va_list __isoc_va_list; +#define __DEFINED___isoc_va_list +#endif + + +#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t) +typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t; +#define __DEFINED_mbstate_t +#endif + + +#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t) +typedef struct __locale_struct * locale_t; +#define __DEFINED_locale_t +#endif + + +#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t) +typedef unsigned long sigset_t; +#define __DEFINED_sigset_t +#endif + + +#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec) +struct iovec { void *iov_base; size_t iov_len; }; +#define __DEFINED_struct_iovec +#endif + + +#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t) +typedef unsigned socklen_t; +#define __DEFINED_socklen_t +#endif + +#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t) +typedef unsigned short sa_family_t; +#define __DEFINED_sa_family_t +#endif + +#if (defined(__NEED_sched_param) || defined(__NEED_pthread_attr_t)) && !defined(__DEFINED_sched_param) +struct sched_param { + int sched_priority; + int __reserved1; +#if _REDIR_TIME64 + long __reserved2[4]; +#else + struct { + time_t __reserved1; + long __reserved2; + } __reserved2[2]; +#endif + int __reserved3; +}; +#define __DEFINED_sched_param +#endif + +#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t) +typedef struct { + unsigned int detachstate; + unsigned int schedpolicy; + struct sched_param schedparam; + unsigned int inheritsched; + unsigned int scope; + unsigned int stackaddr_set; + void *stackaddr; + unsigned int stacksize_set; + size_t stacksize; +} pthread_attr_t; +#define __DEFINED_pthread_attr_t +#endif + +#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t) +typedef struct { unsigned int magic; unsigned int handle; pthread_mutexattr_t stAttr;} pthread_mutex_t; +#define __DEFINED_pthread_mutex_t +#endif + +#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t) +typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } mtx_t; +#define __DEFINED_mtx_t +#endif + +#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t) +// #include "../kernel/include/xs_event.h" +#include "xs_event.h" +typedef struct pthread_cond { + volatile int count; /**< The number of tasks blocked by condition */ + struct Event event; /**< Event object*/ + pthread_mutex_t* mutex; /**< Mutex locker for condition variable protection */ + volatile int value; /**< Condition variable state value*/ + int clock; +} pthread_cond_t; +#define __DEFINED_pthread_cond_t +#endif + +#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t) +typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } cnd_t; +#define __DEFINED_cnd_t +#endif + +#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t) +typedef struct { union { int __i[sizeof(long)==8?14:8]; volatile int __vi[sizeof(long)==8?14:8]; void *__p[sizeof(long)==8?7:8]; } __u; } pthread_rwlock_t; +#define __DEFINED_pthread_rwlock_t +#endif + +#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t) +typedef struct { union { int __i[sizeof(long)==8?8:5]; volatile int __vi[sizeof(long)==8?8:5]; void *__p[sizeof(long)==8?4:5]; } __u; } pthread_barrier_t; +#define __DEFINED_pthread_barrier_t +#endif + + +#undef _Addr +#undef _Int64 +#undef _Reg diff --git a/Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/alltypes.h.in b/Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/alltypes.h.in deleted file mode 100644 index 4579d1740..000000000 --- a/Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/alltypes.h.in +++ /dev/null @@ -1,18 +0,0 @@ -#define _Addr long -#define _Int64 long -#define _Reg long - -#define __BYTE_ORDER 1234 -#define __LONG_MAX 0x7fffffffffffffffL - -#ifndef __cplusplus -TYPEDEF int wchar_t; -#endif - -TYPEDEF int blksize_t; -TYPEDEF unsigned int nlink_t; - -TYPEDEF float float_t; -TYPEDEF double double_t; - -TYPEDEF struct { long long __ll; long double __ld; } max_align_t; diff --git a/Ubiquitous/XiZi/lib/musllib/include/bits/dirent.h b/Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/dirent.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/include/bits/dirent.h rename to Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/dirent.h diff --git a/Ubiquitous/XiZi/lib/musllib/arch/generic/bits/errno.h b/Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/errno.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/arch/generic/bits/errno.h rename to Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/errno.h diff --git a/Ubiquitous/XiZi/lib/musllib/arch/generic/bits/fcntl.h b/Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/fcntl.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/arch/generic/bits/fcntl.h rename to Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/fcntl.h diff --git a/Ubiquitous/XiZi/lib/musllib/arch/generic/bits/hwcap.h b/Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/hwcap.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/arch/generic/bits/hwcap.h rename to Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/hwcap.h diff --git a/Ubiquitous/XiZi/lib/musllib/include/bits/io.h b/Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/io.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/include/bits/io.h rename to Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/io.h diff --git a/Ubiquitous/XiZi/lib/musllib/include/bits/ioctl.h b/Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/ioctl.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/include/bits/ioctl.h rename to Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/ioctl.h diff --git a/Ubiquitous/XiZi/lib/musllib/arch/generic/bits/ioctl_fix.h b/Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/ioctl_fix.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/arch/generic/bits/ioctl_fix.h rename to Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/ioctl_fix.h diff --git a/Ubiquitous/XiZi/lib/musllib/include/bits/ipc.h b/Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/ipc.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/include/bits/ipc.h rename to Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/ipc.h diff --git a/Ubiquitous/XiZi/lib/musllib/arch/generic/bits/ipcstat.h b/Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/ipcstat.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/arch/generic/bits/ipcstat.h rename to Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/ipcstat.h diff --git a/Ubiquitous/XiZi/lib/musllib/include/bits/kd.h b/Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/kd.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/include/bits/kd.h rename to Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/kd.h diff --git a/Ubiquitous/XiZi/lib/musllib/include/bits/limits.h b/Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/limits.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/include/bits/limits.h rename to Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/limits.h diff --git a/Ubiquitous/XiZi/lib/musllib/include/bits/link.h b/Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/link.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/include/bits/link.h rename to Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/link.h diff --git a/Ubiquitous/XiZi/lib/musllib/include/bits/mman.h b/Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/mman.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/include/bits/mman.h rename to Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/mman.h diff --git a/Ubiquitous/XiZi/lib/musllib/arch/generic/bits/msg.h b/Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/msg.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/arch/generic/bits/msg.h rename to Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/msg.h diff --git a/Ubiquitous/XiZi/lib/musllib/include/bits/poll.h b/Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/poll.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/include/bits/poll.h rename to Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/poll.h diff --git a/Ubiquitous/XiZi/lib/musllib/arch/generic/bits/ptrace.h b/Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/ptrace.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/arch/generic/bits/ptrace.h rename to Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/ptrace.h diff --git a/Ubiquitous/XiZi/lib/musllib/include/bits/resource.h b/Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/resource.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/include/bits/resource.h rename to Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/resource.h diff --git a/Ubiquitous/XiZi/lib/musllib/arch/generic/bits/sem.h b/Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/sem.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/arch/generic/bits/sem.h rename to Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/sem.h diff --git a/Ubiquitous/XiZi/lib/musllib/arch/generic/bits/shm.h b/Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/shm.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/arch/generic/bits/shm.h rename to Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/shm.h diff --git a/Ubiquitous/XiZi/lib/musllib/include/bits/socket.h b/Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/socket.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/include/bits/socket.h rename to Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/socket.h diff --git a/Ubiquitous/XiZi/lib/musllib/include/bits/soundcard.h b/Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/soundcard.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/include/bits/soundcard.h rename to Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/soundcard.h diff --git a/Ubiquitous/XiZi/lib/musllib/include/bits/statfs.h b/Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/statfs.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/include/bits/statfs.h rename to Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/statfs.h diff --git a/Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/syscall.h.in b/Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/syscall.h.in deleted file mode 100644 index b534afe81..000000000 --- a/Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/syscall.h.in +++ /dev/null @@ -1,304 +0,0 @@ -#define __NR_io_setup 0 -#define __NR_io_destroy 1 -#define __NR_io_submit 2 -#define __NR_io_cancel 3 -#define __NR_io_getevents 4 -#define __NR_setxattr 5 -#define __NR_lsetxattr 6 -#define __NR_fsetxattr 7 -#define __NR_getxattr 8 -#define __NR_lgetxattr 9 -#define __NR_fgetxattr 10 -#define __NR_listxattr 11 -#define __NR_llistxattr 12 -#define __NR_flistxattr 13 -#define __NR_removexattr 14 -#define __NR_lremovexattr 15 -#define __NR_fremovexattr 16 -#define __NR_getcwd 17 -#define __NR_lookup_dcookie 18 -#define __NR_eventfd2 19 -#define __NR_epoll_create1 20 -#define __NR_epoll_ctl 21 -#define __NR_epoll_pwait 22 -#define __NR_dup 23 -#define __NR_dup3 24 -#define __NR_fcntl 25 -#define __NR_inotify_init1 26 -#define __NR_inotify_add_watch 27 -#define __NR_inotify_rm_watch 28 -#define __NR_ioctl 29 -#define __NR_ioprio_set 30 -#define __NR_ioprio_get 31 -#define __NR_flock 32 -#define __NR_mknodat 33 -#define __NR_mkdirat 34 -#define __NR_unlinkat 35 -#define __NR_symlinkat 36 -#define __NR_linkat 37 -#define __NR_umount2 39 -#define __NR_mount 40 -#define __NR_pivot_root 41 -#define __NR_nfsservctl 42 -#define __NR_statfs 43 -#define __NR_fstatfs 44 -#define __NR_truncate 45 -#define __NR_ftruncate 46 -#define __NR_fallocate 47 -#define __NR_faccessat 48 -#define __NR_chdir 49 -#define __NR_fchdir 50 -#define __NR_chroot 51 -#define __NR_fchmod 52 -#define __NR_fchmodat 53 -#define __NR_fchownat 54 -#define __NR_fchown 55 -#define __NR_openat 56 -#define __NR_close 57 -#define __NR_vhangup 58 -#define __NR_pipe2 59 -#define __NR_quotactl 60 -#define __NR_getdents64 61 -#define __NR_lseek 62 -#define __NR_read 63 -#define __NR_write 64 -#define __NR_readv 65 -#define __NR_writev 66 -#define __NR_pread64 67 -#define __NR_pwrite64 68 -#define __NR_preadv 69 -#define __NR_pwritev 70 -#define __NR_sendfile 71 -#define __NR_pselect6 72 -#define __NR_ppoll 73 -#define __NR_signalfd4 74 -#define __NR_vmsplice 75 -#define __NR_splice 76 -#define __NR_tee 77 -#define __NR_readlinkat 78 -#define __NR_newfstatat 79 -#define __NR_fstat 80 -#define __NR_sync 81 -#define __NR_fsync 82 -#define __NR_fdatasync 83 -#define __NR_sync_file_range 84 -#define __NR_timerfd_create 85 -#define __NR_timerfd_settime 86 -#define __NR_timerfd_gettime 87 -#define __NR_utimensat 88 -#define __NR_acct 89 -#define __NR_capget 90 -#define __NR_capset 91 -#define __NR_personality 92 -#define __NR_exit 93 -#define __NR_exit_group 94 -#define __NR_waitid 95 -#define __NR_set_tid_address 96 -#define __NR_unshare 97 -#define __NR_futex 98 -#define __NR_set_robust_list 99 -#define __NR_get_robust_list 100 -#define __NR_nanosleep 101 -#define __NR_getitimer 102 -#define __NR_setitimer 103 -#define __NR_kexec_load 104 -#define __NR_init_module 105 -#define __NR_delete_module 106 -#define __NR_timer_create 107 -#define __NR_timer_gettime 108 -#define __NR_timer_getoverrun 109 -#define __NR_timer_settime 110 -#define __NR_timer_delete 111 -#define __NR_clock_settime 112 -#define __NR_clock_gettime 113 -#define __NR_clock_getres 114 -#define __NR_clock_nanosleep 115 -#define __NR_syslog 116 -#define __NR_ptrace 117 -#define __NR_sched_setparam 118 -#define __NR_sched_setscheduler 119 -#define __NR_sched_getscheduler 120 -#define __NR_sched_getparam 121 -#define __NR_sched_setaffinity 122 -#define __NR_sched_getaffinity 123 -#define __NR_sched_yield 124 -#define __NR_sched_get_priority_max 125 -#define __NR_sched_get_priority_min 126 -#define __NR_sched_rr_get_interval 127 -#define __NR_restart_syscall 128 -#define __NR_kill 129 -#define __NR_tkill 130 -#define __NR_tgkill 131 -#define __NR_sigaltstack 132 -#define __NR_rt_sigsuspend 133 -#define __NR_rt_sigaction 134 -#define __NR_rt_sigprocmask 135 -#define __NR_rt_sigpending 136 -#define __NR_rt_sigtimedwait 137 -#define __NR_rt_sigqueueinfo 138 -#define __NR_rt_sigreturn 139 -#define __NR_setpriority 140 -#define __NR_getpriority 141 -#define __NR_reboot 142 -#define __NR_setregid 143 -#define __NR_setgid 144 -#define __NR_setreuid 145 -#define __NR_setuid 146 -#define __NR_setresuid 147 -#define __NR_getresuid 148 -#define __NR_setresgid 149 -#define __NR_getresgid 150 -#define __NR_setfsuid 151 -#define __NR_setfsgid 152 -#define __NR_times 153 -#define __NR_setpgid 154 -#define __NR_getpgid 155 -#define __NR_getsid 156 -#define __NR_setsid 157 -#define __NR_getgroups 158 -#define __NR_setgroups 159 -#define __NR_uname 160 -#define __NR_sethostname 161 -#define __NR_setdomainname 162 -#define __NR_getrlimit 163 -#define __NR_setrlimit 164 -#define __NR_getrusage 165 -#define __NR_umask 166 -#define __NR_prctl 167 -#define __NR_getcpu 168 -#define __NR_gettimeofday 169 -#define __NR_settimeofday 170 -#define __NR_adjtimex 171 -#define __NR_getpid 172 -#define __NR_getppid 173 -#define __NR_getuid 174 -#define __NR_geteuid 175 -#define __NR_getgid 176 -#define __NR_getegid 177 -#define __NR_gettid 178 -#define __NR_sysinfo 179 -#define __NR_mq_open 180 -#define __NR_mq_unlink 181 -#define __NR_mq_timedsend 182 -#define __NR_mq_timedreceive 183 -#define __NR_mq_notify 184 -#define __NR_mq_getsetattr 185 -#define __NR_msgget 186 -#define __NR_msgctl 187 -#define __NR_msgrcv 188 -#define __NR_msgsnd 189 -#define __NR_semget 190 -#define __NR_semctl 191 -#define __NR_semtimedop 192 -#define __NR_semop 193 -#define __NR_shmget 194 -#define __NR_shmctl 195 -#define __NR_shmat 196 -#define __NR_shmdt 197 -#define __NR_socket 198 -#define __NR_socketpair 199 -#define __NR_bind 200 -#define __NR_listen 201 -#define __NR_accept 202 -#define __NR_connect 203 -#define __NR_getsockname 204 -#define __NR_getpeername 205 -#define __NR_sendto 206 -#define __NR_recvfrom 207 -#define __NR_setsockopt 208 -#define __NR_getsockopt 209 -#define __NR_shutdown 210 -#define __NR_sendmsg 211 -#define __NR_recvmsg 212 -#define __NR_readahead 213 -#define __NR_brk 214 -#define __NR_munmap 215 -#define __NR_mremap 216 -#define __NR_add_key 217 -#define __NR_request_key 218 -#define __NR_keyctl 219 -#define __NR_clone 220 -#define __NR_execve 221 -#define __NR_mmap 222 -#define __NR_fadvise64 223 -#define __NR_swapon 224 -#define __NR_swapoff 225 -#define __NR_mprotect 226 -#define __NR_msync 227 -#define __NR_mlock 228 -#define __NR_munlock 229 -#define __NR_mlockall 230 -#define __NR_munlockall 231 -#define __NR_mincore 232 -#define __NR_madvise 233 -#define __NR_remap_file_pages 234 -#define __NR_mbind 235 -#define __NR_get_mempolicy 236 -#define __NR_set_mempolicy 237 -#define __NR_migrate_pages 238 -#define __NR_move_pages 239 -#define __NR_rt_tgsigqueueinfo 240 -#define __NR_perf_event_open 241 -#define __NR_accept4 242 -#define __NR_recvmmsg 243 -#define __NR_arch_specific_syscall 244 -#define __NR_wait4 260 -#define __NR_prlimit64 261 -#define __NR_fanotify_init 262 -#define __NR_fanotify_mark 263 -#define __NR_name_to_handle_at 264 -#define __NR_open_by_handle_at 265 -#define __NR_clock_adjtime 266 -#define __NR_syncfs 267 -#define __NR_setns 268 -#define __NR_sendmmsg 269 -#define __NR_process_vm_readv 270 -#define __NR_process_vm_writev 271 -#define __NR_kcmp 272 -#define __NR_finit_module 273 -#define __NR_sched_setattr 274 -#define __NR_sched_getattr 275 -#define __NR_renameat2 276 -#define __NR_seccomp 277 -#define __NR_getrandom 278 -#define __NR_memfd_create 279 -#define __NR_bpf 280 -#define __NR_execveat 281 -#define __NR_userfaultfd 282 -#define __NR_membarrier 283 -#define __NR_mlock2 284 -#define __NR_copy_file_range 285 -#define __NR_preadv2 286 -#define __NR_pwritev2 287 -#define __NR_pkey_mprotect 288 -#define __NR_pkey_alloc 289 -#define __NR_pkey_free 290 -#define __NR_statx 291 -#define __NR_io_pgetevents 292 -#define __NR_rseq 293 -#define __NR_kexec_file_load 294 -#define __NR_pidfd_send_signal 424 -#define __NR_io_uring_setup 425 -#define __NR_io_uring_enter 426 -#define __NR_io_uring_register 427 -#define __NR_open_tree 428 -#define __NR_move_mount 429 -#define __NR_fsopen 430 -#define __NR_fsconfig 431 -#define __NR_fsmount 432 -#define __NR_fspick 433 -#define __NR_pidfd_open 434 -#define __NR_clone3 435 -#define __NR_close_range 436 -#define __NR_openat2 437 -#define __NR_pidfd_getfd 438 -#define __NR_faccessat2 439 -#define __NR_process_madvise 440 -#define __NR_epoll_pwait2 441 -#define __NR_mount_setattr 442 -#define __NR_landlock_create_ruleset 444 -#define __NR_landlock_add_rule 445 -#define __NR_landlock_restrict_self 446 - -#define __NR_sysriscv __NR_arch_specific_syscall -#define __NR_riscv_flush_icache (__NR_sysriscv + 15) diff --git a/Ubiquitous/XiZi/lib/musllib/include/bits/termios.h b/Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/termios.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/include/bits/termios.h rename to Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/termios.h diff --git a/Ubiquitous/XiZi/lib/musllib/include/bits/vt.h b/Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/vt.h similarity index 100% rename from Ubiquitous/XiZi/lib/musllib/include/bits/vt.h rename to Ubiquitous/XiZi/lib/musllib/arch/riscv64/bits/vt.h diff --git a/Ubiquitous/XiZi/lib/musllib/include/bits/fcntl.h b/Ubiquitous/XiZi/lib/musllib/include/bits/fcntl.h deleted file mode 100644 index 4cb1753b7..000000000 --- a/Ubiquitous/XiZi/lib/musllib/include/bits/fcntl.h +++ /dev/null @@ -1,40 +0,0 @@ -#define O_CREAT 0100 -#define O_EXCL 0200 -#define O_NOCTTY 0400 -#define O_TRUNC 01000 -#define O_APPEND 02000 -#define O_NONBLOCK 04000 -#define O_DSYNC 010000 -#define O_SYNC 04010000 -#define O_RSYNC 04010000 -#define O_DIRECTORY 040000 -#define O_NOFOLLOW 0100000 -#define O_CLOEXEC 02000000 - -#define O_ASYNC 020000 -#define O_DIRECT 0200000 -#define O_LARGEFILE 0400000 -#define O_NOATIME 01000000 -#define O_PATH 010000000 -#define O_TMPFILE 020040000 -#define O_NDELAY O_NONBLOCK - -#define F_DUPFD 0 -#define F_GETFD 1 -#define F_SETFD 2 -#define F_GETFL 3 -#define F_SETFL 4 - -#define F_SETOWN 8 -#define F_GETOWN 9 -#define F_SETSIG 10 -#define F_GETSIG 11 - -#define F_GETLK 12 -#define F_SETLK 13 -#define F_SETLKW 14 - -#define F_SETOWN_EX 15 -#define F_GETOWN_EX 16 - -#define F_GETOWNER_UIDS 17 diff --git a/Ubiquitous/XiZi/lib/musllib/include/bits/fenv.h b/Ubiquitous/XiZi/lib/musllib/include/bits/fenv.h deleted file mode 100644 index d85fc86d7..000000000 --- a/Ubiquitous/XiZi/lib/musllib/include/bits/fenv.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef __ARM_PCS_VFP -#define FE_ALL_EXCEPT 0 -#define FE_TONEAREST 0 -#else -#define FE_INVALID 1 -#define FE_DIVBYZERO 2 -#define FE_OVERFLOW 4 -#define FE_UNDERFLOW 8 -#define FE_INEXACT 16 -#define FE_ALL_EXCEPT 31 -#define FE_TONEAREST 0 -#define FE_DOWNWARD 0x800000 -#define FE_UPWARD 0x400000 -#define FE_TOWARDZERO 0xc00000 -#endif - -typedef unsigned long fexcept_t; - -typedef struct { - unsigned long __cw; -} fenv_t; - -#define FE_DFL_ENV ((const fenv_t *) -1) diff --git a/Ubiquitous/XiZi/lib/musllib/include/bits/float.h b/Ubiquitous/XiZi/lib/musllib/include/bits/float.h deleted file mode 100644 index c4a655e7b..000000000 --- a/Ubiquitous/XiZi/lib/musllib/include/bits/float.h +++ /dev/null @@ -1,16 +0,0 @@ -#define FLT_EVAL_METHOD 0 - -#define LDBL_TRUE_MIN 4.94065645841246544177e-324L -#define LDBL_MIN 2.22507385850720138309e-308L -#define LDBL_MAX 1.79769313486231570815e+308L -#define LDBL_EPSILON 2.22044604925031308085e-16L - -#define LDBL_MANT_DIG 53 -#define LDBL_MIN_EXP (-1021) -#define LDBL_MAX_EXP 1024 - -#define LDBL_DIG 15 -#define LDBL_MIN_10_EXP (-307) -#define LDBL_MAX_10_EXP 308 - -#define DECIMAL_DIG 17 diff --git a/Ubiquitous/XiZi/lib/musllib/include/bits/hwcap.h b/Ubiquitous/XiZi/lib/musllib/include/bits/hwcap.h deleted file mode 100644 index a3d87312d..000000000 --- a/Ubiquitous/XiZi/lib/musllib/include/bits/hwcap.h +++ /dev/null @@ -1,53 +0,0 @@ -#define HWCAP_SWP (1 << 0) -#define HWCAP_HALF (1 << 1) -#define HWCAP_THUMB (1 << 2) -#define HWCAP_26BIT (1 << 3) -#define HWCAP_FAST_MULT (1 << 4) -#define HWCAP_FPA (1 << 5) -#define HWCAP_VFP (1 << 6) -#define HWCAP_EDSP (1 << 7) -#define HWCAP_JAVA (1 << 8) -#define HWCAP_IWMMXT (1 << 9) -#define HWCAP_CRUNCH (1 << 10) -#define HWCAP_THUMBEE (1 << 11) -#define HWCAP_NEON (1 << 12) -#define HWCAP_VFPv3 (1 << 13) -#define HWCAP_VFPv3D16 (1 << 14) -#define HWCAP_TLS (1 << 15) -#define HWCAP_VFPv4 (1 << 16) -#define HWCAP_IDIVA (1 << 17) -#define HWCAP_IDIVT (1 << 18) -#define HWCAP_VFPD32 (1 << 19) -#define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT) -#define HWCAP_LPAE (1 << 20) -#define HWCAP_EVTSTRM (1 << 21) - -#define HWCAP2_AES (1 << 0) -#define HWCAP2_PMULL (1 << 1) -#define HWCAP2_SHA1 (1 << 2) -#define HWCAP2_SHA2 (1 << 3) -#define HWCAP2_CRC32 (1 << 4) - -#define HWCAP_ARM_SWP (1 << 0) -#define HWCAP_ARM_HALF (1 << 1) -#define HWCAP_ARM_THUMB (1 << 2) -#define HWCAP_ARM_26BIT (1 << 3) -#define HWCAP_ARM_FAST_MULT (1 << 4) -#define HWCAP_ARM_FPA (1 << 5) -#define HWCAP_ARM_VFP (1 << 6) -#define HWCAP_ARM_EDSP (1 << 7) -#define HWCAP_ARM_JAVA (1 << 8) -#define HWCAP_ARM_IWMMXT (1 << 9) -#define HWCAP_ARM_CRUNCH (1 << 10) -#define HWCAP_ARM_THUMBEE (1 << 11) -#define HWCAP_ARM_NEON (1 << 12) -#define HWCAP_ARM_VFPv3 (1 << 13) -#define HWCAP_ARM_VFPv3D16 (1 << 14) -#define HWCAP_ARM_TLS (1 << 15) -#define HWCAP_ARM_VFPv4 (1 << 16) -#define HWCAP_ARM_IDIVA (1 << 17) -#define HWCAP_ARM_IDIVT (1 << 18) -#define HWCAP_ARM_VFPD32 (1 << 19) -#define HWCAP_ARM_IDIV (HWCAP_ARM_IDIVA | HWCAP_ARM_IDIVT) -#define HWCAP_ARM_LPAE (1 << 20) -#define HWCAP_ARM_EVTSTRM (1 << 21) diff --git a/Ubiquitous/XiZi/lib/musllib/include/bits/ioctl_fix.h b/Ubiquitous/XiZi/lib/musllib/include/bits/ioctl_fix.h deleted file mode 100644 index ebb383daf..000000000 --- a/Ubiquitous/XiZi/lib/musllib/include/bits/ioctl_fix.h +++ /dev/null @@ -1,2 +0,0 @@ -#undef FIOQSIZE -#define FIOQSIZE 0x545e diff --git a/Ubiquitous/XiZi/lib/musllib/include/bits/ipcstat.h b/Ubiquitous/XiZi/lib/musllib/include/bits/ipcstat.h deleted file mode 100644 index 4f4fcb0c5..000000000 --- a/Ubiquitous/XiZi/lib/musllib/include/bits/ipcstat.h +++ /dev/null @@ -1 +0,0 @@ -#define IPC_STAT 0x102 diff --git a/Ubiquitous/XiZi/lib/musllib/include/bits/msg.h b/Ubiquitous/XiZi/lib/musllib/include/bits/msg.h deleted file mode 100644 index 7bbbb2bf4..000000000 --- a/Ubiquitous/XiZi/lib/musllib/include/bits/msg.h +++ /dev/null @@ -1,18 +0,0 @@ -struct msqid_ds { - struct ipc_perm msg_perm; - unsigned long __msg_stime_lo; - unsigned long __msg_stime_hi; - unsigned long __msg_rtime_lo; - unsigned long __msg_rtime_hi; - unsigned long __msg_ctime_lo; - unsigned long __msg_ctime_hi; - unsigned long msg_cbytes; - msgqnum_t msg_qnum; - msglen_t msg_qbytes; - pid_t msg_lspid; - pid_t msg_lrpid; - unsigned long __unused[2]; - time_t msg_stime; - time_t msg_rtime; - time_t msg_ctime; -}; diff --git a/Ubiquitous/XiZi/lib/musllib/include/bits/posix.h b/Ubiquitous/XiZi/lib/musllib/include/bits/posix.h deleted file mode 100644 index 30a38714f..000000000 --- a/Ubiquitous/XiZi/lib/musllib/include/bits/posix.h +++ /dev/null @@ -1,2 +0,0 @@ -#define _POSIX_V6_ILP32_OFFBIG 1 -#define _POSIX_V7_ILP32_OFFBIG 1 diff --git a/Ubiquitous/XiZi/lib/musllib/include/bits/ptrace.h b/Ubiquitous/XiZi/lib/musllib/include/bits/ptrace.h deleted file mode 100644 index 9556ef4b7..000000000 --- a/Ubiquitous/XiZi/lib/musllib/include/bits/ptrace.h +++ /dev/null @@ -1,25 +0,0 @@ -#define PTRACE_GETWMMXREGS 18 -#define PTRACE_SETWMMXREGS 19 -#define PTRACE_GET_THREAD_AREA 22 -#define PTRACE_SET_SYSCALL 23 -#define PTRACE_GETCRUNCHREGS 25 -#define PTRACE_SETCRUNCHREGS 26 -#define PTRACE_GETVFPREGS 27 -#define PTRACE_SETVFPREGS 28 -#define PTRACE_GETHBPREGS 29 -#define PTRACE_SETHBPREGS 30 -#define PTRACE_GETFDPIC 31 -#define PTRACE_GETFDPIC_EXEC 0 -#define PTRACE_GETFDPIC_INTERP 1 - -#define PT_GETWMMXREGS PTRACE_GETWMMXREGS -#define PT_SETWMMXREGS PTRACE_SETWMMXREGS -#define PT_GET_THREAD_AREA PTRACE_GET_THREAD_AREA -#define PT_SET_SYSCALL PTRACE_SET_SYSCALL -#define PT_GETCRUNCHREGS PTRACE_GETCRUNCHREGS -#define PT_SETCRUNCHREGS PTRACE_SETCRUNCHREGS -#define PT_GETVFPREGS PTRACE_GETVFPREGS -#define PT_SETVFPREGS PTRACE_SETVFPREGS -#define PT_GETHBPREGS PTRACE_GETHBPREGS -#define PT_SETHBPREGS PTRACE_SETHBPREGS -#define PT_GETFDPIC PTRACE_GETFDPIC diff --git a/Ubiquitous/XiZi/lib/musllib/include/bits/reg.h b/Ubiquitous/XiZi/lib/musllib/include/bits/reg.h deleted file mode 100644 index 0c7bffca0..000000000 --- a/Ubiquitous/XiZi/lib/musllib/include/bits/reg.h +++ /dev/null @@ -1,3 +0,0 @@ -#undef __WORDSIZE -#define __WORDSIZE 32 -/* FIXME */ diff --git a/Ubiquitous/XiZi/lib/musllib/include/bits/sem.h b/Ubiquitous/XiZi/lib/musllib/include/bits/sem.h deleted file mode 100644 index 544e3d2a5..000000000 --- a/Ubiquitous/XiZi/lib/musllib/include/bits/sem.h +++ /dev/null @@ -1,18 +0,0 @@ -struct semid_ds { - struct ipc_perm sem_perm; - unsigned long __sem_otime_lo; - unsigned long __sem_otime_hi; - unsigned long __sem_ctime_lo; - unsigned long __sem_ctime_hi; -#if __BYTE_ORDER == __LITTLE_ENDIAN - unsigned short sem_nsems; - char __sem_nsems_pad[sizeof(long)-sizeof(short)]; -#else - char __sem_nsems_pad[sizeof(long)-sizeof(short)]; - unsigned short sem_nsems; -#endif - long __unused3; - long __unused4; - time_t sem_otime; - time_t sem_ctime; -}; diff --git a/Ubiquitous/XiZi/lib/musllib/include/bits/setjmp.h b/Ubiquitous/XiZi/lib/musllib/include/bits/setjmp.h deleted file mode 100644 index 55e3a95bb..000000000 --- a/Ubiquitous/XiZi/lib/musllib/include/bits/setjmp.h +++ /dev/null @@ -1 +0,0 @@ -typedef unsigned long long __jmp_buf[32]; diff --git a/Ubiquitous/XiZi/lib/musllib/include/bits/shm.h b/Ubiquitous/XiZi/lib/musllib/include/bits/shm.h deleted file mode 100644 index 725fb4696..000000000 --- a/Ubiquitous/XiZi/lib/musllib/include/bits/shm.h +++ /dev/null @@ -1,31 +0,0 @@ -#define SHMLBA 4096 - -struct shmid_ds { - struct ipc_perm shm_perm; - size_t shm_segsz; - unsigned long __shm_atime_lo; - unsigned long __shm_atime_hi; - unsigned long __shm_dtime_lo; - unsigned long __shm_dtime_hi; - unsigned long __shm_ctime_lo; - unsigned long __shm_ctime_hi; - pid_t shm_cpid; - pid_t shm_lpid; - unsigned long shm_nattch; - unsigned long __pad1; - unsigned long __pad2; - unsigned long __pad3; - time_t shm_atime; - time_t shm_dtime; - time_t shm_ctime; -}; - -struct shminfo { - unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4]; -}; - -struct shm_info { - int __used_ids; - unsigned long shm_tot, shm_rss, shm_swp; - unsigned long __swap_attempts, __swap_successes; -}; diff --git a/Ubiquitous/XiZi/lib/musllib/include/bits/signal.h b/Ubiquitous/XiZi/lib/musllib/include/bits/signal.h deleted file mode 100644 index 3c7898567..000000000 --- a/Ubiquitous/XiZi/lib/musllib/include/bits/signal.h +++ /dev/null @@ -1,86 +0,0 @@ -#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ - || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) - -#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) -#define MINSIGSTKSZ 2048 -#define SIGSTKSZ 8192 -#endif - -#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) -typedef int greg_t, gregset_t[18]; -typedef struct sigcontext { - unsigned long trap_no, error_code, oldmask; - unsigned long arm_r0, arm_r1, arm_r2, arm_r3; - unsigned long arm_r4, arm_r5, arm_r6, arm_r7; - unsigned long arm_r8, arm_r9, arm_r10, arm_fp; - unsigned long arm_ip, arm_sp, arm_lr, arm_pc; - unsigned long arm_cpsr, fault_address; -} mcontext_t; -#else -typedef struct { - unsigned long __regs[21]; -} mcontext_t; -#endif - -struct sigaltstack { - void *ss_sp; - int ss_flags; - size_t ss_size; -}; - -typedef struct __ucontext { - unsigned long uc_flags; - struct __ucontext *uc_link; - stack_t uc_stack; - mcontext_t uc_mcontext; - sigset_t uc_sigmask; - unsigned long long uc_regspace[64]; -} ucontext_t; - -#define SA_NOCLDSTOP 1 -#define SA_NOCLDWAIT 2 -#define SA_SIGINFO 4 -#define SA_ONSTACK 0x08000000 -#define SA_RESTART 0x10000000 -#define SA_NODEFER 0x40000000 -#define SA_RESETHAND 0x80000000 -#define SA_RESTORER 0x04000000 - -#endif - -#define SIGHUP 1 -#define SIGINT 2 -#define SIGQUIT 3 -#define SIGILL 4 -#define SIGTRAP 5 -#define SIGABRT 6 -#define SIGIOT SIGABRT -#define SIGBUS 7 -#define SIGFPE 8 -#define SIGKILL 9 -#define SIGUSR1 10 -#define SIGSEGV 11 -#define SIGUSR2 12 -#define SIGPIPE 13 -#define SIGALRM 14 -#define SIGTERM 15 -#define SIGSTKFLT 16 -#define SIGCHLD 17 -#define SIGCONT 18 -#define SIGSTOP 19 -#define SIGTSTP 20 -#define SIGTTIN 21 -#define SIGTTOU 22 -#define SIGURG 23 -#define SIGXCPU 24 -#define SIGXFSZ 25 -#define SIGVTALRM 26 -#define SIGPROF 27 -#define SIGWINCH 28 -#define SIGIO 29 -#define SIGPOLL 29 -#define SIGPWR 30 -#define SIGSYS 31 -#define SIGUNUSED SIGSYS - -#define _NSIG 65 diff --git a/Ubiquitous/XiZi/lib/musllib/include/bits/stat.h b/Ubiquitous/XiZi/lib/musllib/include/bits/stat.h deleted file mode 100644 index 5d7828cf7..000000000 --- a/Ubiquitous/XiZi/lib/musllib/include/bits/stat.h +++ /dev/null @@ -1,25 +0,0 @@ -/* copied from kernel definition, but with padding replaced - * by the corresponding correctly-sized userspace types. */ - -struct stat { - dev_t st_dev; - int __st_dev_padding; - long __st_ino_truncated; - mode_t st_mode; - nlink_t st_nlink; - uid_t st_uid; - gid_t st_gid; - dev_t st_rdev; - int __st_rdev_padding; - off_t st_size; - blksize_t st_blksize; - blkcnt_t st_blocks; - struct { - long tv_sec; - long tv_nsec; - } __st_atim32, __st_mtim32, __st_ctim32; - ino_t st_ino; - struct timespec st_atim; - struct timespec st_mtim; - struct timespec st_ctim; -}; diff --git a/Ubiquitous/XiZi/lib/musllib/include/bits/stdint.h b/Ubiquitous/XiZi/lib/musllib/include/bits/stdint.h deleted file mode 100644 index d1b271219..000000000 --- a/Ubiquitous/XiZi/lib/musllib/include/bits/stdint.h +++ /dev/null @@ -1,20 +0,0 @@ -typedef int32_t int_fast16_t; -typedef int32_t int_fast32_t; -typedef uint32_t uint_fast16_t; -typedef uint32_t uint_fast32_t; - -#define INT_FAST16_MIN INT32_MIN -#define INT_FAST32_MIN INT32_MIN - -#define INT_FAST16_MAX INT32_MAX -#define INT_FAST32_MAX INT32_MAX - -#define UINT_FAST16_MAX UINT32_MAX -#define UINT_FAST32_MAX UINT32_MAX - -#define INTPTR_MIN INT32_MIN -#define INTPTR_MAX INT32_MAX -#define UINTPTR_MAX UINT32_MAX -#define PTRDIFF_MIN INT32_MIN -#define PTRDIFF_MAX INT32_MAX -#define SIZE_MAX UINT32_MAX diff --git a/Ubiquitous/XiZi/lib/musllib/include/bits/user.h b/Ubiquitous/XiZi/lib/musllib/include/bits/user.h deleted file mode 100644 index 3e5a4d21d..000000000 --- a/Ubiquitous/XiZi/lib/musllib/include/bits/user.h +++ /dev/null @@ -1,36 +0,0 @@ -typedef struct user_fpregs { - struct fp_reg { - unsigned sign1:1; - unsigned unused:15; - unsigned sign2:1; - unsigned exponent:14; - unsigned j:1; - unsigned mantissa1:31; - unsigned mantissa0:32; - } fpregs[8]; - unsigned fpsr:32; - unsigned fpcr:32; - unsigned char ftype[8]; - unsigned int init_flag; -} elf_fpregset_t; - -struct user_regs { - unsigned long uregs[18]; -}; -#define ELF_NGREG 18 -typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NGREG]; - -struct user { - struct user_regs regs; - int u_fpvalid; - unsigned long u_tsize, u_dsize, u_ssize; - unsigned long start_code, start_stack; - long signal; - int reserved; - struct user_regs *u_ar0; - unsigned long magic; - char u_comm[32]; - int u_debugreg[8]; - struct user_fpregs u_fp; - struct user_fpregs *u_fp0; -}; diff --git a/Ubiquitous/XiZi/lib/musllib/libmusl.a b/Ubiquitous/XiZi/lib/musllib/libmusl.a deleted file mode 100644 index 4778f6554..000000000 Binary files a/Ubiquitous/XiZi/lib/musllib/libmusl.a and /dev/null differ diff --git a/Ubiquitous/XiZi/lib/musllib/src/math/Makefile b/Ubiquitous/XiZi/lib/musllib/src/math/Makefile index 0fac8ccfd..3be13a481 100644 --- a/Ubiquitous/XiZi/lib/musllib/src/math/Makefile +++ b/Ubiquitous/XiZi/lib/musllib/src/math/Makefile @@ -2,6 +2,7 @@ SRC_FILES := __fpclassify.c __fpclassifyl.c __math_divzero.c __math_divzerof.c _ SRC_FILES += __signbit.c __signbitl.c copysign.c copysignl.c SRC_FILES += exp_data.c fabs.c fabsl.c floor.c fmod.c fmodl.c frexp.c frexpl.c log_data.c log.c SRC_FILES += pow_data.c pow.c round.c scalbn.c scalbnl.c sqrt.c +SRC_FILES += ceil.c ceilf.c ceill.c rint.c rintf.c rintl.c # SRC_DIR := arm diff --git a/Ubiquitous/XiZi/lib/musllib/src/math/ceil.c b/Ubiquitous/XiZi/lib/musllib/src/math/ceil.c new file mode 100644 index 000000000..b13e6f2d6 --- /dev/null +++ b/Ubiquitous/XiZi/lib/musllib/src/math/ceil.c @@ -0,0 +1,31 @@ +#include "libm.h" + +#if FLT_EVAL_METHOD==0 || FLT_EVAL_METHOD==1 +#define EPS DBL_EPSILON +#elif FLT_EVAL_METHOD==2 +#define EPS LDBL_EPSILON +#endif +static const double_t toint = 1/EPS; + +double ceil(double x) +{ + union {double f; uint64_t i;} u = {x}; + int e = u.i >> 52 & 0x7ff; + double_t y; + + if (e >= 0x3ff+52 || x == 0) + return x; + /* y = int(x) - x, where int(x) is an integer neighbor of x */ + if (u.i >> 63) + y = x - toint + toint - x; + else + y = x + toint - toint - x; + /* special case because of non-nearest rounding modes */ + if (e <= 0x3ff-1) { + FORCE_EVAL(y); + return u.i >> 63 ? -0.0 : 1; + } + if (y < 0) + return x + y + 1; + return x + y; +} diff --git a/Ubiquitous/XiZi/lib/musllib/src/math/ceilf.c b/Ubiquitous/XiZi/lib/musllib/src/math/ceilf.c new file mode 100644 index 000000000..869835f39 --- /dev/null +++ b/Ubiquitous/XiZi/lib/musllib/src/math/ceilf.c @@ -0,0 +1,27 @@ +#include "libm.h" + +float ceilf(float x) +{ + union {float f; uint32_t i;} u = {x}; + int e = (int)(u.i >> 23 & 0xff) - 0x7f; + uint32_t m; + + if (e >= 23) + return x; + if (e >= 0) { + m = 0x007fffff >> e; + if ((u.i & m) == 0) + return x; + FORCE_EVAL(x + 0x1p120f); + if (u.i >> 31 == 0) + u.i += m; + u.i &= ~m; + } else { + FORCE_EVAL(x + 0x1p120f); + if (u.i >> 31) + u.f = -0.0; + else if (u.i << 1) + u.f = 1.0; + } + return u.f; +} diff --git a/Ubiquitous/XiZi/lib/musllib/src/math/ceill.c b/Ubiquitous/XiZi/lib/musllib/src/math/ceill.c new file mode 100644 index 000000000..60a83020d --- /dev/null +++ b/Ubiquitous/XiZi/lib/musllib/src/math/ceill.c @@ -0,0 +1,34 @@ +#include "libm.h" + +#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024 +long double ceill(long double x) +{ + return ceil(x); +} +#elif (LDBL_MANT_DIG == 64 || LDBL_MANT_DIG == 113) && LDBL_MAX_EXP == 16384 + +static const long double toint = 1/LDBL_EPSILON; + +long double ceill(long double x) +{ + union ldshape u = {x}; + int e = u.i.se & 0x7fff; + long double y; + + if (e >= 0x3fff+LDBL_MANT_DIG-1 || x == 0) + return x; + /* y = int(x) - x, where int(x) is an integer neighbor of x */ + if (u.i.se >> 15) + y = x - toint + toint - x; + else + y = x + toint - toint - x; + /* special case because of non-nearest rounding modes */ + if (e <= 0x3fff-1) { + FORCE_EVAL(y); + return u.i.se >> 15 ? -0.0 : 1; + } + if (y < 0) + return x + y + 1; + return x + y; +} +#endif diff --git a/Ubiquitous/XiZi/lib/musllib/src/math/rint.c b/Ubiquitous/XiZi/lib/musllib/src/math/rint.c new file mode 100644 index 000000000..fbba390e7 --- /dev/null +++ b/Ubiquitous/XiZi/lib/musllib/src/math/rint.c @@ -0,0 +1,28 @@ +#include +#include +#include + +#if FLT_EVAL_METHOD==0 || FLT_EVAL_METHOD==1 +#define EPS DBL_EPSILON +#elif FLT_EVAL_METHOD==2 +#define EPS LDBL_EPSILON +#endif +static const double_t toint = 1/EPS; + +double rint(double x) +{ + union {double f; uint64_t i;} u = {x}; + int e = u.i>>52 & 0x7ff; + int s = u.i>>63; + double_t y; + + if (e >= 0x3ff+52) + return x; + if (s) + y = x - toint + toint; + else + y = x + toint - toint; + if (y == 0) + return s ? -0.0 : 0; + return y; +} diff --git a/Ubiquitous/XiZi/lib/musllib/src/math/rintf.c b/Ubiquitous/XiZi/lib/musllib/src/math/rintf.c new file mode 100644 index 000000000..9047688d2 --- /dev/null +++ b/Ubiquitous/XiZi/lib/musllib/src/math/rintf.c @@ -0,0 +1,30 @@ +#include +#include +#include + +#if FLT_EVAL_METHOD==0 +#define EPS FLT_EPSILON +#elif FLT_EVAL_METHOD==1 +#define EPS DBL_EPSILON +#elif FLT_EVAL_METHOD==2 +#define EPS LDBL_EPSILON +#endif +static const float_t toint = 1/EPS; + +float rintf(float x) +{ + union {float f; uint32_t i;} u = {x}; + int e = u.i>>23 & 0xff; + int s = u.i>>31; + float_t y; + + if (e >= 0x7f+23) + return x; + if (s) + y = x - toint + toint; + else + y = x + toint - toint; + if (y == 0) + return s ? -0.0f : 0.0f; + return y; +} diff --git a/Ubiquitous/XiZi/lib/musllib/src/math/rintl.c b/Ubiquitous/XiZi/lib/musllib/src/math/rintl.c new file mode 100644 index 000000000..374327db2 --- /dev/null +++ b/Ubiquitous/XiZi/lib/musllib/src/math/rintl.c @@ -0,0 +1,29 @@ +#include "libm.h" + +#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024 +long double rintl(long double x) +{ + return rint(x); +} +#elif (LDBL_MANT_DIG == 64 || LDBL_MANT_DIG == 113) && LDBL_MAX_EXP == 16384 + +static const long double toint = 1/LDBL_EPSILON; + +long double rintl(long double x) +{ + union ldshape u = {x}; + int e = u.i.se & 0x7fff; + int s = u.i.se >> 15; + long double y; + + if (e >= 0x3fff+LDBL_MANT_DIG-1) + return x; + if (s) + y = x - toint + toint; + else + y = x + toint - toint; + if (y == 0) + return 0*x; + return y; +} +#endif diff --git a/Ubiquitous/XiZi/lib/musllib/src/stdio/__fdopen.c b/Ubiquitous/XiZi/lib/musllib/src/stdio/__fdopen.c index 23f87a95d..d7b630dba 100644 --- a/Ubiquitous/XiZi/lib/musllib/src/stdio/__fdopen.c +++ b/Ubiquitous/XiZi/lib/musllib/src/stdio/__fdopen.c @@ -13,7 +13,7 @@ int ioctl(int fd, int req, ...) FILE *__fdopen(int fd, const char *mode) { - FILE *f; + FILE* f; struct winsize wsz; pthread_mutex_t filelockinit = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; diff --git a/Ubiquitous/XiZi/lib/musllib/src/stdio/ofl_add.c b/Ubiquitous/XiZi/lib/musllib/src/stdio/ofl_add.c index d7de9f15a..a5c339164 100644 --- a/Ubiquitous/XiZi/lib/musllib/src/stdio/ofl_add.c +++ b/Ubiquitous/XiZi/lib/musllib/src/stdio/ofl_add.c @@ -2,7 +2,7 @@ FILE *__ofl_add(FILE *f) { - FILE **head = __ofl_lock(); + FILE** head = __ofl_lock(); f->next = *head; if (*head) (*head)->prev = f; *head = f; diff --git a/Ubiquitous/XiZi/link.mk b/Ubiquitous/XiZi/link.mk index f0486397d..4a9106b8a 100644 --- a/Ubiquitous/XiZi/link.mk +++ b/Ubiquitous/XiZi/link.mk @@ -3,7 +3,7 @@ OBJS := $(shell cat make.obj) $(TARGET): $(OBJS) @echo ------------------------------------------------ @echo link $(TARGET) - @$(CROSS_COMPILE)g++ -o $@ $($(LINK_FLAGS)) $(OBJS) $(LINK_MUSLLIB) $(LINK_LWIP) $(LIBCC) + @$(CROSS_COMPILE)g++ -o $@ $($(LINK_FLAGS)) $(OBJS) $(LINK_LWIP) $(LINK_MUSLLIB) $(LIBCC) @echo ------------------------------------------------ @$(CROSS_COMPILE)objcopy -O binary $@ XiZi-$(BOARD)$(COMPILE_TYPE).bin @$(CROSS_COMPILE)size $@ \ No newline at end of file diff --git a/Ubiquitous/XiZi/path_kernel.mk b/Ubiquitous/XiZi/path_kernel.mk index e010e3a13..f0c458539 100755 --- a/Ubiquitous/XiZi/path_kernel.mk +++ b/Ubiquitous/XiZi/path_kernel.mk @@ -1,8 +1,26 @@ -export KERNELPATHS:= +export KERNELPATHS:= -I$(BSP_ROOT) + +ifeq ($(CONFIG_LIB_MUSLLIB), y) +KERNELPATHS += -I$(KERNEL_ROOT)/lib/musllib/src/include \ + -I$(KERNEL_ROOT)/lib/musllib/include \ + -I$(KERNEL_ROOT)/lib/musllib/src/internal # +# chose arch for musl +ifeq ($(ARCH), arm) +KERNELPATHS += -I$(KERNEL_ROOT)/lib/musllib/arch/arm +endif +ifeq ($(ARCH), risc-v) +KERNELPATHS += -I$(KERNEL_ROOT)/lib/musllib/arch/riscv64 +endif + +endif # end of musl include path + +ifeq ($(CONFIG_LIB_NEWLIB),y) +KERNELPATHS += -I$(KERNEL_ROOT)/lib/newlib/include # +endif ifeq ($(BSP_ROOT),$(KERNEL_ROOT)/board/xidatong-arm32) -KERNELPATHS :=-I$(BSP_ROOT) \ +KERNELPATHS += \ -I$(KERNEL_ROOT)/arch/arm/cortex-m7 \ -I$(BSP_ROOT)/third_party_driver \ -I$(BSP_ROOT)/third_party_driver/include \ @@ -24,9 +42,9 @@ KERNELPATHS :=-I$(BSP_ROOT) \ -I$(KERNEL_ROOT)/resources/include ifeq ($(CONFIG_RESOURCES_LWIP),y) -KERNELPATHS +=-I$(BSP_ROOT) \ - -I$(KERNEL_ROOT)/resources/ethernet/LwIP \ +KERNELPATHS += \ -I$(KERNEL_ROOT)/resources/ethernet/LwIP/include \ + -I$(KERNEL_ROOT)/resources/ethernet/LwIP \ -I$(KERNEL_ROOT)/resources/ethernet/LwIP/include/compat \ -I$(KERNEL_ROOT)/resources/ethernet/LwIP/include/lwip \ -I$(KERNEL_ROOT)/resources/ethernet/LwIP/include/netif \ @@ -37,8 +55,9 @@ KERNELPATHS +=-I$(BSP_ROOT) \ endif endif + ifeq ($(BSP_ROOT),$(KERNEL_ROOT)/board/xidatong-riscv64) -KERNELPATHS :=-I$(BSP_ROOT) \ +KERNELPATHS += \ -I$(BSP_ROOT)/include \ -I$(BSP_ROOT)/third_party_driver/include \ -I$(BSP_ROOT)/third_party_driver \ @@ -49,7 +68,7 @@ KERNELPATHS :=-I$(BSP_ROOT) \ endif ifeq ($(BSP_ROOT),$(KERNEL_ROOT)/board/kd233) -KERNELPATHS :=-I$(BSP_ROOT) \ +KERNELPATHS += \ -I$(BSP_ROOT)/include \ -I$(BSP_ROOT)/third_party_driver/include \ -I$(BSP_ROOT)/third_party_driver \ @@ -60,7 +79,7 @@ KERNELPATHS :=-I$(BSP_ROOT) \ endif ifeq ($(BSP_ROOT),$(KERNEL_ROOT)/board/maix-go) -KERNELPATHS :=-I$(BSP_ROOT) \ +KERNELPATHS += \ -I$(BSP_ROOT)/include \ -I$(BSP_ROOT)/third_party_driver/include \ -I$(BSP_ROOT)/third_party_driver \ @@ -71,7 +90,7 @@ KERNELPATHS :=-I$(BSP_ROOT) \ endif ifeq ($(BSP_ROOT),$(KERNEL_ROOT)/board/stm32f407-st-discovery) -KERNELPATHS :=-I$(BSP_ROOT) \ +KERNELPATHS += \ -I$(KERNEL_ROOT)/arch/arm/cortex-m4 \ -I$(BSP_ROOT)/third_party_driver \ -I$(BSP_ROOT)/third_party_driver/sdio \ @@ -81,7 +100,7 @@ KERNELPATHS :=-I$(BSP_ROOT) \ -I$(KERNEL_ROOT)/include \ ifeq ($(CONFIG_RESOURCES_LWIP),y) -KERNELPATHS :=-I$(BSP_ROOT) \ +KERNELPATHS += \ -I$(KERNEL_ROOT)/resources/ethernet/LwIP \ -I$(KERNEL_ROOT)/resources/ethernet/LwIP/include \ -I$(KERNEL_ROOT)/resources/ethernet/LwIP/include/compat \ @@ -95,7 +114,7 @@ endif endif ifeq ($(BSP_ROOT),$(KERNEL_ROOT)/board/aiit-arm32-board) -KERNELPATHS :=-I$(BSP_ROOT) \ +KERNELPATHS += \ -I$(KERNEL_ROOT)/arch/arm/cortex-m4 \ -I$(BSP_ROOT)/third_party_driver \ -I$(BSP_ROOT)/third_party_driver \ @@ -109,7 +128,7 @@ KERNELPATHS :=-I$(BSP_ROOT) \ endif ifeq ($(BSP_ROOT),$(KERNEL_ROOT)/board/stm32f407zgt6) -KERNELPATHS :=-I$(BSP_ROOT) \ +KERNELPATHS += \ -I$(KERNEL_ROOT)/arch/arm/cortex-m4 \ -I$(BSP_ROOT)/third_party_driver \ -I$(BSP_ROOT)/third_party_driver/sdio\ @@ -121,14 +140,14 @@ KERNELPATHS :=-I$(BSP_ROOT) \ endif ifeq ($(BSP_ROOT),$(KERNEL_ROOT)/board/gapuino) -KERNELPATHS :=-I$(BSP_ROOT) \ +KERNELPATHS += \ -I$(BSP_ROOT)/third_party_driver \ -I$(BSP_ROOT)/third_party_driver/include \ -I$(KERNEL_ROOT)/include # endif ifeq ($(BSP_ROOT),$(KERNEL_ROOT)/board/gd32vf103-rvstar) -KERNELPATHS :=-I$(BSP_ROOT) \ +KERNELPATHS += \ -I$(KERNEL_ROOT)/arch/risc-v/gd32vf103-rvstar \ -I$(BSP_ROOT)/include \ -I$(BSP_ROOT)/third_party_driver \ @@ -137,7 +156,7 @@ KERNELPATHS :=-I$(BSP_ROOT) \ endif ifeq ($(BSP_ROOT),$(KERNEL_ROOT)/board/rv32m1-vega) -KERNELPATHS :=-I$(BSP_ROOT) \ +KERNELPATHS += \ -I$(KERNEL_ROOT)/arch/risc-v/rv32m1-vega \ -I$(BSP_ROOT)/include \ -I$(BSP_ROOT)/third_party_driver \ @@ -146,7 +165,7 @@ KERNELPATHS :=-I$(BSP_ROOT) \ endif ifeq ($(BSP_ROOT),$(KERNEL_ROOT)/board/hifive1-rev-B) -KERNELPATHS :=-I$(BSP_ROOT) \ +KERNELPATHS += \ -I$(BSP_ROOT)/third_party_driver \ -I$(BSP_ROOT)/third_party_driver/include \ -I$(BSP_ROOT)/third_party_driver/include/sifive \ @@ -157,7 +176,7 @@ KERNELPATHS :=-I$(BSP_ROOT) \ endif ifeq ($(BSP_ROOT),$(KERNEL_ROOT)/board/hifive1-emulator) -KERNELPATHS :=-I$(BSP_ROOT) \ +KERNELPATHS += \ -I$(BSP_ROOT)/third_party_driver \ -I$(BSP_ROOT)/third_party_driver/include \ -I$(BSP_ROOT)/third_party_driver/include/sifive \ @@ -168,7 +187,7 @@ KERNELPATHS :=-I$(BSP_ROOT) \ endif ifeq ($(BSP_ROOT),$(KERNEL_ROOT)/board/k210-emulator) -KERNELPATHS :=-I$(BSP_ROOT) \ +KERNELPATHS += \ -I$(BSP_ROOT)/third_party_driver \ -I$(BSP_ROOT)/include \ -I$(BSP_ROOT)/third_party_driver/include \ @@ -181,7 +200,7 @@ KERNELPATHS :=-I$(BSP_ROOT) \ endif ifeq ($(BSP_ROOT),$(KERNEL_ROOT)/board/aiit-riscv64-board) -KERNELPATHS :=-I$(BSP_ROOT) \ +KERNELPATHS += \ -I$(BSP_ROOT)/third_party_driver \ -I$(BSP_ROOT)/include \ -I$(BSP_ROOT)/third_party_driver/include \ @@ -194,7 +213,7 @@ KERNELPATHS :=-I$(BSP_ROOT) \ endif ifeq ($(BSP_ROOT),$(KERNEL_ROOT)/board/cortex-m0-emulator) -KERNELPATHS :=-I$(BSP_ROOT) \ +KERNELPATHS += \ -I$(KERNEL_ROOT)/arch/arm/cortex-m0 \ -I$(BSP_ROOT)/third_party_driver \ -I$(BSP_ROOT)/third_party_driver/Libraries/driverlib \ @@ -205,7 +224,7 @@ KERNELPATHS :=-I$(BSP_ROOT) \ endif ifeq ($(BSP_ROOT),$(KERNEL_ROOT)/board/cortex-m3-emulator) -KERNELPATHS :=-I$(BSP_ROOT) \ +KERNELPATHS += \ -I$(KERNEL_ROOT)/arch/arm/cortex-m3 \ -I$(BSP_ROOT)/third_party_driver \ -I$(BSP_ROOT)/third_party_driver/Libraries/driverlib \ @@ -216,7 +235,7 @@ KERNELPATHS :=-I$(BSP_ROOT) \ endif ifeq ($(BSP_ROOT),$(KERNEL_ROOT)/board/cortex-m4-emulator) -KERNELPATHS :=-I$(BSP_ROOT) \ +KERNELPATHS += \ -I$(KERNEL_ROOT)/arch/arm/cortex-m4 \ -I$(BSP_ROOT)/third_party_driver \ -I$(BSP_ROOT)/third_party_driver/sdio\ @@ -228,7 +247,7 @@ KERNELPATHS :=-I$(BSP_ROOT) \ endif ifeq ($(BSP_ROOT),$(KERNEL_ROOT)/board/ok1052-c) -KERNELPATHS :=-I$(BSP_ROOT) \ +KERNELPATHS += \ -I$(KERNEL_ROOT)/arch/arm/cortex-m7 \ -I$(BSP_ROOT)/third_party_driver \ -I$(BSP_ROOT)/third_party_driver/include \ @@ -250,7 +269,7 @@ KERNELPATHS :=-I$(BSP_ROOT) \ -I$(KERNEL_ROOT)/resources/include ifeq ($(CONFIG_RESOURCES_LWIP),y) -KERNELPATHS +=-I$(BSP_ROOT) \ +KERNELPATHS += \ -I$(KERNEL_ROOT)/resources/ethernet/LwIP \ -I$(KERNEL_ROOT)/resources/ethernet/LwIP/include \ -I$(KERNEL_ROOT)/resources/ethernet/LwIP/include/compat \ @@ -264,7 +283,7 @@ endif endif ifeq ($(BSP_ROOT),$(KERNEL_ROOT)/board/stm32f103-nano) -KERNELPATHS :=-I$(BSP_ROOT) \ +KERNELPATHS += \ -I$(KERNEL_ROOT)/arch/arm/cortex-m3 \ -I$(BSP_ROOT)/third_party_driver/include \ -I$(BSP_ROOT)/third_party_driver/libraries/STM32F1xx_HAL/inc \ @@ -274,7 +293,7 @@ KERNELPATHS :=-I$(BSP_ROOT) \ endif ifeq ($(BSP_ROOT),$(KERNEL_ROOT)/board/nuvoton-m2354) -KERNELPATHS :=-I$(BSP_ROOT) \ +KERNELPATHS += \ -I$(KERNEL_ROOT)/arch/arm/cortex-m23 \ -I$(BSP_ROOT)/third_party_driver/include \ -I$(BSP_ROOT)/third_party_driver/include/Drivers \ @@ -290,7 +309,7 @@ KERNELPATHS += -I$(KERNEL_ROOT)/arch \ -I$(KERNEL_ROOT)/arch/risc-v/shared/kernel_service # ifeq ($(CONFIG_FS_VFS), y) -KERNELPATHS +=-I$(KERNEL_ROOT)/fs/devfs \ +KERNELPATHS += -I$(KERNEL_ROOT)/fs/devfs \ -I$(KERNEL_ROOT)/fs/fatfs \ -I$(KERNEL_ROOT)/fs/shared/include # endif @@ -373,17 +392,6 @@ KERNELPATHS +=-I$(KERNEL_ROOT)/tool/shell/letter-shell \ -I$(KERNEL_ROOT)/tool/shell/letter-shell/file_ext # endif - -ifeq ($(CONFIG_LIB_NEWLIB),y) -KERNELPATHS += -I$(KERNEL_ROOT)/lib/newlib/include # -endif - -ifeq ($(CONFIG_LIB_MUSLLIB), y) -KERNELPATHS += -I$(KERNEL_ROOT)/lib/musllib/src/include # -KERNELPATHS += -I$(KERNEL_ROOT)/lib/musllib/include # -KERNELPATHS += -I$(KERNEL_ROOT)/lib/musllib/src/internal # -endif - ifeq ($(CONFIG_FS_LWEXT4),y) KERNELPATHS += -I$(KERNEL_ROOT)/fs/lwext4/lwext4_submodule/blockdev/xiuos # KERNELPATHS += -I$(KERNEL_ROOT)/fs/lwext4/lwext4_submodule/include # diff --git a/Ubiquitous/XiZi/resources/Makefile b/Ubiquitous/XiZi/resources/Makefile index 2c029db7a..3c10a79f9 100644 --- a/Ubiquitous/XiZi/resources/Makefile +++ b/Ubiquitous/XiZi/resources/Makefile @@ -50,7 +50,7 @@ ifeq ($(CONFIG_RESOURCES_USB),y) endif ifeq ($(CONFIG_RESOURCES_LWIP),y) - # SRC_DIR += ethernet + SRC_DIR += ethernet endif ifeq ($(CONFIG_RESOURCES_WDT),y) diff --git a/Ubiquitous/XiZi/resources/ethernet/LwIP/include/lwip/debug.h b/Ubiquitous/XiZi/resources/ethernet/LwIP/include/lwip/debug.h index baa6a4090..0711078cd 100644 --- a/Ubiquitous/XiZi/resources/ethernet/LwIP/include/lwip/debug.h +++ b/Ubiquitous/XiZi/resources/ethernet/LwIP/include/lwip/debug.h @@ -38,7 +38,7 @@ #define LWIP_HDR_DEBUG_H #include "lwip/arch.h" -#include "lwip/opt.h" + /** * @defgroup debugging_levels LWIP_DBG_MIN_LEVEL and LWIP_DBG_TYPES_ON values diff --git a/Ubiquitous/XiZi/resources/ethernet/LwIP/include/lwip/errno.h b/Ubiquitous/XiZi/resources/ethernet/LwIP/include/lwip/errno.h index 2628f08fa..07afe9389 100644 --- a/Ubiquitous/XiZi/resources/ethernet/LwIP/include/lwip/errno.h +++ b/Ubiquitous/XiZi/resources/ethernet/LwIP/include/lwip/errno.h @@ -38,6 +38,7 @@ #define LWIP_HDR_ERRNO_H #include "lwip/opt.h" +#include #ifdef __cplusplus extern "C" { diff --git a/Ubiquitous/XiZi/resources/ethernet/LwIP/include/lwip/inet.h b/Ubiquitous/XiZi/resources/ethernet/LwIP/include/lwip/inet.h index 2982a0f4b..1ec608fd0 100644 --- a/Ubiquitous/XiZi/resources/ethernet/LwIP/include/lwip/inet.h +++ b/Ubiquitous/XiZi/resources/ethernet/LwIP/include/lwip/inet.h @@ -43,7 +43,7 @@ #include "lwip/opt.h" #include "lwip/def.h" #include "lwip/ip_addr.h" -#include "lwip/ip6_addr.h" +// #include "lwip/ip6_addr.h" #ifdef __cplusplus extern "C" { diff --git a/Ubiquitous/XiZi/resources/ethernet/LwIP/include/lwip/ip6_addr.h b/Ubiquitous/XiZi/resources/ethernet/LwIP/include/lwip/ip6_addr.h index 29c2a34d9..47a7706d5 100644 --- a/Ubiquitous/XiZi/resources/ethernet/LwIP/include/lwip/ip6_addr.h +++ b/Ubiquitous/XiZi/resources/ethernet/LwIP/include/lwip/ip6_addr.h @@ -43,7 +43,7 @@ #define LWIP_HDR_IP6_ADDR_H #include "lwip/opt.h" -#include "def.h" +#include "lwip/def.h" #if LWIP_IPV6 /* don't build if not configured for use in lwipopts.h */ diff --git a/Ubiquitous/XiZi/resources/ethernet/LwIP/include/lwip/ip_addr.h b/Ubiquitous/XiZi/resources/ethernet/LwIP/include/lwip/ip_addr.h index 2f977709d..81958631b 100644 --- a/Ubiquitous/XiZi/resources/ethernet/LwIP/include/lwip/ip_addr.h +++ b/Ubiquitous/XiZi/resources/ethernet/LwIP/include/lwip/ip_addr.h @@ -37,8 +37,8 @@ #ifndef LWIP_HDR_IP_ADDR_H #define LWIP_HDR_IP_ADDR_H -#include "lwip/opt.h" -#include "lwip/def.h" +// #include "lwip/opt.h" +// #include "lwip/def.h" #include "lwip/ip4_addr.h" #include "lwip/ip6_addr.h" diff --git a/Ubiquitous/XiZi/resources/ethernet/LwIP/include/lwip/netif.h b/Ubiquitous/XiZi/resources/ethernet/LwIP/include/lwip/netif.h index 911196ab3..0ea4774c0 100644 --- a/Ubiquitous/XiZi/resources/ethernet/LwIP/include/lwip/netif.h +++ b/Ubiquitous/XiZi/resources/ethernet/LwIP/include/lwip/netif.h @@ -37,11 +37,11 @@ #ifndef LWIP_HDR_NETIF_H #define LWIP_HDR_NETIF_H -#include "lwip/opt.h" +// #include "lwip/opt.h" #define ENABLE_LOOPBACK (LWIP_NETIF_LOOPBACK || LWIP_HAVE_LOOPIF) -#include "lwip/err.h" +// #include "lwip/err.h" #include "lwip/ip_addr.h" diff --git a/Ubiquitous/XiZi/resources/ethernet/LwIP/include/lwip/pbuf.h b/Ubiquitous/XiZi/resources/ethernet/LwIP/include/lwip/pbuf.h index 82902a4e9..991e78b58 100644 --- a/Ubiquitous/XiZi/resources/ethernet/LwIP/include/lwip/pbuf.h +++ b/Ubiquitous/XiZi/resources/ethernet/LwIP/include/lwip/pbuf.h @@ -38,7 +38,7 @@ #ifndef LWIP_HDR_PBUF_H #define LWIP_HDR_PBUF_H -#include "lwip/opt.h" +// #include "lwip/opt.h" #include "lwip/err.h" #ifdef __cplusplus diff --git a/Ubiquitous/XiZi/resources/ethernet/LwIP/include/lwip/priv/sockets_priv.h b/Ubiquitous/XiZi/resources/ethernet/LwIP/include/lwip/priv/sockets_priv.h index 8b5fba005..fab2d6490 100644 --- a/Ubiquitous/XiZi/resources/ethernet/LwIP/include/lwip/priv/sockets_priv.h +++ b/Ubiquitous/XiZi/resources/ethernet/LwIP/include/lwip/priv/sockets_priv.h @@ -37,11 +37,10 @@ #ifndef LWIP_HDR_SOCKETS_PRIV_H #define LWIP_HDR_SOCKETS_PRIV_H -#include "lwip/opt.h" +// #include "lwip/opt.h" #if LWIP_SOCKET /* don't build if not configured for use in lwipopts.h */ -#include "lwip/err.h" // #include "lwip/errno.h" #include "lwip/sockets.h" #include "lwip/sys.h" diff --git a/Ubiquitous/XiZi/resources/ethernet/LwIP/include/lwip/sockets.h b/Ubiquitous/XiZi/resources/ethernet/LwIP/include/lwip/sockets.h index 676fe3093..2edab7be8 100644 --- a/Ubiquitous/XiZi/resources/ethernet/LwIP/include/lwip/sockets.h +++ b/Ubiquitous/XiZi/resources/ethernet/LwIP/include/lwip/sockets.h @@ -45,7 +45,7 @@ #include "lwip/ip_addr.h" #include "lwip/netif.h" -#include "lwip/err.h" +// #include "lwip/err.h" #include "lwip/inet.h" #include "lwip/errno.h" diff --git a/Ubiquitous/XiZi/resources/ethernet/LwIP/liblwip.a b/Ubiquitous/XiZi/resources/ethernet/LwIP/liblwip.a deleted file mode 100644 index d188d3c11..000000000 Binary files a/Ubiquitous/XiZi/resources/ethernet/LwIP/liblwip.a and /dev/null differ diff --git a/Ubiquitous/XiZi/resources/ethernet/Makefile b/Ubiquitous/XiZi/resources/ethernet/Makefile index 6dfd87380..7de558d34 100644 --- a/Ubiquitous/XiZi/resources/ethernet/Makefile +++ b/Ubiquitous/XiZi/resources/ethernet/Makefile @@ -1,4 +1,4 @@ -SRC_DIR += LwIP cmd_lwip -LWIP_DIR := LwIP +SRC_DIR += cmd_lwip +LWIP_DIR := LwIP include $(KERNEL_ROOT)/compiler.mk diff --git a/Ubiquitous/XiZi/resources/ethernet/cmd_lwip/lwip_ping_demo.c b/Ubiquitous/XiZi/resources/ethernet/cmd_lwip/lwip_ping_demo.c index dfb6c9980..c306ceb7d 100755 --- a/Ubiquitous/XiZi/resources/ethernet/cmd_lwip/lwip_ping_demo.c +++ b/Ubiquitous/XiZi/resources/ethernet/cmd_lwip/lwip_ping_demo.c @@ -35,9 +35,9 @@ #include #include "connect_ethernet.h" -char test_ip_addr[] = {192, 168, 250, 253}; +char test_ip_addr[] = {192, 168, 145, 220}; char test_net_mask[] = {255, 255, 255, 0}; -char test_gw_addr[] = {192, 168, 250, 252}; +char test_gw_addr[] = {192, 168, 145, 1}; ip4_addr_t ping_addr; /******************************************************************************/