aboutsummaryrefslogtreecommitdiffstats
path: root/tools/firmware-utils/src
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2021-03-24 22:44:14 +0100
committerRafał Miłecki <rafal@milecki.pl>2021-04-08 13:16:11 +0200
commit636b8bfac02629d93fc3f63c074edde06c3581b5 (patch)
treed0e6e7387fdd6af581a06d2941a649eb9776938f /tools/firmware-utils/src
parent76423e236475f7fb6ee863f28a18b20f97ccec44 (diff)
downloadupstream-636b8bfac02629d93fc3f63c074edde06c3581b5.tar.gz
upstream-636b8bfac02629d93fc3f63c074edde06c3581b5.tar.bz2
upstream-636b8bfac02629d93fc3f63c074edde06c3581b5.zip
firmware-utils: bcm4908kernel: name struct fields
Less magic names / values. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit a3611432a6c3490fb2b6fdbc1ce664cf70900668)
Diffstat (limited to 'tools/firmware-utils/src')
-rw-r--r--tools/firmware-utils/src/bcm4908kernel.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/firmware-utils/src/bcm4908kernel.c b/tools/firmware-utils/src/bcm4908kernel.c
index fc5b2812ef..eaf04a0a48 100644
--- a/tools/firmware-utils/src/bcm4908kernel.c
+++ b/tools/firmware-utils/src/bcm4908kernel.c
@@ -27,11 +27,11 @@
#endif
struct bcm4908kernel_header {
- uint32_t unk1;
- uint32_t unk2;
- uint32_t length;
+ uint32_t boot_load_addr; /* AKA la_address */
+ uint32_t boot_addr; /* AKA la_entrypt */
+ uint32_t data_len;
uint8_t magic[4];
- uint32_t unused;
+ uint32_t uncomplen; /* Empty for LZMA, used for LZ4 */
};
static void usage() {
@@ -103,14 +103,14 @@ int main(int argc, char **argv) {
length += bytes;
}
- header.unk1 = cpu_to_le32(0x00080000);
- header.unk2 = cpu_to_le32(0x00080000);
- header.length = cpu_to_le32(length);
+ header.boot_load_addr = cpu_to_le32(0x00080000);
+ header.boot_addr = cpu_to_le32(0x00080000);
+ header.data_len = cpu_to_le32(length);
header.magic[0] = 'B';
header.magic[1] = 'R';
header.magic[2] = 'C';
header.magic[3] = 'M';
- header.unused = 0;
+ header.uncomplen = 0;
fseek(out, 0, SEEK_SET);