diff --git a/uboot-mtk-20220606/common/main.c b/uboot-mtk-20220606/common/main.c index 697f2716e..7c761e64a 100644 --- a/uboot-mtk-20220606/common/main.c +++ b/uboot-mtk-20220606/common/main.c @@ -13,13 +13,14 @@ #include #include #include +#ifdef CONFIG_CMD_GL_BTN +#include +#endif #include #include #include #include -void led_control(const char *cmd, const char *name, const char *arg); - static void run_preboot_environment_command(void) { char *p; diff --git a/uboot-mtk-20220606/failsafe/failsafe.c b/uboot-mtk-20220606/failsafe/failsafe.c index 1cb4311d7..760f24d8f 100644 --- a/uboot-mtk-20220606/failsafe/failsafe.c +++ b/uboot-mtk-20220606/failsafe/failsafe.c @@ -12,6 +12,9 @@ #include #include #include +#ifdef CONFIG_CMD_GL_BTN +#include +#endif #include #include #include @@ -22,8 +25,6 @@ #include "../board/mediatek/common/boot_helper.h" #include "fs.h" -void led_control(const char *cmd, const char *name, const char *arg); - enum { FW_TYPE_GPT, FW_TYPE_BL2, diff --git a/uboot-mtk-20220606/include/glbtn.h b/uboot-mtk-20220606/include/glbtn.h new file mode 100644 index 000000000..70c79068d --- /dev/null +++ b/uboot-mtk-20220606/include/glbtn.h @@ -0,0 +1,6 @@ +#ifndef _GLBTN_H_ +#define _GLBTN_H_ + +void led_control(const char *cmd, const char *name, const char *arg); + +#endif diff --git a/uboot-mtk-20220606/net/httpd.c b/uboot-mtk-20220606/net/httpd.c index b36b0c525..272e6ec9e 100644 --- a/uboot-mtk-20220606/net/httpd.c +++ b/uboot-mtk-20220606/net/httpd.c @@ -15,8 +15,9 @@ #include #include #include - -void led_control(const char *cmd, const char *name, const char *arg); +#ifdef CONFIG_CMD_GL_BTN +#include +#endif struct httpd_instance { struct list_head node; diff --git a/uboot-mtk-20230718-09eda825/board/mediatek/common/failsafe.c b/uboot-mtk-20230718-09eda825/board/mediatek/common/failsafe.c index 17df39b24..acb7fee38 100644 --- a/uboot-mtk-20230718-09eda825/board/mediatek/common/failsafe.c +++ b/uboot-mtk-20230718-09eda825/board/mediatek/common/failsafe.c @@ -12,13 +12,14 @@ #include #include #include +#ifdef CONFIG_CMD_GL_BTN +#include +#endif #include "upgrade_helper.h" #include "colored_print.h" DECLARE_GLOBAL_DATA_PTR; -void led_control(const char *cmd, const char *name, const char *arg); - const char *fw_to_part_name(failsafe_fw_t fw) { switch (fw) diff --git a/uboot-mtk-20230718-09eda825/common/main.c b/uboot-mtk-20230718-09eda825/common/main.c index 81fbeb686..cc81d00c0 100644 --- a/uboot-mtk-20230718-09eda825/common/main.c +++ b/uboot-mtk-20230718-09eda825/common/main.c @@ -13,14 +13,15 @@ #include #include #include +#ifdef CONFIG_CMD_GL_BTN +#include +#endif #include #include #include #include #include -void led_control(const char *cmd, const char *name, const char *arg); - static void run_preboot_environment_command(void) { char *p; diff --git a/uboot-mtk-20230718-09eda825/include/glbtn.h b/uboot-mtk-20230718-09eda825/include/glbtn.h new file mode 100644 index 000000000..70c79068d --- /dev/null +++ b/uboot-mtk-20230718-09eda825/include/glbtn.h @@ -0,0 +1,6 @@ +#ifndef _GLBTN_H_ +#define _GLBTN_H_ + +void led_control(const char *cmd, const char *name, const char *arg); + +#endif