. lib/fdtdec.c

1    int fdtdec_prepare_fdt(void)
2    {
3            if (!gd->fdt_blob || ((uintptr_t)gd->fdt_blob & 3) ||
4                fdt_check_header(gd->fdt_blob)) {
5    #ifdef CONFIG_SPL_BUILD
6                    puts("Missing DTB\n");
7    #else   
8                    puts("No valid device tree binary found - please append one to U-Boot binary, use u-boot-dtb.bin or define CONFIG_OF_EMBED. For sandbox, use -d <file.dtb>\n");
9    # ifdef DEBUG
10                    if (gd->fdt_blob) {
11                            printf("fdt_blob=%p\n", gd->fdt_blob);
12                            print_buffer((ulong)gd->fdt_blob, gd->fdt_blob, 4,
13                                         32, 0);
14                    }
15    # endif
16    #endif
17                    return -1;
18            }
19            return 0;
20    }
  • 3번 줄의 if문에서 gd->fdt_blob가 NULL인지 ((uintptr_t)gd->fdt_blob가 4byte 정렬이 되어 있는지 fdt_check_header(gd->fdt_blob)함수의 반환값이 참인지 확인합니다. 정상적인 경우라면 이 if문은 수행되지 않습니다. 그래서 fdtdec_prepare_fdt함수는 아무것도 수행하지 않습니다.

results matching ""

    No results matching ""