1. I installed lybpython which provides Python.h header..:
  2. libpython3.5-dev: /usr/include/python3.5m/Python.h
  3. I compiled bl31 in debug mode:
  4. make CROSS_COMPILE=../../toolchain/gcc-linaro-aarch/bin/aarch64-linux-gnu- PLAT=sun50i_h6 DEBUG=1 bl31
  5. CC drivers/arm/gic/common/gic_common.c
  6. CC drivers/arm/gic/v2/gicv2_helpers.c
  7. CC drivers/arm/gic/v2/gicv2_main.c
  8. CC drivers/delay_timer/delay_timer.c
  9. CC drivers/delay_timer/generic_delay_timer.c
  10. CC plat/common/plat_gicv2.c
  11. CC plat/common/plat_psci_common.c
  12. CC plat/allwinner/common/sunxi_bl31_setup.c
  13. CC plat/allwinner/common/sunxi_cpu_ops.c
  14. CC plat/allwinner/common/sunxi_pm.c
  15. CC plat/allwinner/sun50i_h6/sunxi_power.c
  16. CC plat/allwinner/common/sunxi_security.c
  17. CC plat/allwinner/common/sunxi_topology.c
  18. CC bl31/bl31_main.c
  19. CC bl31/interrupt_mgmt.c
  20. CC bl31/bl31_context_mgmt.c
  21. CC common/runtime_svc.c
  22. CC services/arm_arch_svc/arm_arch_svc_setup.c
  23. CC services/std_svc/std_svc_setup.c
  24. CC lib/el3_runtime/cpu_data_array.c
  25. CC lib/el3_runtime/aarch64/context_mgmt.c
  26. CC lib/cpus/errata_report.c
  27. CC lib/psci/psci_off.c
  28. CC lib/psci/psci_on.c
  29. CC lib/psci/psci_suspend.c
  30. CC lib/psci/psci_common.c
  31. CC lib/psci/psci_main.c
  32. CC lib/psci/psci_setup.c
  33. CC lib/psci/psci_system_off.c
  34. CC lib/psci/psci_mem_protect.c
  35. CC lib/locks/bakery/bakery_lock_normal.c
  36. CC lib/extensions/spe/spe.c
  37. CC lib/extensions/sve/sve.c
  38. CC common/bl_common.c
  39. CC common/tf_log.c
  40. CC drivers/console/multi_console.c
  41. CC plat/common/plat_bl_common.c
  42. CC plat/common/plat_log_common.c
  43. CC plat/common/aarch64/plat_common.c
  44. CC common/backtrace/backtrace.c
  45. CC lib/xlat_tables_v2/aarch64/xlat_tables_arch.c
  46. CC lib/xlat_tables_v2/xlat_tables_context.c
  47. CC lib/xlat_tables_v2/xlat_tables_core.c
  48. CC lib/xlat_tables_v2/xlat_tables_utils.c
  49. CC plat/allwinner/common/sunxi_common.c
  50. CC drivers/mentor/i2c/mi2cv.c
  51. AS lib/cpus/aarch64/cortex_a53.S
  52. AS bl31/aarch64/bl31_entrypoint.S
  53. AS bl31/aarch64/crash_reporting.S
  54. AS bl31/aarch64/ea_delegate.S
  55. AS bl31/aarch64/runtime_exceptions.S
  56. AS lib/cpus/aarch64/dsu_helpers.S
  57. AS plat/common/aarch64/platform_mp_stack.S
  58. AS lib/el3_runtime/aarch64/cpu_data.S
  59. AS lib/cpus/aarch64/cpu_helpers.S
  60. AS lib/locks/exclusive/aarch64/spinlock.S
  61. AS lib/psci/aarch64/psci_helpers.S
  62. AS lib/el3_runtime/aarch64/context.S
  63. AS lib/cpus/aarch64/wa_cve_2017_5715_bpiall.S
  64. AS lib/cpus/aarch64/wa_cve_2017_5715_mmu.S
  65. AS common/aarch64/debug.S
  66. AS lib/aarch64/cache_helpers.S
  67. AS lib/aarch64/misc_helpers.S
  68. AS plat/common/aarch64/platform_helpers.S
  69. AS drivers/ti/uart/aarch64/16550_console.S
  70. AS lib/xlat_tables_v2/aarch64/enable_mmu.S
  71. AS plat/allwinner/common/plat_helpers.S
  72. PP bl31/bl31.ld.S
  73. CC lib/libfdt/fdt.c
  74. CC lib/libfdt/fdt_addresses.c
  75. CC lib/libfdt/fdt_empty_tree.c
  76. CC lib/libfdt/fdt_ro.c
  77. CC lib/libfdt/fdt_rw.c
  78. CC lib/libfdt/fdt_strerror.c
  79. CC lib/libfdt/fdt_sw.c
  80. CC lib/libfdt/fdt_wip.c
  81. AR build/sun50i_h6/debug/lib/libfdt.a
  82. CC lib/libc/abort.c
  83. CC lib/libc/assert.c
  84. CC lib/libc/exit.c
  85. CC lib/libc/memchr.c
  86. CC lib/libc/memcmp.c
  87. CC lib/libc/memcpy.c
  88. CC lib/libc/memmove.c
  89. CC lib/libc/memset.c
  90. CC lib/libc/printf.c
  91. CC lib/libc/putchar.c
  92. CC lib/libc/puts.c
  93. CC lib/libc/snprintf.c
  94. CC lib/libc/strchr.c
  95. CC lib/libc/strcmp.c
  96. CC lib/libc/strlcpy.c
  97. CC lib/libc/strlen.c
  98. CC lib/libc/strncmp.c
  99. CC lib/libc/strnlen.c
  100. CC lib/libc/strrchr.c
  101. AS lib/libc/aarch64/setjmp.S
  102. AR build/sun50i_h6/debug/lib/libc.a
  103. LD build/sun50i_h6/debug/bl31/bl31.elf
  104. BIN build/sun50i_h6/debug/bl31.bin
  105. Built build/sun50i_h6/debug/bl31.bin successfully
  106. OD build/sun50i_h6/debug/bl31/bl31.dump
  107. Then copy 'build/sun50i_h6/debug/bl31.bin' to root ubbot folder, and then tried to compile it with:
  108. make CROSS_COMPILE=../toolchain/gcc-linaro-aarch/bin/aarch64-linux-gnu- -I/usr/include/python3.5m -j4
  109. make CROSS_COMPILE=../toolchain/gcc-linaro-aarch/bin/aarch64-linux-gnu- -j4
  110. The Error is always the Same, related with Python.h header file..
  111. CHK include/config/uboot.release
  112. CHK include/generated/timestamp_autogenerated.h
  113. ./"board/sunxi/mksunxi_fit_atf.sh" \
  114. arch/arm/dts/sun50i-h6-orangepi-one-plus.dtb > u-boot.its
  115. HOSTCC scripts/basic/fixdep
  116. UPD include/generated/timestamp_autogenerated.h
  117. CHK include/generated/version_autogenerated.h
  118. CHK include/config.h
  119. CFG u-boot.cfg
  120. CC lib/asm-offsets.s
  121. CC arch/arm/lib/asm-offsets.s
  122. HOSTCC scripts/dtc/dtc.o
  123. PYMOD scripts/dtc/pylibfdt/_libfdt.so
  124. CHK include/generated/generic-asm-offsets.h
  125. CHK include/generated/asm-offsets.h
  126. HOSTCC scripts/dtc/flattree.o
  127. HOSTCC scripts/dtc/fstree.o
  128. HOSTCC scripts/dtc/data.o
  129. HOSTCC scripts/dtc/livetree.o
  130. HOSTCC scripts/dtc/treesource.o
  131. HOSTCC scripts/dtc/srcpos.o
  132. HOSTCC scripts/dtc/checks.o
  133. HOSTCC scripts/dtc/util.o
  134. LEX scripts/dtc/dtc-lexer.lex.c
  135. YACC scripts/dtc/dtc-parser.tab.h
  136. YACC scripts/dtc/dtc-parser.tab.c
  137. HOSTCC scripts/dtc/dtc-lexer.lex.o
  138. HOSTCC scripts/dtc/dtc-parser.tab.o
  139. LDS u-boot.lds
  140. HOSTLD scripts/dtc/dtc
  141. scripts/dtc/pylibfdt/libfdt_wrap.c:149:21: fatal error: Python.h: No such file or directory
  142. # include <Python.h>
  143. ^
  144. compilation terminated.
  145. error: command 'cc' failed with exit status 1
  146. scripts/dtc/pylibfdt/Makefile:27: recipe for target 'scripts/dtc/pylibfdt/_libfdt.so' failed
  147. make[3]: *** [scripts/dtc/pylibfdt/_libfdt.so] Error 1
  148. scripts/Makefile.build:434: recipe for target 'scripts/dtc/pylibfdt' failed
  149. make[2]: *** [scripts/dtc/pylibfdt] Error 2
  150. scripts/Makefile.build:434: recipe for target 'scripts/dtc' failed
  151. make[1]: *** [scripts/dtc] Error 2
  152. Makefile:508: recipe for target 'scripts' failed
  153. make: *** [scripts] Error 2
  154. SO, if fails trying to make:
  155. scripts/dtc/pylibfdt/Makefile
  156. on target:
  157. $(obj)/_libfdt.so
  158. And I have no way to tell him via -I were is the Python.h header.. :(

Problems Compiling Uboot( after compiling BL31 )

Comments powered by Disqus