.

lib/fdtdec.c

1    int fdtdec_setup(void)
2    {
3    #if CONFIG_IS_ENABLED(OF_CONTROL)
4    # ifdef CONFIG_OF_EMBED
5            /* Get a pointer to the FDT */
6            gd->fdt_blob = __dtb_dt_begin;
7    # elif defined CONFIG_OF_SEPARATE
8    #  ifdef CONFIG_SPL_BUILD
9            /* FDT is at end of BSS unless it is in a different memory region */
10            if (IS_ENABLED(CONFIG_SPL_SEPARATE_BSS))
11                    gd->fdt_blob = (ulong *)&_image_binary_end;
12            else
13                    gd->fdt_blob = (ulong *)&__bss_end;
14    #  else
15            /* FDT is at end of image */
16            gd->fdt_blob = (ulong *)&_end;
17    #  endif
18    # elif defined(CONFIG_OF_HOSTFILE)
19            if (sandbox_read_fdt_from_file()) {
20                    puts("Failed to read control FDT\n");
21                    return -1;
22            }
23    # endif
24    # ifndef CONFIG_SPL_BUILD
25            /* Allow the early environment to override the fdt address */
26            gd->fdt_blob = (void *)getenv_ulong("fdtcontroladdr", 16,
27                                                    (uintptr_t)gd->fdt_blob);
28    # endif
29    #endif
30            return fdtdec_prepare_fdt();
31    }
  • 3번 줄의 if문을 수행하지만 CONFIG_OF_EMBED이 선언되어 있기 때문에 6번줄 이외에는 수행되지 않습니다.
  • 24번 줄의 CONFIG_SPL_BUILD이 선언되어 있지 않아 26번 줄의 getenv_ulong이 실행되어 리턴값이 gd->fdt_blob에 저장됩니다.
  • 마지막으로 30번 줄의 fdtdec_prepare_fdt함수가 실행되어 그 리턴값이 리턴됩니다.

results matching ""

    No results matching ""