From ecbda694b2ada5bacaf108509ed4080b1e00ac4b Mon Sep 17 00:00:00 2001 From: Marcin Bukat Date: Sun, 4 Mar 2012 00:06:20 +0100 Subject: rename rkw.h header file Change-Id: I2cb6ea7da9c20ed0ef87f4b8ea90d2e4a4a3bca2 --- firmware/export/rkw-loader.h | 46 ++++++++++++++++++++++++++++++++++++++++++++ firmware/export/rkw.h | 46 -------------------------------------------- 2 files changed, 46 insertions(+), 46 deletions(-) create mode 100644 firmware/export/rkw-loader.h delete mode 100644 firmware/export/rkw.h (limited to 'firmware/export') diff --git a/firmware/export/rkw-loader.h b/firmware/export/rkw-loader.h new file mode 100644 index 0000000000..2101bd03b7 --- /dev/null +++ b/firmware/export/rkw-loader.h @@ -0,0 +1,46 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * + * Copyright (C) 2012 Marcin Bukat + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 1 + * of the License, or (at your option) any later version. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ + +#include + +#define RKLD_MAGIC 0x4c44524b +#define RKW_HEADER_CRC 0x40000000 +#define RKW_IMAGE_CRC 0x20000000 + +struct rkw_header_t { + uint32_t magic_number; /* Magic number. 0x4C44524B */ + uint32_t header_size; /* Size of the header */ + uint32_t image_base; /* Base address of the firmware image */ + uint32_t load_address; /* Load address */ + uint32_t load_limit; /* End of the firmware image */ + uint32_t bss_start; /* This is the start of .bss section of the firmware I suppose */ + uint32_t reserved0; /* reserved - I've seen only zeros in this field so far */ + uint32_t reserved1; /* reserved - I've seen only zeros in this field so far */ + uint32_t entry_point; /* Entry point address */ + uint32_t load_options; /* 0x80000000 - setup flag (I don't know what it means + * but is present in every RKW I saw), + * 0x40000000 - check header crc, + * 0x20000000 - check firmware crc + */ + uint32_t crc; /* crc32 of the header (excluding crc32 field itself) */ +}; + +const char *rkw_strerror(int8_t errno); +int load_rkw(unsigned char* buf, const char* filename, int buffer_size); diff --git a/firmware/export/rkw.h b/firmware/export/rkw.h deleted file mode 100644 index 2101bd03b7..0000000000 --- a/firmware/export/rkw.h +++ /dev/null @@ -1,46 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * - * Copyright (C) 2012 Marcin Bukat - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 1 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ - -#include - -#define RKLD_MAGIC 0x4c44524b -#define RKW_HEADER_CRC 0x40000000 -#define RKW_IMAGE_CRC 0x20000000 - -struct rkw_header_t { - uint32_t magic_number; /* Magic number. 0x4C44524B */ - uint32_t header_size; /* Size of the header */ - uint32_t image_base; /* Base address of the firmware image */ - uint32_t load_address; /* Load address */ - uint32_t load_limit; /* End of the firmware image */ - uint32_t bss_start; /* This is the start of .bss section of the firmware I suppose */ - uint32_t reserved0; /* reserved - I've seen only zeros in this field so far */ - uint32_t reserved1; /* reserved - I've seen only zeros in this field so far */ - uint32_t entry_point; /* Entry point address */ - uint32_t load_options; /* 0x80000000 - setup flag (I don't know what it means - * but is present in every RKW I saw), - * 0x40000000 - check header crc, - * 0x20000000 - check firmware crc - */ - uint32_t crc; /* crc32 of the header (excluding crc32 field itself) */ -}; - -const char *rkw_strerror(int8_t errno); -int load_rkw(unsigned char* buf, const char* filename, int buffer_size); -- cgit v1.2.3