summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay <1458889+Raybuntu@users.noreply.github.com>2019-04-04 11:12:08 +0300
committerDongjin Kim <tobetter@gmail.com>2020-02-13 11:13:40 +0300
commitc7c32cec017c3bde663921544667fc4450488829 (patch)
tree73f4538094915c1377e29d05d81a9eba18e8a8b7
parent894aa8db6b729546b428ff2b1e135fb38c22d74b (diff)
downloadu-boot-c7c32cec017c3bde663921544667fc4450488829.tar.xz
Showlogo: Add filename parameter
Change-Id: I9112ab3a479b8432981d3d1c4c219929dc0273e0
-rw-r--r--board/hardkernel/odroidn2/odroidn2.c2
-rw-r--r--common/cmd_showlogo.c32
2 files changed, 14 insertions, 20 deletions
diff --git a/board/hardkernel/odroidn2/odroidn2.c b/board/hardkernel/odroidn2/odroidn2.c
index 6e24402c7b..752465b399 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", 0);
+ run_command("showlogo 1080p60hz 1920 1080 boot-logo-1080.bmp.gz", 0);
if (get_boot_device() == BOOT_DEVICE_SPI) {
setenv("bootdelay", "0");
diff --git a/common/cmd_showlogo.c b/common/cmd_showlogo.c
index ecac6b3b74..81a8dc2976 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 0;
- else if (dev == BOOT_DEVICE_SD)
return 1;
+ else if (dev == BOOT_DEVICE_SD)
+ return 0;
return -1;
}
-static int display_logo(const char* mode, const char* bmp_width, const char* bmp_height)
+static int display_logo(const char* mode, const char* bmp_width, const char* bmp_height, const char* bmp_filename)
{
int ret = 0;
int i = 0;
@@ -105,20 +105,12 @@ static int display_logo(const char* mode, const char* bmp_width, const char* bmp
/* check boot device */
bootdev = boot_partition();
- setenv("bootlogo_addr", getenv("loadaddr")); /* 0x1080000 */
+ setenv("bootlogo_addr", "0x20000000");
#ifdef CONFIG_VIDEO_BMP_GZIP
- sprintf(str, "load mmc %d ${bootlogo_addr} boot-logo.bmp.gz", bootdev);
+ sprintf(str, "load mmc %d ${bootlogo_addr} %s", bootdev, bmp_filename);
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);
@@ -158,24 +150,26 @@ 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");
- } else if (argc == 4) {
- display_logo(argv[1], argv[2], argv[3]);
+ 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]);
} else {
- display_logo(argv[1], "1280", "720");
+ display_logo(argv[1], "1280", "720", "boot-logo.bmp.gz");
}
return 0;
}
U_BOOT_CMD(
- showlogo, 4, 0, do_showlogo,
+ showlogo, 5, 0, do_showlogo,
"Displaying BMP logo file to HDMI screen with the specified resolution",
- "<resolution> [<bmp_width> <bmp_height>]\n"
+ "<resolution> [<bmp_width> <bmp_height> <bmp_filename>]\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"
);