forked from yystopf/xiuos
feat add lwext4 submodule for XiZi
This commit is contained in:
parent
0c0313e0f7
commit
137f2493b7
|
@ -13,3 +13,6 @@
|
|||
[submodule "Ubiquitous/Nuttx/nuttx"]
|
||||
path = Ubiquitous/Nuttx/nuttx
|
||||
url = https://code.gitlink.org.cn/wgzAIIT/incubator-nuttx.git
|
||||
[submodule "Ubiquitous/XiZi/fs/lwext4/lwext4_submodule"]
|
||||
path = Ubiquitous/XiZi/fs/lwext4/lwext4_submodule
|
||||
url = https://gitlink.org.cn/xuos/lwext4_filesystem_support_XiUOS.git
|
||||
|
|
|
@ -261,6 +261,19 @@ static uint32 SdioWrite(void *dev, struct BusBlockWriteParam *write_param)
|
|||
return write_param->size;
|
||||
}
|
||||
|
||||
static int SdioControl(struct HardwareDev *dev, struct HalDevBlockParam *block_param)
|
||||
{
|
||||
NULL_PARAM_CHECK(dev);
|
||||
|
||||
if (OPER_BLK_GETGEOME == block_param->cmd) {
|
||||
block_param->dev_block.size_perbank = g_sd.blockSize;
|
||||
block_param->dev_block.block_size = g_sd.blockSize;
|
||||
block_param->dev_block.bank_num = g_sd.blockCount;
|
||||
}
|
||||
|
||||
return EOK;
|
||||
}
|
||||
|
||||
static struct SdioDevDone dev_done =
|
||||
{
|
||||
SdioOpen,
|
||||
|
@ -352,6 +365,7 @@ int Imxrt1052HwSdioInit(void)
|
|||
}
|
||||
|
||||
sdio_dev.dev_done = &dev_done;
|
||||
sdio_dev.haldev.dev_block_control = SdioControl;
|
||||
ret = SdioDeviceRegister(&sdio_dev, SDIO_DEVICE_NAME);
|
||||
if (ret != EOK) {
|
||||
KPrintf("Sdio device register error %d\n", ret);
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
*/
|
||||
|
||||
/*************************************************
|
||||
File name: usb_misc.h
|
||||
Description: modify usb_echo to KPrintf
|
||||
File name: host_msd_command.c
|
||||
Description: modify usb msd command test function
|
||||
Others: take SDK_2.6.1_MIMXRT1052xxxxB/boards/evkbimxrt1050/usb_examples/usb_host_msd_command for references
|
||||
History:
|
||||
1. Date: 2022-02-10
|
||||
|
|
|
@ -261,6 +261,19 @@ static uint32 SdioWrite(void *dev, struct BusBlockWriteParam *write_param)
|
|||
return write_param->size;
|
||||
}
|
||||
|
||||
static int SdioControl(struct HardwareDev *dev, struct HalDevBlockParam *block_param)
|
||||
{
|
||||
NULL_PARAM_CHECK(dev);
|
||||
|
||||
if (OPER_BLK_GETGEOME == block_param->cmd) {
|
||||
block_param->dev_block.size_perbank = g_sd.blockSize;
|
||||
block_param->dev_block.block_size = g_sd.blockSize;
|
||||
block_param->dev_block.bank_num = g_sd.blockCount;
|
||||
}
|
||||
|
||||
return EOK;
|
||||
}
|
||||
|
||||
static struct SdioDevDone dev_done =
|
||||
{
|
||||
SdioOpen,
|
||||
|
@ -352,6 +365,7 @@ int Imxrt1052HwSdioInit(void)
|
|||
}
|
||||
|
||||
sdio_dev.dev_done = &dev_done;
|
||||
sdio_dev.haldev.dev_block_control = SdioControl;
|
||||
ret = SdioDeviceRegister(&sdio_dev, SDIO_DEVICE_NAME);
|
||||
if (ret != EOK) {
|
||||
KPrintf("Sdio device register error %d\n", ret);
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
*/
|
||||
|
||||
/*************************************************
|
||||
File name: usb_misc.h
|
||||
Description: modify usb_echo to KPrintf
|
||||
File name: host_msd_command.c
|
||||
Description: modify usb msd command test function
|
||||
Others: take SDK_2.6.1_MIMXRT1052xxxxB/boards/evkbimxrt1050/usb_examples/usb_host_msd_command for references
|
||||
History:
|
||||
1. Date: 2022-02-10
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
config CONFIG_USE_DEFAULT_CFG
|
||||
int
|
||||
default 1
|
||||
|
||||
config CONFIG_HAVE_OWN_OFLAGS
|
||||
int
|
||||
default 0
|
|
@ -1,4 +1,3 @@
|
|||
SRC_DIR := lwext4_submodule
|
||||
|
||||
|
||||
|
||||
include $(KERNEL_ROOT)/compiler.mk
|
||||
include $(KERNEL_ROOT)/compiler.mk
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 1eba3cfeda305e5c735827805e90f5f1c8043394
|
|
@ -24,6 +24,9 @@ enum FilesystemType
|
|||
FSTYPE_FATFS = 0,
|
||||
FSTYPE_IOTDEVICEFILE,
|
||||
FSTYPE_CH376,
|
||||
#ifdef FS_LWEXT4
|
||||
FSTYPE_LWEXT4,
|
||||
#endif
|
||||
FSTYPE_END,
|
||||
};
|
||||
|
||||
|
|
|
@ -354,6 +354,12 @@ ifeq ($(CONFIG_LIB_NEWLIB),y)
|
|||
KERNELPATHS += -I$(KERNEL_ROOT)/lib/newlib/include #
|
||||
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 #
|
||||
KERNELPATHS += -I$(KERNEL_ROOT)/fs/lwext4/lwext4_submodule/include/misc
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(ARCH), risc-v)
|
||||
KERNELPATHS +=-I$(KERNEL_ROOT)/arch/risc-v/shared
|
||||
|
|
Loading…
Reference in New Issue