feat add lwext4 submodule for XiZi
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -13,3 +13,6 @@
|
|||||||
[submodule "Ubiquitous/Nuttx/nuttx"]
|
[submodule "Ubiquitous/Nuttx/nuttx"]
|
||||||
path = Ubiquitous/Nuttx/nuttx
|
path = Ubiquitous/Nuttx/nuttx
|
||||||
url = https://code.gitlink.org.cn/wgzAIIT/incubator-nuttx.git
|
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;
|
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 =
|
static struct SdioDevDone dev_done =
|
||||||
{
|
{
|
||||||
SdioOpen,
|
SdioOpen,
|
||||||
@@ -352,6 +365,7 @@ int Imxrt1052HwSdioInit(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
sdio_dev.dev_done = &dev_done;
|
sdio_dev.dev_done = &dev_done;
|
||||||
|
sdio_dev.haldev.dev_block_control = SdioControl;
|
||||||
ret = SdioDeviceRegister(&sdio_dev, SDIO_DEVICE_NAME);
|
ret = SdioDeviceRegister(&sdio_dev, SDIO_DEVICE_NAME);
|
||||||
if (ret != EOK) {
|
if (ret != EOK) {
|
||||||
KPrintf("Sdio device register error %d\n", ret);
|
KPrintf("Sdio device register error %d\n", ret);
|
||||||
|
|||||||
@@ -15,8 +15,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*************************************************
|
/*************************************************
|
||||||
File name: usb_misc.h
|
File name: host_msd_command.c
|
||||||
Description: modify usb_echo to KPrintf
|
Description: modify usb msd command test function
|
||||||
Others: take SDK_2.6.1_MIMXRT1052xxxxB/boards/evkbimxrt1050/usb_examples/usb_host_msd_command for references
|
Others: take SDK_2.6.1_MIMXRT1052xxxxB/boards/evkbimxrt1050/usb_examples/usb_host_msd_command for references
|
||||||
History:
|
History:
|
||||||
1. Date: 2022-02-10
|
1. Date: 2022-02-10
|
||||||
|
|||||||
@@ -261,6 +261,19 @@ static uint32 SdioWrite(void *dev, struct BusBlockWriteParam *write_param)
|
|||||||
return write_param->size;
|
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 =
|
static struct SdioDevDone dev_done =
|
||||||
{
|
{
|
||||||
SdioOpen,
|
SdioOpen,
|
||||||
@@ -352,6 +365,7 @@ int Imxrt1052HwSdioInit(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
sdio_dev.dev_done = &dev_done;
|
sdio_dev.dev_done = &dev_done;
|
||||||
|
sdio_dev.haldev.dev_block_control = SdioControl;
|
||||||
ret = SdioDeviceRegister(&sdio_dev, SDIO_DEVICE_NAME);
|
ret = SdioDeviceRegister(&sdio_dev, SDIO_DEVICE_NAME);
|
||||||
if (ret != EOK) {
|
if (ret != EOK) {
|
||||||
KPrintf("Sdio device register error %d\n", ret);
|
KPrintf("Sdio device register error %d\n", ret);
|
||||||
|
|||||||
@@ -15,8 +15,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*************************************************
|
/*************************************************
|
||||||
File name: usb_misc.h
|
File name: host_msd_command.c
|
||||||
Description: modify usb_echo to KPrintf
|
Description: modify usb msd command test function
|
||||||
Others: take SDK_2.6.1_MIMXRT1052xxxxB/boards/evkbimxrt1050/usb_examples/usb_host_msd_command for references
|
Others: take SDK_2.6.1_MIMXRT1052xxxxB/boards/evkbimxrt1050/usb_examples/usb_host_msd_command for references
|
||||||
History:
|
History:
|
||||||
1. Date: 2022-02-10
|
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
|
|
||||||
|
|||||||
1
Ubiquitous/XiZi/fs/lwext4/lwext4_submodule
Submodule
1
Ubiquitous/XiZi/fs/lwext4/lwext4_submodule
Submodule
Submodule Ubiquitous/XiZi/fs/lwext4/lwext4_submodule added at 1eba3cfeda
@@ -24,6 +24,9 @@ enum FilesystemType
|
|||||||
FSTYPE_FATFS = 0,
|
FSTYPE_FATFS = 0,
|
||||||
FSTYPE_IOTDEVICEFILE,
|
FSTYPE_IOTDEVICEFILE,
|
||||||
FSTYPE_CH376,
|
FSTYPE_CH376,
|
||||||
|
#ifdef FS_LWEXT4
|
||||||
|
FSTYPE_LWEXT4,
|
||||||
|
#endif
|
||||||
FSTYPE_END,
|
FSTYPE_END,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -354,6 +354,12 @@ ifeq ($(CONFIG_LIB_NEWLIB),y)
|
|||||||
KERNELPATHS += -I$(KERNEL_ROOT)/lib/newlib/include #
|
KERNELPATHS += -I$(KERNEL_ROOT)/lib/newlib/include #
|
||||||
endif
|
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)
|
ifeq ($(ARCH), risc-v)
|
||||||
KERNELPATHS +=-I$(KERNEL_ROOT)/arch/risc-v/shared
|
KERNELPATHS +=-I$(KERNEL_ROOT)/arch/risc-v/shared
|
||||||
|
|||||||
Reference in New Issue
Block a user