modify makefile eventually again

This commit is contained in:
lr 2024-05-17 15:23:08 +08:00
parent 18537fc922
commit 514b9973b6
5 changed files with 45 additions and 4 deletions

View File

@ -0,0 +1,39 @@
/*
* Copyright (c) 2020 AIIT XUOS Lab
* XiUOS is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
* See the Mulan PSL v2 for more details.
*/
// test_net: Test the lwip network stack
#include <assert.h>
#include <stdbool.h>
#include <string.h>
#include "libserial.h"
#include "lwip_service.h"
#include "usyscall.h"
int main(int argc, char* argv[])
{
printf("lwip network stack test \n");
struct Session sess;
connect_session(&sess, "LWIPServer", 4096);
char lwip_ipaddr[4] = { 192, 168, 130, 77 };
char lwip_netmask[4] = { 255, 255, 254, 0 };
char lwip_gwaddr[4] = { 192, 168, 130, 1 };
LWIP_init(&sess, lwip_ipaddr, lwip_netmask, lwip_ipaddr);
free_session(&session);
exit(0);
return 0;
}

View File

@ -18,7 +18,7 @@
// Block size
#define BLOCK_SIZE 512
#define NR_BIT_BLOCKS 4
#define NR_BIT_BLOCKS 2
// bits size
#define BITS 8

View File

@ -56,8 +56,10 @@ libipc = $(KERNEL_ROOT)/services/app/libipc.o
lwip: COMPILER lwip_server.o | bin
@${ld} ${user_ldflags} -e main -o $@ ${api} ${core} ${ipv4} ${netif} lwip_service.o lwip_server.o \
${board_specs} ${libserial} ${printf} ${libmem} ${usyscall} ${arch_usyscall} ${session} ${libipc}
@${objdump} -S $@ > $@.asm
@mv *.o bin
@mv $@ $(KERNEL_ROOT)/services/app
@mv $@.asm $(KERNEL_ROOT)/services/app
bin:
@mkdir -p bin

View File

@ -1,7 +1,7 @@
ifeq ($(BOARD), imx6q-sabrelite)
toolchain ?= arm-none-eabi-
user_ldflags = --specs=nosys.specs -Wl,-Map=user.map,-cref
cflags = -std=c11 -march=armv7-a -mtune=cortex-a9 -nostdlib -ffreestanding -nodefaultlibs -mfloat-abi=soft -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie
user_ldflags = --specs=nosys.specs -Wl,-Map=user.map,-cref -N
cflags = -std=c11 -march=armv7-a -mtune=cortex-a9 -nostdlib -ffreestanding -nodefaultlibs -mfloat-abi=soft -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -Waddress -ggdb -Wno-unused -Werror -fno-omit-frame-pointer -fno-stack-protector -fno-pie
endif
ifeq ($(BOARD), zynq7000-zc702)
toolchain ?= arm-xilinx-eabi-

View File

@ -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 2
#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