mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-09-20 07:16:14 +08:00
refactor: Renamed WITH_NO_COMPRESSION to WITH_COMPRESSION for consistent style
This commit is contained in:
parent
28076af96d
commit
80b9f6bb4d
|
@ -224,7 +224,7 @@ else
|
|||
endif
|
||||
|
||||
$(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 $@)
|
||||
$(Q)$(CROSS_OBJCOPY) -O elf32-littlearm -I elf32-littlearm --strip-all --update-section .data=$(OBJDIR)/fullimage.data.bin.z $(OBJDIR)/fullimage.stage1.elf $@
|
||||
else
|
||||
|
|
|
@ -267,7 +267,7 @@ void ReadMem(int addr) {
|
|||
/* osimage version information is linked in, cf commonutil.h */
|
||||
/* bootrom version information is pointed to from _bootphase1_version_pointer */
|
||||
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__[];
|
||||
#endif
|
||||
static void SendVersion(void) {
|
||||
|
@ -311,7 +311,7 @@ static void SendVersion(void) {
|
|||
strncat(VersionString, "\n ", sizeof(VersionString) - strlen(VersionString) - 1);
|
||||
}
|
||||
}
|
||||
#ifndef WITH_NO_COMPRESSION
|
||||
#ifdef WITH_COMPRESSION
|
||||
// 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 compressed_data_section_size = g_common_area.arg1;
|
||||
|
@ -326,7 +326,7 @@ static void SendVersion(void) {
|
|||
|
||||
struct p payload;
|
||||
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__;
|
||||
#else
|
||||
payload.section_size = text_and_rodata_section_size + compressed_data_section_size;
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#include "proxmark3_arm.h"
|
||||
#include "appmain.h"
|
||||
#ifndef WITH_NO_COMPRESSION
|
||||
#ifdef WITH_COMPRESSION
|
||||
#include "lz4.h"
|
||||
#endif
|
||||
#include "BigBuf.h"
|
||||
|
@ -33,7 +33,7 @@
|
|||
extern common_area_t g_common_area;
|
||||
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) {
|
||||
int avail_in;
|
||||
memcpy(&avail_in, __data_src_start__, sizeof(int));
|
||||
|
@ -68,7 +68,7 @@ void Vector(void) {
|
|||
g_common_area.flags.osimage_present = 1;
|
||||
|
||||
/* 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_dst = __data_start__;
|
||||
while (data_dst < __data_end__) *data_dst++ = *data_src++;
|
||||
|
|
|
@ -228,8 +228,8 @@ endif
|
|||
ifneq ($(SKIP_HFPLOT),1)
|
||||
PLATFORM_DEFS += -DWITH_HFPLOT
|
||||
endif
|
||||
ifeq ($(SKIP_COMPRESSION),1)
|
||||
PLATFORM_DEFS += -DWITH_NO_COMPRESSION
|
||||
ifneq ($(SKIP_COMPRESSION),1)
|
||||
PLATFORM_DEFS += -DWITH_COMPRESSION
|
||||
endif
|
||||
|
||||
# Standalone mode
|
||||
|
|
Loading…
Reference in a new issue