.
common/board\_f.c
1 void board_init_f(ulong boot_flags)
2 {
3 #ifdef CONFIG_SYS_GENERIC_GLOBAL_DATA
4 /*
5 * For some architectures, global data is initialized and used before
6 * calling this function. The data should be preserved. For others,
7 * CONFIG_SYS_GENERIC_GLOBAL_DATA should be defined and use the stack
8 * here to host global data until relocation.
9 */
10 gd_t data;
11
12 gd = &data;
13
14 /*
15 * Clear global data before it is accessed at debug print
16 * in initcall_run_list. Otherwise the debug print probably
17 * get the wrong value of gd->have_console.
18 */
19 zero_global_data();
20 #endif
21
22 gd->flags = boot_flags;
23 gd->have_console = 0;
24
25 if (initcall_run_list(init_sequence_f))
26 hang();
27
28 #if !defined(CONFIG_ARM) && !defined(CONFIG_SANDBOX) && \
29 !defined(CONFIG_EFI_APP)
30 /* NOTREACHED - jump_to_copy() does not return */
31 hang();
32 #endif
33 }
- 1번 줄의 인자
boot_flags
의 값은 0입니다. - 3번 줄의
CONFIG_SYS_GENERIC_GLOBAL_DATA
은 정의도어 있지 않아 if문은 수행되지 않습니다. - 22번 줄의
gd->flags
를 0으로 초기화합니다. - 25번 줄의
initcall_run_list
은init_sequence_f
에 list되어 있는 함수를 실행시킵니다. 모든 함수가 제대로 수행되면 0을 return하여 hang()이 수행되지 않습니다. - 28번 줄의 if문에서 라즈베리 파이3는 arm이기 때문에 hang함수는 수행되지 않습니다.
. .