Advertisement
Guest User

GMAC_DELAY_TEST

a guest
Jun 1st, 2015
360
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 3.72 KB | None | 0 0
  1. diff --git a/common.sh b/common.sh
  2. index 021a98c..3a6b068 100644
  3. --- a/common.sh
  4. +++ b/common.sh
  5. @@ -89,7 +89,7 @@ else
  6.  fi
  7.  # create .deb package
  8.  #
  9. -CHOOSEN_UBOOT="linux-u-boot-$VER-"$BOARD"_"$REVISION"_armhf"
  10. +CHOOSEN_UBOOT="linux-u-boot-"$BOARD"_"$REVISION"_${TX}_${RX}_armhf"
  11.  UBOOT_PCK="linux-u-boot-$VER-"$BOARD
  12.  mkdir -p $DEST/output/u-boot/$CHOOSEN_UBOOT/usr/lib/$CHOOSEN_UBOOT
  13.  mkdir -p $DEST/output/u-boot/$CHOOSEN_UBOOT/DEBIAN
  14. diff --git a/main.sh b/main.sh
  15. index 0cc1494..6da98ea 100644
  16. --- a/main.sh
  17. +++ b/main.sh
  18. @@ -170,6 +170,51 @@ patching_sources
  19.  # What are we building
  20.  grab_kernel_version
  21.  
  22. +# check whether we should just build a bunch of u-boot versions to
  23. +# brute-force all available GMAC TX/RX delay variations.
  24. +if [ "X${GMAC_DELAY_TEST}" == "Xyes" ]; then
  25. +       for TX in 0 1 2 3 4 5 6 7 ; do
  26. +               for RX in 0 ; do
  27. +                       CHOOSEN_UBOOT="linux-u-boot-${VER}-${BOARD}_${REVISION}_${TX}_${RX}_armhf"
  28. +                       UBOOT_PCK="linux-u-boot-$VER-"$BOARD
  29. +                       # search defconfig file for $BOARD
  30. +                       Defconfig="$(grep -i -- "-${BOARD}.dtb" ${DEST}/u-boot/configs/*_defconfig)"
  31. +                       if [ ! -f "${Defconfig}" ]; then
  32. +                               case ${BOARD} in
  33. +                                       aw-som-a20)
  34. +                                               Defconfig="${DEST}/u-boot/configs/Awsom_defconfig"
  35. +                                               ;;
  36. +                                       cubieboard2)
  37. +                                               Defconfig="${DEST}/u-boot/configs/Cubieboard2_defconfig"        
  38. +                                               ;;
  39. +                                       lime)
  40. +                                               Defconfig="${DEST}/u-boot/configs/A20-OLinuXino-Lime_defconfig"
  41. +                                               ;;
  42. +                                       micro)
  43. +                                               Defconfig="${DEST}/u-boot/configs/A20-OLinuXino_MICRO_defconfig"
  44. +                                               ;;
  45. +                                       bananapipro)
  46. +                                               Defconfig="${DEST}/u-boot/configs/Bananapro_defconfig"
  47. +                                                ;;
  48. +                                       udoo*)
  49. +                                               Defconfig="${DEST}/u-boot/configs/udoo_quad_defconfig"
  50. +                                               ;;
  51. +                               esac
  52. +                       fi
  53. +
  54. +                       # patch defconfig with appropriate tx/rx values
  55. +                       MyTmpFile="$(mktemp /tmp/gmac_test.XXXXXX || exit 1)"
  56. +                       trap "cd /tmp; rm -f \"${MyTmpFile}\"; exit 0" 0 1 2 3 15
  57. +                       grep -v CONFIG_GMAC_TX_DELAY "${Defconfig}" | grep -v CONFIG_GMAC_RX_DELAY >"${MyTmpFile}"
  58. +                       cat "${MyTmpFile}" >"${Defconfig}"
  59. +                       echo -e "CONFIG_GMAC_TX_DELAY=${TX}\nCONFIG_GMAC_RX_DELAY=${RX}" >>"${Defconfig}"
  60. +
  61. +                       compile_uboot
  62. +               done
  63. +       done
  64. +       exit 0
  65. +fi
  66. +
  67.  #--------------------------------------------------------------------------------------------------------------------------------
  68.  # Compile source or choose already packed kernel
  69.  #--------------------------------------------------------------------------------------------------------------------------------
  70. @@ -256,4 +301,4 @@ closing_image
  71.  
  72.  end=`date +%s`
  73.  runtime=$(((end-start)/60))
  74. -echo -e "[\e[0;32m ok \x1B[0m] Runtime $runtime min"
  75. \ No newline at end of file
  76. +echo -e "[\e[0;32m ok \x1B[0m] Runtime $runtime min"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement