Bo Lv | 72d0e90 | 2023-01-02 14:27:34 +0000 | [diff] [blame^] | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 | /* |
| 3 | * Copyright (c) 2019 Amlogic, Inc. All rights reserved. |
| 4 | */ |
| 5 | |
| 6 | #include <common.h> |
| 7 | #include <command.h> |
| 8 | #include <version.h> |
| 9 | #include <linux/compiler.h> |
| 10 | |
| 11 | static int do_bootloader_version(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) |
| 12 | { |
| 13 | char s_version[64]; |
| 14 | strcpy(s_version, "01.01."); |
| 15 | strcat(s_version, U_BOOT_DATE_TIME); |
| 16 | printf("s_version: %s\n", s_version); |
| 17 | env_set("bootloader_version", s_version); |
| 18 | return 0; |
| 19 | } |
| 20 | |
| 21 | U_BOOT_CMD( |
| 22 | get_bootloaderversion, 1, 0, do_bootloader_version, |
| 23 | "print bootloader version", |
| 24 | "" |
| 25 | ); |