This commit is contained in:
刘可亮
2024-06-04 19:00:30 +08:00
parent 990c72f5be
commit 0a13af6a1d
1668 changed files with 342810 additions and 37726 deletions

View File

@@ -22,7 +22,7 @@ static int do_reset_boot(int argc, char *argv[])
{
#ifdef AIC_WDT_DRV
wdt_init();
printf("Going to reboot ...\n");
printf("Restarting system ...\n");
#endif
#ifdef AIC_WRI_DRV
aic_set_reboot_reason(REBOOT_REASON_CMD_REBOOT);
@@ -40,7 +40,10 @@ CONSOLE_CMD(reboot, do_reset_boot, "Reboot device.");
static int cmd_aicupg(int argc, char **argv)
{
#ifdef AIC_WRI_DRV
aic_set_reboot_reason(REBOOT_REASON_UPGRADE);
if ((argc == 2) && !strcmp(argv[1], "gotobl"))
aic_set_reboot_reason(REBOOT_REASON_BL_UPGRADE);
else
aic_set_reboot_reason(REBOOT_REASON_UPGRADE);
#endif
do_reset_boot(0, NULL);
return 0;

View File

@@ -10,6 +10,7 @@
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <ctype.h>
#include <board.h>
#include <hal_syscfg.h>
#include <aic_core.h>
@@ -22,6 +23,10 @@
#include "drv_dma.h"
#endif
#ifdef AIC_USING_SID
#include "efuse.h"
#endif
#ifdef AIC_OSR_CE_DRV
#include <osrce.h>
#endif
@@ -55,11 +60,11 @@ extern void lv_port_indev_init(void);
extern void lv_user_gui_init(void);
#endif
extern void show_version(void);
void show_banner(void)
{
printf("%s\n", BANNER);
printf("Welcome to ArtInChip Luban-Lite %d.%d [Baremetal - Built on %s %s]\n",
LL_VERSION, LL_SUBVERSION, __DATE__, __TIME__);
}
static int board_init(void)
@@ -76,7 +81,11 @@ static int board_init(void)
uart_init(cons_uart);
stdio_set_uart(cons_uart);
#ifdef AIC_USING_SID
efuse_init();
#endif
show_banner();
show_version();
return 0;
}
@@ -125,8 +134,10 @@ int main(void)
#endif
#ifdef AIC_USING_SDMC1
mmc_init(1);
#ifdef AIC_SD_USING_HOTPLUG
sdcard_hotplug_init();
#endif
#endif
#if defined(LPKG_USING_DFS_ELMFAT) && defined(AIC_USING_SDMC0)
if (dfs_mount("mmc0p2", "/rodata", "elm", 0, DEVICE_TYPE_SDMC_DISK) < 0)
@@ -231,6 +242,10 @@ int main(void)
extern void msc_storage_init(char *path);
msc_storage_init(MSC_STORAGE_PATH);
#endif
#ifdef LPKG_CHERRYUSB_DEVICE_MTP_TEMPLATE
extern void mtp_init(char *path);
mtp_init(ROOT_PATH);
#endif
#ifdef LPKG_CHERRYUSB_DEVICE_MIDI_TEMPLATE
extern void midi_init(void);
midi_init();
@@ -241,6 +256,12 @@ int main(void)
#endif
#endif
#ifdef AIC_SD_USING_HOTPLUG
while (1) {
sdcard_hotplug_act();
}
#endif
#ifdef AIC_CONSOLE_BARE_DRV
/* Console shell loop */
console_init();