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.
 
 
 
 
 
 

53 lines
1.2 KiB

  1. #!/bin/sh
  2. # Generates a small Makefile used in the root of the output
  3. # directory, to allow make to be started from there.
  4. # The Makefile also allow for more convinient build of external modules
  5. # Usage
  6. # $1 - Kernel src directory
  7. # $2 - Output directory
  8. # $3 - version
  9. # $4 - patchlevel
  10. test ! -r $2/Makefile -o -O $2/Makefile || exit 0
  11. # Only overwrite automatically generated Makefiles
  12. # (so we do not overwrite kernel Makefile)
  13. if test -e $2/Makefile && ! grep -q Automatically $2/Makefile
  14. then
  15. exit 0
  16. fi
  17. if [ "${quiet}" != "silent_" ]; then
  18. echo " GEN $2/Makefile"
  19. fi
  20. cat << EOF > $2/Makefile
  21. # Automatically generated by $0: don't edit
  22. VERSION = $3
  23. PATCHLEVEL = $4
  24. lastword = \$(word \$(words \$(1)),\$(1))
  25. makedir := \$(dir \$(call lastword,\$(MAKEFILE_LIST)))
  26. ifeq ("\$(origin V)", "command line")
  27. VERBOSE := \$(V)
  28. endif
  29. ifneq (\$(VERBOSE),1)
  30. Q := @
  31. endif
  32. MAKEARGS := -C $1
  33. MAKEARGS += O=\$(if \$(patsubst /%,,\$(makedir)),\$(CURDIR)/)\$(patsubst %/,%,\$(makedir))
  34. MAKEFLAGS += --no-print-directory
  35. .PHONY: __sub-make \$(MAKECMDGOALS)
  36. __sub-make:
  37. \$(Q)\$(MAKE) \$(MAKEARGS) \$(MAKECMDGOALS)
  38. \$(filter-out __sub-make, \$(MAKECMDGOALS)): __sub-make
  39. @:
  40. EOF