Fork of the vendor (Boundary Devices) u-boot for Reform 2, with minor tweaks. The goal is to migrate to mainstream u-boot or barebox ASAP. The main impediment so far is the 4GB RAM config.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
1.8KB

  1. #
  2. # Kbuild for top-level directory of U-Boot
  3. # This file takes care of the following:
  4. # 1) Generate generic-asm-offsets.h
  5. # 2) Generate asm-offsets.h
  6. # Default sed regexp - multiline due to syntax constraints
  7. define sed-y
  8. "s:[[:space:]]*\.ascii[[:space:]]*\"\(.*\)\":\1:; \
  9. /^->/{s:->#\(.*\):/* \1 */:; \
  10. s:^->\([^ ]*\) [\$$#]*\([-0-9]*\) \(.*\):#define \1 \2 /* \3 */:; \
  11. s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \
  12. s:->::; p;}"
  13. endef
  14. # Use filechk to avoid rebuilds when a header changes, but the resulting file
  15. # does not
  16. define filechk_offsets
  17. (set -e; \
  18. echo "#ifndef $2"; \
  19. echo "#define $2"; \
  20. echo "/*"; \
  21. echo " * DO NOT MODIFY."; \
  22. echo " *"; \
  23. echo " * This file was generated by Kbuild"; \
  24. echo " */"; \
  25. echo ""; \
  26. sed -ne $(sed-y); \
  27. echo ""; \
  28. echo "#endif" )
  29. endef
  30. #####
  31. # 1) Generate generic-asm-offsets.h
  32. generic-offsets-file := include/generated/generic-asm-offsets.h
  33. always := $(generic-offsets-file)
  34. targets := lib/asm-offsets.s
  35. # We use internal kbuild rules to avoid the "is up to date" message from make
  36. lib/asm-offsets.s: lib/asm-offsets.c FORCE
  37. $(Q)mkdir -p $(dir $@)
  38. $(call if_changed_dep,cc_s_c)
  39. $(obj)/$(generic-offsets-file): lib/asm-offsets.s FORCE
  40. $(call filechk,offsets,__GENERIC_ASM_OFFSETS_H__)
  41. #####
  42. # 2) Generate asm-offsets.h
  43. #
  44. ifneq ($(wildcard $(srctree)/arch/$(ARCH)/lib/asm-offsets.c),)
  45. offsets-file := include/generated/asm-offsets.h
  46. endif
  47. always += $(offsets-file)
  48. targets += arch/$(ARCH)/lib/asm-offsets.s
  49. CFLAGS_asm-offsets.o := -DDO_DEPS_ONLY
  50. # We use internal kbuild rules to avoid the "is up to date" message from make
  51. arch/$(ARCH)/lib/asm-offsets.s: arch/$(ARCH)/lib/asm-offsets.c FORCE
  52. $(Q)mkdir -p $(dir $@)
  53. $(call if_changed_dep,cc_s_c)
  54. $(obj)/$(offsets-file): arch/$(ARCH)/lib/asm-offsets.s FORCE
  55. $(call filechk,offsets,__ASM_OFFSETS_H__)