summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongjin Kim <tobetter@gmail.com>2020-01-22 13:56:08 +0900
committerDongjin Kim <tobetter@gmail.com>2020-02-13 17:13:40 +0900
commitd69eae88f8ae86d2e511036139bff4d27f7c1348 (patch)
tree6032da902c69d75565a81bb6c76653af2456e7cf
parent8731a179067282514bee3d22a50a46f4dd761630 (diff)
downloadu-boot-odroid-c1-d69eae88f8ae86d2e511036139bff4d27f7c1348.tar.gz
Revert "Showlogo: Add filename parameter"
This reverts commit 8aec17b7921cadfc3566f021b4d9ab33bb0bfe63. Change-Id: I40a595cd73db6c5e258c3891c9ebce99d05eaf1e Signed-off-by: Dongjin Kim <tobetter@gmail.com>
-rw-r--r--board/hardkernel/odroidn2/odroidn2.c2
-rw-r--r--common/cmd_showlogo.c32
2 files changed, 20 insertions, 14 deletions
diff --git a/board/hardkernel/odroidn2/odroidn2.c b/board/hardkernel/odroidn2/odroidn2.c
index 752465b399..6e24402c7b 100644
--- a/board/hardkernel/odroidn2/odroidn2.c
+++ b/board/hardkernel/odroidn2/odroidn2.c
@@ -390,7 +390,7 @@ int board_late_init(void)
#endif
/* boot logo display - 1080p60hz */
- run_command("showlogo 1080p60hz 1920 1080 boot-logo-1080.bmp.gz", 0);
+ run_command("showlogo", 0);
if (get_boot_device() == BOOT_DEVICE_SPI) {
setenv("bootdelay", "0");
diff --git a/common/cmd_showlogo.c b/common/cmd_showlogo.c
index 81a8dc2976..ecac6b3b74 100644
--- a/common/cmd_showlogo.c
+++ b/common/cmd_showlogo.c
@@ -64,14 +64,14 @@ static int boot_partition(void)
int dev = get_boot_device();
if (dev == BOOT_DEVICE_EMMC)
- return 1;
- else if (dev == BOOT_DEVICE_SD)
return 0;
+ else if (dev == BOOT_DEVICE_SD)
+ return 1;
return -1;
}
-static int display_logo(const char* mode, const char* bmp_width, const char* bmp_height, const char* bmp_filename)
+static int display_logo(const char* mode, const char* bmp_width, const char* bmp_height)
{
int ret = 0;
int i = 0;
@@ -105,12 +105,20 @@ static int display_logo(const char* mode, const char* bmp_width, const char* bmp
/* check boot device */
bootdev = boot_partition();
- setenv("bootlogo_addr", "0x20000000");
+ setenv("bootlogo_addr", getenv("loadaddr")); /* 0x1080000 */
#ifdef CONFIG_VIDEO_BMP_GZIP
- sprintf(str, "load mmc %d ${bootlogo_addr} %s", bootdev, bmp_filename);
+ sprintf(str, "load mmc %d ${bootlogo_addr} boot-logo.bmp.gz", bootdev);
ret = run_command(str, 0);
if (!ret) goto display_logo;
#endif
+ sprintf(str, "load mmc %d ${bootlogo_addr} boot-logo.bmp", bootdev);
+ ret = run_command(str, 0);
+ if (!ret) goto display_logo;
+
+ sprintf(str, "movi read logo %d ${bootlogo_addr}", bootdev);
+ ret = run_command(str, 0);
+ if (!ret) goto display_logo;
+
/* set indispensable display initialization only */
run_command("osd open; osd clear", 0);
sprintf(str, "vout output %s", mode);
@@ -150,26 +158,24 @@ static int do_showlogo(cmd_tbl_t *cmdtp, int flag, int argc,
if (argc <= 1) {
mode = getenv("hdmimode");
/* ODROID default logo size 1280x720 */
- display_logo((NULL == mode) ? "1080p60hz" : mode, "1280", "720", "boot-logo.bmp.gz");
- } else if (argc == 5) {
- display_logo(argv[1], argv[2], argv[3], argv[4]);
+ display_logo((NULL == mode) ? "1080p60hz" : mode, "1280", "720");
+ } else if (argc == 4) {
+ display_logo(argv[1], argv[2], argv[3]);
} else {
- display_logo(argv[1], "1280", "720", "boot-logo.bmp.gz");
+ display_logo(argv[1], "1280", "720");
}
return 0;
}
U_BOOT_CMD(
- showlogo, 5, 0, do_showlogo,
+ showlogo, 4, 0, do_showlogo,
"Displaying BMP logo file to HDMI screen with the specified resolution",
- "<resolution> [<bmp_width> <bmp_height> <bmp_filename>]\n"
+ "<resolution> [<bmp_width> <bmp_height>]\n"
" resolution - screen resoltuion on HDMI screen\n"
" '1080p60hz' will be used by default if missing\n"
" bmp_width (optional) - width of logo bmp file\n"
" '1280' will be used by default if missing\n"
" bmp_height (optional) - height of logo bmp file\n"
" '720' will be used by default if missing"
- " bmp_filename (optional) - name of the logo bmp file\n"
- " 'boot-logo.bmp.gz' will be used by default if missing"
);