From: SnickerSun Date: Thu, 28 Dec 2023 11:05:39 +0000 (+0800) Subject: 1.优化开机logo显示时间,延迟user分区的mount时间,先把开机logo放到 /system/分区中。 X-Git-Tag: release_V1.2.70_20241020_135402~1374 X-Git-Url: http://git.snicker.com.cn/Users/apple/Desktop/static/gitweb.css?a=commitdiff_plain;h=8a56647bca1e3a5b87a3be5d7347efb91b33e377;p=mirrors%2FFD230.git 1.优化开机logo显示时间,延迟user分区的mount时间,先把开机logo放到 /system/分区中。 2.使用唯一的串口做下载和日志 --- diff --git a/autuobuild.sh b/autuobuild.sh index 72e12100c..10d9bbcd2 100644 --- a/autuobuild.sh +++ b/autuobuild.sh @@ -6,7 +6,7 @@ HOMEDIR=$PWD if [ "$1" == "" ] then -TARGET_PACK_NAME=pack_brandy_native_js +TARGET_PACK_NAME=pack_brandy_xts else TARGET_PACK_NAME=$1 fi diff --git a/code/sdk/application/brandy/brandy_standard/thread_pri_init.c b/code/sdk/application/brandy/brandy_standard/thread_pri_init.c index 31bc2ac13..db20da269 100755 --- a/code/sdk/application/brandy/brandy_standard/thread_pri_init.c +++ b/code/sdk/application/brandy/brandy_standard/thread_pri_init.c @@ -250,6 +250,13 @@ static void thread_main(const void *unused) thread_init(); button_app_init(); uapi_calendar_init(); + +#ifdef SUPPORT_AT_OHOSFWK + show_logo(); +#endif +#ifdef CFG_DRIVERS_NANDFLASH + nandflash_filesystem_mount_user(); +#endif #ifdef SUPPORT_AT_OHOSFWK ohos_startup(); #endif diff --git a/code/sdk/application/wearable/ohos_startup/ohosfwk_startup.c b/code/sdk/application/wearable/ohos_startup/ohosfwk_startup.c index 474685dc4..2f1556883 100755 --- a/code/sdk/application/wearable/ohos_startup/ohosfwk_startup.c +++ b/code/sdk/application/wearable/ohos_startup/ohosfwk_startup.c @@ -38,19 +38,25 @@ int32_t mbedtls_adapt_register(void) mbedtls_cipher_adapt_register_func(&harden_cipher_func); return 0; } -void ohos_startup() + +void show_logo() { - mbedtls_adapt_register(); + #ifdef ENABLE_UIKIT InitGraphicService(); #endif #ifdef SUPPORT_POWER_MANAGER const power_display_svr_api_t *display_api = power_display_svr_get_api(); display_api->turn_on_screen(); - display_api->set_screen_set_keepon_timeout(5000); + display_api->set_screen_set_keepon_timeout(10000); #endif #ifdef ENABLE_UIKIT ShowGraphicLogo(); #endif +} +void ohos_startup() +{ + mbedtls_adapt_register(); + OHOS_SystemInit(); } diff --git a/code/sdk/application/wearable/ohos_startup/ohosfwk_startup.h b/code/sdk/application/wearable/ohos_startup/ohosfwk_startup.h index fb5224687..e617c81e3 100755 --- a/code/sdk/application/wearable/ohos_startup/ohosfwk_startup.h +++ b/code/sdk/application/wearable/ohos_startup/ohosfwk_startup.h @@ -12,6 +12,7 @@ extern "C" { #endif void ohos_startup(void); +void show_logo(void); #ifdef __cplusplus } #endif diff --git a/code/sdk/bootloader/flashboot/brandy/nandflash/include/nandflash_config.h b/code/sdk/bootloader/flashboot/brandy/nandflash/include/nandflash_config.h index 88f18f398..ad04bc6a1 100755 --- a/code/sdk/bootloader/flashboot/brandy/nandflash/include/nandflash_config.h +++ b/code/sdk/bootloader/flashboot/brandy/nandflash/include/nandflash_config.h @@ -44,6 +44,7 @@ extern const flash_info_type_def g_flash_info[1]; struct nand_driver_struct *get_nand_flash(void); int nandflash_filesystem_init(void); +int nandflash_filesystem_mount_user(void); void nandflash_qspi_init(void); void nandflash_qspi_resume(void); void test_nand_flash_read_8(struct nand_driver_struct *test_nand_flash_driver, uint32_t nand_page); diff --git a/code/sdk/build/config/target_config/brandy/config.py b/code/sdk/build/config/target_config/brandy/config.py index 3c147d548..074b086f7 100755 --- a/code/sdk/build/config/target_config/brandy/config.py +++ b/code/sdk/build/config/target_config/brandy/config.py @@ -115,6 +115,7 @@ target = { 'SW_UART_DEBUG', 'SAVE_EXC_INFO', 'HASH_MEM_COPY', 'JS_ENABLE', 'CONFIG_LOW_POWER_TEST', 'ENABLE_ECC', + 'FT_SINGLE_UART', #'CONFIG_ADC_SUPPORT_AUTO_SCAN','CONFIG_ADC_SUPPORT_LONG_SAMPLE', 'MIPI_ULPS_SUPPORT', 'TPTYPE_FT6X46'], 'ram_component': ["algorithm", "dfx_port_brandy", "dfx_update", 'dfx_nv', "osal", "arch_port", "-:testsuite", @@ -216,12 +217,15 @@ target = { 'defines': ['PRE_ASIC', 'BRANDY_PRODUCT_EVB4', 'VERSION_STANDARD', '__LITEOS__', '_ALL_SOURCE', 'SUPPORT_CXX', 'I2C_SLAVE_REG_ADDR_4BYTE', 'CFG_DRIVERS_NANDFLASH', "-:TARGET_CHIP_BRANDY=1", "-:BRANDY_CHIP_V100=1", 'ENABLE_UIKIT', 'SW_UART_DEBUG', "HASH_MEM_COPY", + 'FT_SINGLE_UART', 'ENABLE_ECC'], 'ram_component': ["algorithm", "dfx_port_brandy", "dfx_update", "osal", "arch_port", "-:testsuite", "liteos_port", 'lcd', 'qspi_display', 'psram', 'hal_mipi', 'mipi_tx', 'non_os', 'touch', 'x_dpal', 'x_vfs', 'x_disk', 'x_fat', 'drv_mmc', 'x_vfs_private', - 'ulp_aon', 'hal_l2ram', 'pm_service', 'pm_brandy', 'cmn_header'], + 'ulp_aon', 'hal_l2ram', 'pm_service', 'pm_brandy', 'cmn_header', + 'at_cmd' + ], 'ram_component_set': ['pinctrl', 'dfx_set'] }, 'brandy-xts-r': { @@ -269,7 +273,9 @@ target = { "SSB_USE_PLL", "VERSION_STANDARD", "BUILD_APPLICATION_SSB", "LIBBOOTLOADER", "LIBCODELOADER", "LIBCPU_UTILS", "LIBAPP_VERSION", "LIBPANIC", "LIBCONNECTIVITY", "LIBERROR_CODE", "LIBSEC_RANDOM", "LIBCODELOADER_SSB", "LIBJLINK_LOAD", "LIBLIB_UTILS", "LIBBUILD_VERSION",'ENABLE_ECC',"CFG_DRIVERS_NANDFLASH", - "NO_TIMEOUT", "CONFIG_UART_BAUD_RATE_DIV_8", 'SW_UART_DEBUG', 'LARGE_BUFFER'], + "NO_TIMEOUT", "CONFIG_UART_BAUD_RATE_DIV_8", 'SW_UART_DEBUG', 'LARGE_BUFFER', + 'FT_SINGLE_UART' + ], 'ram_component': ['arch_port', 'hal_l2ram', 'sec_boot', 'libboundscheck', 'dfx_exception', 'error_code', 'psram', 'osal', 'cmn_header', 'boot_nandflash'], 'ram_component_set': ['pinctrl'], diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/system/KUMI_LOGO.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/system/KUMI_LOGO.bin new file mode 100644 index 000000000..bd590ef4f Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/system/KUMI_LOGO.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/system/logo.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/system/logo.bin new file mode 100644 index 000000000..48c0d8f34 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/system/logo.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/system/test1.txt b/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/system/test1.txt deleted file mode 100755 index b15149be0..000000000 --- a/code/sdk/build/config/target_config/brandy/mk_fs_image/fs/system/test1.txt +++ /dev/null @@ -1 +0,0 @@ -this is test1 file \ No newline at end of file diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/mkyaffs2tool.py b/code/sdk/build/config/target_config/brandy/mk_fs_image/mkyaffs2tool.py index 7495f9a9b..fc2b808f8 100755 --- a/code/sdk/build/config/target_config/brandy/mk_fs_image/mkyaffs2tool.py +++ b/code/sdk/build/config/target_config/brandy/mk_fs_image/mkyaffs2tool.py @@ -40,9 +40,9 @@ cfg_obb_size = 64 partition_list = [ - [os.path.join(cur_dir, 'fs', 'system'), "0x140000"], - [os.path.join(cur_dir, 'fs', 'update'), "0x140000"], - [os.path.join(cur_dir, 'fs', 'music'), "0x140000"], + [os.path.join(cur_dir, 'fs', 'system'), "0xcc0000"], + [os.path.join(cur_dir, 'fs', 'update'), "0xcc0000"], + [os.path.join(cur_dir, 'fs', 'music'), "0xcc0000"], [os.path.join(cur_dir, 'fs', 'user'), "null"] ] diff --git a/code/sdk/drivers/drivers/driver/nand_flash/nand/nandflash_config.c b/code/sdk/drivers/drivers/driver/nand_flash/nand/nandflash_config.c index 75dd6c7bc..0af10eea0 100755 --- a/code/sdk/drivers/drivers/driver/nand_flash/nand/nandflash_config.c +++ b/code/sdk/drivers/drivers/driver/nand_flash/nand/nandflash_config.c @@ -42,10 +42,11 @@ uint8_t buffer_verify[DEFALUT_BUFLENGTH] __attribute__((aligned(4))); uint8_t buffer_oob_verify[128] __attribute__((aligned(4))); // 128 is one max oob size int has_nandflash_init = 0; - +int has_nandflash_user_init = 0; #ifndef MEMORY_MINI #define YF_NAME_STRS "/system/", "/update/", "/music/", "/user/" -uint32_t yf_volume_percent[YF_VOLUMES_NUM] = { 1, 1, 1, 97 }; +uint32_t yf_volume_percent[YF_VOLUMES_NUM] = { 10, 10, 10, 70 }; +// uint32_t yf_volume_percent[YF_VOLUMES_NUM] = { 1, 1, 1, 97 }; #else #define YF_NAME_STRS "/user/" uint32_t yf_volume_percent[YF_VOLUMES_NUM] = {100}; @@ -60,7 +61,7 @@ struct nand_driver_struct *get_nand_flash(void) return &g_ds35x1g_driver; } -static int formate_filesystem(uint32_t total_block_num) +static int formate_filesystem_without_user(uint32_t total_block_num) { int ret; uint32_t index; @@ -87,18 +88,45 @@ static int formate_filesystem(uint32_t total_block_num) PRINT("formate dev %d name fail \r\n", index); return -EIO; } - - ret = mount(dev_name, g_volume_names[index], "yaffs", 0, NULL); - PRINT("formate filesystem devinfo: index = %d , dev_name = %s, folder_name = %s, \ - part_start_sector = %d, part_count_sector = %d\r\n", index, dev_name, - g_volume_names[index], part_start_sector, part_count_sector); - if (ret != 0) { - return ret; + if( memcmp("/user/",g_volume_names[index],sizeof("/user/"))== 0 ) + { + PRINT("skip mount /user/ \r\n"); + }else{ + ret = mount(dev_name, g_volume_names[index], "yaffs", 0, NULL); + PRINT("formate filesystem devinfo: index = %d , dev_name = %s, folder_name = %s, \ + part_start_sector = %d, part_count_sector = %d\r\n", index, dev_name, + g_volume_names[index], part_start_sector, part_count_sector); + if (ret != 0) { + return ret; + } } - part_start_sector += part_count_sector; + part_start_sector += part_count_sector; } return ret; } +static int formate_filesystem_user(void) +{ + int ret; + uint32_t index; + char dev_name[64] = { 0 }; + for (index = 0; index < YF_VOLUMES_NUM; ++index) { + ret = sprintf_s(dev_name, sizeof(dev_name), "/dev/nandblk%d", index); + if (ret <= 0) { + PRINT("formate dev %d name fail \r\n", index); + return -EIO; + } + if( memcmp("/user/",g_volume_names[index],sizeof("/user/"))== 0 ) + { + ret = mount(dev_name, g_volume_names[index], "yaffs", 0, NULL); + PRINT("formate filesystem devinfo: index = %d , dev_name = %s, folder_name = %s \r\n", index, dev_name, g_volume_names[index]); + if (ret != 0) { + return ret; + } + } + } + return ret; +} + void erase_all(struct nand_driver_struct *driver) { @@ -207,11 +235,29 @@ int nandflash_filesystem_init(void) PRINT("get_mtd_info faild!\n"); } PRINT("yaffs filesystem init start!\n"); - int ret = formate_filesystem(freertos_nandflash_driver->total_block); + int ret = formate_filesystem_without_user(freertos_nandflash_driver->total_block); PRINT("yaffs filesystem init end!\n"); has_nandflash_init = 1; return ret; } +int nandflash_filesystem_mount_user(void) +{ + + if(has_nandflash_init!=1) + { + PRINT("\r\nskip mount user , nandflash not ready , should init first.\r\n"); + return -1; + } + if (has_nandflash_user_init == 1) { + PRINT("\r\nnandflash_user init ok.\r\n"); + return 0; + } + PRINT("yaffs filesystem mount user start!\n"); + int ret = formate_filesystem_user(); + PRINT("yaffs filesystem mount user end!\n"); + has_nandflash_user_init = 1; + return ret; +} void nandflash_qspi_resume(void) { diff --git a/code/sdk/middleware/services/gui/uikit/proprietary/src/service/src/graphic_service_wrapper.cpp b/code/sdk/middleware/services/gui/uikit/proprietary/src/service/src/graphic_service_wrapper.cpp index 3e1ae5f51..c757e067a 100755 --- a/code/sdk/middleware/services/gui/uikit/proprietary/src/service/src/graphic_service_wrapper.cpp +++ b/code/sdk/middleware/services/gui/uikit/proprietary/src/service/src/graphic_service_wrapper.cpp @@ -40,7 +40,7 @@ static OHOS::ImageInfo* g_imgInfo = nullptr; #ifdef QSPI_DISPLAY #define IMAGE_OPEN_LOGO_PATH "/user/res/OPEN_LOGO_QSPI.bin" #else -#define IMAGE_OPEN_LOGO_PATH "/user/res/KUMI_LOGO.bin" +#define IMAGE_OPEN_LOGO_PATH "/system/KUMI_LOGO.bin" #endif static void UikitRTCCallBack(uintptr_t data)