Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add INIT_ATTR to system_init()

On single-core targets, system_init() is only called from init()
in main.c, which is also INIT_ATTR, so this is safe.

Multi-core targets additionally call system_init() from cop_main(),
which isn't marked INIT_ATTR. I'm fairly certain that it would be
safe to add INIT_ATTR to cop_main() with a bit of refactoring, but
I don't have a way of testing it. So for now, leave INIT_ATTR off
for multi-core targets.

Change-Id: I8fe4358f975880ca317d46bda01d7d9db529d3e3

+7 -1
+6
firmware/export/system.h
··· 31 31 /* Called from any UIE handler and panicf - wait for a key and return 32 32 * to reboot system. */ 33 33 extern void system_exception_wait(void); 34 + 35 + #if NUM_CORES == 1 36 + extern void system_init(void) INIT_ATTR; 37 + #else 38 + /* TODO: probably safe to use INIT_ATTR on multicore but this needs checking */ 34 39 extern void system_init(void); 40 + #endif 35 41 36 42 extern long cpu_frequency; 37 43
+1 -1
firmware/target/arm/imx31/gigabeat-s/system-gigabeat-s.c
··· 199 199 system_halt(); 200 200 } 201 201 202 - void INIT_ATTR system_init(void) 202 + void system_init(void) 203 203 { 204 204 static const enum IMX31_CG_LIST disable_clocks[] INITDATA_ATTR = 205 205 {