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.
 
 
 
 
 
 

22 lines
528 B

  1. #!/bin/sh
  2. #
  3. # dtc-version dtc-command
  4. #
  5. # Prints the dtc version of `dtc-command' in a canonical 6-digit form
  6. # such as `010404' for dtc 1.4.4
  7. #
  8. dtc="$*"
  9. if [ ${#dtc} -eq 0 ]; then
  10. echo "Error: No dtc command specified."
  11. printf "Usage:\n\t$0 <dtc-command>\n"
  12. exit 1
  13. fi
  14. MAJOR=$($dtc -v | head -1 | awk '{print $NF}' | cut -d . -f 1)
  15. MINOR=$($dtc -v | head -1 | awk '{print $NF}' | cut -d . -f 2)
  16. PATCH=$($dtc -v | head -1 | awk '{print $NF}' | cut -d . -f 3 | cut -d - -f 1)
  17. printf "%02d%02d%02d\\n" $MAJOR $MINOR $PATCH