1.1 --- a/stage2/stage2.c Fri Jun 12 01:33:55 2015 +0200
1.2 +++ b/stage2/stage2.c Fri Jun 12 01:38:00 2015 +0200
1.3 @@ -31,6 +31,7 @@
1.4 /* Relocate object locations. */
1.5
1.6 volatile unsigned int start_addr, got_start, got_end, addr, offset;
1.7 + volatile int started;
1.8
1.9 /* get absolute start address */
1.10 __asm__ __volatile__(
1.11 @@ -59,10 +60,13 @@
1.12
1.13 /* The actual work. */
1.14
1.15 - gpio_init2();
1.16 - cpm_init();
1.17 - rtc_init();
1.18 - timer_init();
1.19 + started = is_started();
1.20 + if (!started) {
1.21 + gpio_init2();
1.22 + cpm_init();
1.23 + rtc_init();
1.24 + timer_init();
1.25 + }
1.26 lcd_init();
1.27 while (1);
1.28 }