mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
refactor: Renamed WITH_NO_COMPRESSION to WITH_COMPRESSION for consistent style
This commit is contained in:
parent
28076af96d
commit
80b9f6bb4d
4 changed files with 9 additions and 9 deletions
|
@ -224,7 +224,7 @@ else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(OBJDIR)/fullimage.elf: $(OBJDIR)/fullimage.stage1.elf $(OBJDIR)/fullimage.data.bin.z
|
$(OBJDIR)/fullimage.elf: $(OBJDIR)/fullimage.stage1.elf $(OBJDIR)/fullimage.data.bin.z
|
||||||
ifeq (,$(findstring WITH_NO_COMPRESSION,$(APP_CFLAGS)))
|
ifneq (,$(findstring WITH_COMPRESSION,$(APP_CFLAGS)))
|
||||||
$(info [=] LD $@)
|
$(info [=] LD $@)
|
||||||
$(Q)$(CROSS_OBJCOPY) -O elf32-littlearm -I elf32-littlearm --strip-all --update-section .data=$(OBJDIR)/fullimage.data.bin.z $(OBJDIR)/fullimage.stage1.elf $@
|
$(Q)$(CROSS_OBJCOPY) -O elf32-littlearm -I elf32-littlearm --strip-all --update-section .data=$(OBJDIR)/fullimage.data.bin.z $(OBJDIR)/fullimage.stage1.elf $@
|
||||||
else
|
else
|
||||||
|
|
|
@ -267,7 +267,7 @@ void ReadMem(int addr) {
|
||||||
/* osimage version information is linked in, cf commonutil.h */
|
/* osimage version information is linked in, cf commonutil.h */
|
||||||
/* bootrom version information is pointed to from _bootphase1_version_pointer */
|
/* bootrom version information is pointed to from _bootphase1_version_pointer */
|
||||||
extern uint32_t _bootphase1_version_pointer[], _flash_start[], _flash_end[], __data_src_start__[];
|
extern uint32_t _bootphase1_version_pointer[], _flash_start[], _flash_end[], __data_src_start__[];
|
||||||
#ifdef WITH_NO_COMPRESSION
|
#ifndef WITH_COMPRESSION
|
||||||
extern uint32_t _bootrom_end[], _bootrom_start[], __os_size__[];
|
extern uint32_t _bootrom_end[], _bootrom_start[], __os_size__[];
|
||||||
#endif
|
#endif
|
||||||
static void SendVersion(void) {
|
static void SendVersion(void) {
|
||||||
|
@ -311,7 +311,7 @@ static void SendVersion(void) {
|
||||||
strncat(VersionString, "\n ", sizeof(VersionString) - strlen(VersionString) - 1);
|
strncat(VersionString, "\n ", sizeof(VersionString) - strlen(VersionString) - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifndef WITH_NO_COMPRESSION
|
#ifdef WITH_COMPRESSION
|
||||||
// Send Chip ID and used flash memory
|
// Send Chip ID and used flash memory
|
||||||
uint32_t text_and_rodata_section_size = (uint32_t)__data_src_start__ - (uint32_t)_flash_start;
|
uint32_t text_and_rodata_section_size = (uint32_t)__data_src_start__ - (uint32_t)_flash_start;
|
||||||
uint32_t compressed_data_section_size = g_common_area.arg1;
|
uint32_t compressed_data_section_size = g_common_area.arg1;
|
||||||
|
@ -326,7 +326,7 @@ static void SendVersion(void) {
|
||||||
|
|
||||||
struct p payload;
|
struct p payload;
|
||||||
payload.id = *(AT91C_DBGU_CIDR);
|
payload.id = *(AT91C_DBGU_CIDR);
|
||||||
#ifdef WITH_NO_COMPRESSION
|
#ifndef WITH_COMPRESSION
|
||||||
payload.section_size = (uint32_t)_bootrom_end - (uint32_t)_bootrom_start + (uint32_t)__os_size__;
|
payload.section_size = (uint32_t)_bootrom_end - (uint32_t)_bootrom_start + (uint32_t)__os_size__;
|
||||||
#else
|
#else
|
||||||
payload.section_size = text_and_rodata_section_size + compressed_data_section_size;
|
payload.section_size = text_and_rodata_section_size + compressed_data_section_size;
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
#include "proxmark3_arm.h"
|
#include "proxmark3_arm.h"
|
||||||
#include "appmain.h"
|
#include "appmain.h"
|
||||||
#ifndef WITH_NO_COMPRESSION
|
#ifdef WITH_COMPRESSION
|
||||||
#include "lz4.h"
|
#include "lz4.h"
|
||||||
#endif
|
#endif
|
||||||
#include "BigBuf.h"
|
#include "BigBuf.h"
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
extern common_area_t g_common_area;
|
extern common_area_t g_common_area;
|
||||||
extern uint32_t __data_src_start__[], __data_start__[], __data_end__[], __bss_start__[], __bss_end__[];
|
extern uint32_t __data_src_start__[], __data_start__[], __data_end__[], __bss_start__[], __bss_end__[];
|
||||||
|
|
||||||
#ifndef WITH_NO_COMPRESSION
|
#ifdef WITH_COMPRESSION
|
||||||
static void uncompress_data_section(void) {
|
static void uncompress_data_section(void) {
|
||||||
int avail_in;
|
int avail_in;
|
||||||
memcpy(&avail_in, __data_src_start__, sizeof(int));
|
memcpy(&avail_in, __data_src_start__, sizeof(int));
|
||||||
|
@ -68,7 +68,7 @@ void Vector(void) {
|
||||||
g_common_area.flags.osimage_present = 1;
|
g_common_area.flags.osimage_present = 1;
|
||||||
|
|
||||||
/* Set up data segment: Copy from flash to ram */
|
/* Set up data segment: Copy from flash to ram */
|
||||||
#ifdef WITH_NO_COMPRESSION
|
#ifndef WITH_COMPRESSION
|
||||||
uint32_t *data_src = __data_src_start__;
|
uint32_t *data_src = __data_src_start__;
|
||||||
uint32_t *data_dst = __data_start__;
|
uint32_t *data_dst = __data_start__;
|
||||||
while (data_dst < __data_end__) *data_dst++ = *data_src++;
|
while (data_dst < __data_end__) *data_dst++ = *data_src++;
|
||||||
|
|
|
@ -228,8 +228,8 @@ endif
|
||||||
ifneq ($(SKIP_HFPLOT),1)
|
ifneq ($(SKIP_HFPLOT),1)
|
||||||
PLATFORM_DEFS += -DWITH_HFPLOT
|
PLATFORM_DEFS += -DWITH_HFPLOT
|
||||||
endif
|
endif
|
||||||
ifeq ($(SKIP_COMPRESSION),1)
|
ifneq ($(SKIP_COMPRESSION),1)
|
||||||
PLATFORM_DEFS += -DWITH_NO_COMPRESSION
|
PLATFORM_DEFS += -DWITH_COMPRESSION
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Standalone mode
|
# Standalone mode
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue