mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-04 18:41:03 +00:00
327ff8e0a4
This function allows updating bootloader from u-boot on production devices without need in host PC. Be aware! It works only with re-crypted BCT. Tested-by: Andreas Westman Dorcsak <hedmoo@yahoo.com> # ASUS TF T30 Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> # LG P895 T30 Signed-off-by: Ramin Khonsari <raminterex@yahoo.com> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> Signed-off-by: Tom <twarren@nvidia.com>
42 lines
820 B
C
42 lines
820 B
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
|
|
#ifndef _BCT_H_
|
|
#define _BCT_H_
|
|
|
|
/*
|
|
* Defines the BCT parametres for T30
|
|
*/
|
|
#define BCT_LENGTH 0x17E0
|
|
#define BCT_HASH 0x10
|
|
#define EBT_ALIGNMENT 0x10
|
|
|
|
/*
|
|
* Defines the CMAC-AES-128 hash length in 32 bit words. (128 bits = 4 words)
|
|
*/
|
|
#define NVBOOT_CMAC_AES_HASH_LENGTH 4
|
|
|
|
/*
|
|
* Defines the maximum number of bootloader descriptions in the BCT.
|
|
*/
|
|
#define NVBOOT_MAX_BOOTLOADERS 4
|
|
|
|
struct nv_bootloader_info {
|
|
u32 version;
|
|
u32 start_blk;
|
|
u32 start_page;
|
|
u32 length;
|
|
u32 load_addr;
|
|
u32 entry_point;
|
|
u32 attribute;
|
|
u32 crypto_hash[NVBOOT_CMAC_AES_HASH_LENGTH];
|
|
};
|
|
|
|
struct nvboot_config_table {
|
|
u32 unused0[4];
|
|
u32 boot_data_version;
|
|
u32 unused1[972];
|
|
struct nv_bootloader_info bootloader[NVBOOT_MAX_BOOTLOADERS];
|
|
u32 unused2[508];
|
|
};
|
|
|
|
#endif /* _BCT_H_ */
|