diff options
author | Tianjie Xu <xunchang@google.com> | 2019-12-16 21:35:13 -0800 |
---|---|---|
committer | Tianjie Xu <xunchang@google.com> | 2019-12-17 11:46:27 -0800 |
commit | b6934a07d2b7e0d41a15ff29bd6b157e7c2993c4 (patch) | |
tree | 3a5dec9a444671b654857f48cb6a3d85b97cadba /boot_control_copy | |
parent | 35692b040079b188c487314f5489e55476518f25 (diff) | |
download | extras-b6934a07d2b7e0d41a15ff29bd6b157e7c2993c4.tar.gz |
Remove the dependency on bootloader_message
Now that we move libboot_control to boot/1.1, the definition of
bootloader_message_ab will hide behind the implementation details for
vendor HALs. As this library isn't used in practice, we just inline the
offset here.
Bug: 131775112
Test: build
Change-Id: I64babcad6a421cab5858ab818f392eca196a0fe2
Diffstat (limited to 'boot_control_copy')
-rw-r--r-- | boot_control_copy/Android.bp | 1 | ||||
-rw-r--r-- | boot_control_copy/bootinfo.cpp | 20 |
2 files changed, 14 insertions, 7 deletions
diff --git a/boot_control_copy/Android.bp b/boot_control_copy/Android.bp index a6712087..6c9dbc24 100644 --- a/boot_control_copy/Android.bp +++ b/boot_control_copy/Android.bp @@ -20,7 +20,6 @@ cc_library_shared { "libcutils", ], static_libs: [ - "libbootloader_message", "libfs_mgr", ], } diff --git a/boot_control_copy/bootinfo.cpp b/boot_control_copy/bootinfo.cpp index 364c1985..55319178 100644 --- a/boot_control_copy/bootinfo.cpp +++ b/boot_control_copy/bootinfo.cpp @@ -28,7 +28,6 @@ #include <stdlib.h> #include <string.h> -#include <bootloader_message/bootloader_message.h> #include <cutils/properties.h> #include <fs_mgr.h> @@ -106,11 +105,20 @@ int boot_info_open_partition(const char *name, uint64_t *out_size, int flags) } // As per struct bootloader_message_ab which is defined in -// bootable/recovery/bootloader.h we can use the 32 bytes in the -// bootctrl_suffix field provided that they start with the active slot -// suffix terminated by NUL. It just so happens that BrilloBootInfo is -// laid out this way. -#define BOOTINFO_OFFSET offsetof(struct bootloader_message_ab, slot_suffix) +// boot/1.1/default. +// struct bootloader_message_ab { +// struct bootloader_message message; +// char slot_suffix[32]; +// char update_channel[128]; +// +// // Round up the entire struct to 4096-byte. +// char reserved[1888]; +// }; +// +// We can use the 32 bytes in the bootctrl_suffix field provided that they +// start with the active slot suffix terminated by NUL. It just so happens +// that BrilloBootInfo is laid out this way. +#define BOOTINFO_OFFSET 2048 bool boot_info_load(BrilloBootInfo *out_info) { |