Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a9f57e6

Browse files
committed
eboot rebuild + fix .ld inconsistency
1 parent d2e1f8b commit a9f57e6

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

‎bootloaders/eboot/Makefile‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ OBJDUMP := $(XTENSA_TOOLCHAIN)xtensa-lx106-elf-objdump
2121

2222
INC += -I../../tools/sdk/include -I../../tools/sdk/uzlib/src
2323

24-
CFLAGS += -std=gnu17
24+
CFLAGS += -std=gnu23
2525

2626
CFLAGS += -Os -fcommon -g -Wall -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mno-text-section-literals -ffunction-sections -fdata-sections -free -fipa-pta
2727

@@ -47,7 +47,7 @@ tinfgzip.o: $(UZLIB_PATH)/tinfgzip.c $(UZLIB_PATH)/uzlib.h $(UZLIB_PATH)/uzlib_c
4747
$(CC) $(CFLAGS) -c -o tinfgzip.o $(UZLIB_PATH)/tinfgzip.c
4848

4949
$(APP_AR): $(TARGET_OBJ_PATHS) tinflate.o tinfgzip.o Makefile
50-
$(AR) cru $@ $^
50+
$(AR) Dcr $@ $^
5151

5252
$(APP_OUT): $(APP_AR) eboot.ld | Makefile
5353
$(LD) $(LD_SCRIPT) $(LDFLAGS) -Wl,--start-group -Wl,--sort-common $(APP_AR) -Wl,--end-group -o $@

‎bootloaders/eboot/eboot.c‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ extern void ets_wdt_enable(uint32_t mode, uint32_t arg1, uint32_t arg2);
5151
*/
5252
extern uint32_t ets_wdt_disable(void);
5353

54+
/* See tools/sdk/ld/eagle.rom.addr.v6.ld */
55+
extern int rom_memcmp (const void *, const void *, size_t);
56+
5457
int print_version(const uint32_t flash_addr)
5558
{
5659
uint32_t ver;
@@ -205,7 +208,7 @@ int copy_raw(const uint32_t src_addr,
205208
if (SPIRead(daddr, buffer2, buffer_size)) {
206209
return 4;
207210
}
208-
if (memcmp(buffer, buffer2, buffer_size)) {
211+
if (rom_memcmp(buffer, buffer2, buffer_size)) {
209212
return 9;
210213
}
211214
} else {
@@ -216,7 +219,7 @@ int copy_raw(const uint32_t src_addr,
216219
if (SPIRead(daddr, buffer2, buffer_size)) {
217220
return 4;
218221
}
219-
if (!memcmp(buffer2, buffer, buffer_size)) {
222+
if (!rom_memcmp(buffer2, buffer, buffer_size)) {
220223
ets_putc('B'); // Note we skipped the bootloader in output
221224
skip = true; // And skip erase/write
222225
}

‎bootloaders/eboot/eboot.elf‎

-2.05 KB
Binary file not shown.

‎bootloaders/eboot/rom.ld‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ PROVIDE ( mem_malloc = 0x40001b40 );
188188
PROVIDE ( mem_realloc = 0x40001c6c );
189189
PROVIDE ( mem_trim = 0x40001a14 );
190190
PROVIDE ( mem_zalloc = 0x40001c58 );
191-
PROVIDE ( memcmp = 0x4000dea8 );
191+
PROVIDE ( rom_memcmp = 0x4000dea8 );
192192
PROVIDE ( memcpy = 0x4000df48 );
193193
PROVIDE ( memmove = 0x4000e04c );
194194
PROVIDE ( memset = 0x4000e190 );

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /