diff --git a/Ubiquitous/XiZi_AIoT/services/app/Makefile b/Ubiquitous/XiZi_AIoT/services/app/Makefile index 9c10dc508..76ed8500e 100644 --- a/Ubiquitous/XiZi_AIoT/services/app/Makefile +++ b/Ubiquitous/XiZi_AIoT/services/app/Makefile @@ -89,7 +89,7 @@ test_priority: test_priority.o libserial.o printf.o usyscall.o arch_usyscall.o l @${ld} ${user_ldflags} -e main -o $@ $^ ${board_specs} @${objdump} -S $@ > $@.asm -test_net:test_fs.o lwip_service.o libipc.o session.o libserial.o printf.o usyscall.o arch_usyscall.o libmem.o +test_net: test_net.o lwip_service.o libipc.o session.o libserial.o printf.o usyscall.o arch_usyscall.o libmem.o @${ld} ${user_ldflags} -e main -o $@ $^ ${board_specs} @${objdump} -S $@ > $@.asm diff --git a/Ubiquitous/XiZi_AIoT/services/app/test_net.c b/Ubiquitous/XiZi_AIoT/services/app/test_net.c index bf23bacf4..210bb35d5 100644 --- a/Ubiquitous/XiZi_AIoT/services/app/test_net.c +++ b/Ubiquitous/XiZi_AIoT/services/app/test_net.c @@ -12,10 +12,6 @@ // test_net: Test the lwip network stack -#include -#include -#include - #include "libserial.h" #include "lwip_service.h" #include "usyscall.h" @@ -32,7 +28,7 @@ int main(int argc, char* argv[]) char lwip_gwaddr[4] = { 192, 168, 130, 1 }; LWIP_init(&sess, lwip_ipaddr, lwip_netmask, lwip_ipaddr); - free_session(&session); + free_session(&sess); exit(0); return 0; diff --git a/Ubiquitous/XiZi_AIoT/services/fs/fs_server/include/block_io.h b/Ubiquitous/XiZi_AIoT/services/fs/fs_server/include/block_io.h index 1bf3966bb..2fe14d8af 100644 --- a/Ubiquitous/XiZi_AIoT/services/fs/fs_server/include/block_io.h +++ b/Ubiquitous/XiZi_AIoT/services/fs/fs_server/include/block_io.h @@ -18,13 +18,13 @@ // Block size #define BLOCK_SIZE 512 -#define NR_BIT_BLOCKS 4 +#define NR_BIT_BLOCKS 8 // bits size #define BITS 8 // Bitmap size of one block -#define BITMAP_SIZE (BLOCK_SIZE * BITS * NR_BIT_BLOCKS) +#define BITMAP_SIZE (BLOCK_SIZE * BITS) // Inode size of one block #define INODE_SIZE (BLOCK_SIZE / sizeof(struct Inode)) diff --git a/Ubiquitous/XiZi_AIoT/services/net/libnet/lwip_service.c b/Ubiquitous/XiZi_AIoT/services/net/libnet/lwip_service.c index cb251fd6b..9b525c889 100644 --- a/Ubiquitous/XiZi_AIoT/services/net/libnet/lwip_service.c +++ b/Ubiquitous/XiZi_AIoT/services/net/libnet/lwip_service.c @@ -17,3 +17,4 @@ void LWIP_init(struct Session* session, char* ip, char* mask, char* gw){ IPC_CALL(Ipc_LWIP_init)(session, ip, mask, gw); } + \ No newline at end of file diff --git a/Ubiquitous/XiZi_AIoT/services/tools/mkfs/mkfs.c b/Ubiquitous/XiZi_AIoT/services/tools/mkfs/mkfs.c index 027d9dd5c..d76cc62f0 100755 --- a/Ubiquitous/XiZi_AIoT/services/tools/mkfs/mkfs.c +++ b/Ubiquitous/XiZi_AIoT/services/tools/mkfs/mkfs.c @@ -263,8 +263,8 @@ void balloc(int used) uchar buf[BLOCK_SIZE]; int i; printf("balloc: first %d blocks have been allocated\n", used); - bzero(buf, BLOCK_SIZE); for (int bmsec = 0; bmsec < bitblocks; bmsec++) { + bzero(buf, BLOCK_SIZE); for (i = 0; i < ((used > NR_BIT_PER_BYTE * BLOCK_SIZE) ? NR_BIT_PER_BYTE * BLOCK_SIZE : used); i++) { buf[i / NR_BIT_PER_BYTE] = buf[i / NR_BIT_PER_BYTE] | (0x1 << (i % NR_BIT_PER_BYTE)); } diff --git a/Ubiquitous/XiZi_AIoT/services/tools/mkfs/mkfs.h b/Ubiquitous/XiZi_AIoT/services/tools/mkfs/mkfs.h index 17fa8adab..e44e96798 100755 --- a/Ubiquitous/XiZi_AIoT/services/tools/mkfs/mkfs.h +++ b/Ubiquitous/XiZi_AIoT/services/tools/mkfs/mkfs.h @@ -49,7 +49,7 @@ Modification: #define ROOT_INUM 1 // root inode number #define BLOCK_SIZE 512 // block size #define NR_BIT_PER_BYTE 8 -#define NR_BIT_BLOCKS 4 +#define NR_BIT_BLOCKS 8 #define nr_blocks_total (BLOCK_SIZE * NR_BIT_PER_BYTE * NR_BIT_BLOCKS) // total number of blocks (including used blocks and free blocks) #define nr_inodes 200 // total number of inodes