Advertisement
Guest User

GMAC_DELAY_TEST RX/TXC

a guest
Jun 1st, 2015
357
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 4.27 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..d963037 100644
  16. --- a/main.sh
  17. +++ b/main.sh
  18. @@ -152,8 +152,8 @@ if [ "$FORCE" = "yes" ]; then
  19.         FORCE=""
  20.  fi
  21.  
  22. -fetch_from_github "$BOOTLOADER" "$BOOTSOURCE"
  23. -fetch_from_github "$LINUXKERNEL" "$LINUXSOURCE"
  24. +#fetch_from_github "$BOOTLOADER" "$BOOTSOURCE"
  25. +#fetch_from_github "$LINUXKERNEL" "$LINUXSOURCE"
  26.  if [[ -n "$DOCS" ]]; then fetch_from_github "$DOCS" "$DOCSDIR"; fi
  27.  if [[ -n "$MISC1" ]]; then fetch_from_github "$MISC1" "$MISC1_DIR"; fi
  28.  if [[ -n "$MISC2" ]]; then fetch_from_github "$MISC2" "$MISC2_DIR"; fi
  29. @@ -170,6 +170,52 @@ patching_sources
  30.  # What are we building
  31.  grab_kernel_version
  32.  
  33. +# check whether we should just build a bunch of u-boot versions to
  34. +# brute-force all available GMAC TX/RX delay variations.
  35. +if [ "X${GMAC_DELAY_TEST}" == "Xyes" ]; then
  36. +       for TX in 0 1 2 3 4 5 6 7 ; do
  37. +               for RX in 0 1 2 3 4 5 6 7 ; do
  38. +                       CHOOSEN_UBOOT="linux-u-boot-${VER}-${BOARD}_${REVISION}_${TX}_${RX}_armhf"
  39. +                       UBOOT_PCK="linux-u-boot-$VER-"$BOARD
  40. +                       # search defconfig file for $BOARD
  41. +                       Defconfig="$(grep -i -- "-${BOARD}.dtb" ${DEST}/u-boot/configs/*_defconfig | cut -d: -f1)"
  42. +                       if [ ! -f "${Defconfig}" ]; then
  43. +                               case ${BOARD} in
  44. +                                       aw-som-a20)
  45. +                                               Defconfig="${DEST}/u-boot/configs/Awsom_defconfig"
  46. +                                               ;;
  47. +                                       cubieboard2)
  48. +                                               Defconfig="${DEST}/u-boot/configs/Cubieboard2_defconfig"        
  49. +                                               ;;
  50. +                                       lime)
  51. +                                               Defconfig="${DEST}/u-boot/configs/A20-OLinuXino-Lime_defconfig"
  52. +                                               ;;
  53. +                                       micro)
  54. +                                               Defconfig="${DEST}/u-boot/configs/A20-OLinuXino_MICRO_defconfig"
  55. +                                               ;;
  56. +                                       bananapipro)
  57. +                                               Defconfig="${DEST}/u-boot/configs/Bananapro_defconfig"
  58. +                                                ;;
  59. +                                       udoo*)
  60. +                                               Defconfig="${DEST}/u-boot/configs/udoo_quad_defconfig"
  61. +                                               ;;
  62. +                               esac
  63. +                       fi
  64. +
  65. +                       # patch defconfig with appropriate tx/rx values
  66. +                       MyTmpFile="$(mktemp /tmp/gmac_test.XXXXXX || exit 1)"
  67. +                       trap "cd /tmp; rm -f \"${MyTmpFile}\"; exit 0" 0 1 2 3 15
  68. +                       grep -v CONFIG_GMAC_TX_DELAY "${Defconfig}" | grep -v CONFIG_GMAC_RX_DELAY >"${MyTmpFile}"
  69. +                       cat "${MyTmpFile}" >"${Defconfig}"
  70. +                       echo -e "CONFIG_GMAC_TX_DELAY=${TX}\nCONFIG_GMAC_RX_DELAY=${RX}" >>"${Defconfig}"
  71. +                       cat "${Defconfig}"
  72. +
  73. +                       compile_uboot
  74. +               done
  75. +       done
  76. +       exit 0
  77. +fi
  78. +
  79.  #--------------------------------------------------------------------------------------------------------------------------------
  80.  # Compile source or choose already packed kernel
  81.  #--------------------------------------------------------------------------------------------------------------------------------
  82. @@ -256,4 +302,4 @@ closing_image
  83.  
  84.  end=`date +%s`
  85.  runtime=$(((end-start)/60))
  86. -echo -e "[\e[0;32m ok \x1B[0m] Runtime $runtime min"
  87. \ No newline at end of file
  88. +echo -e "[\e[0;32m ok \x1B[0m] Runtime $runtime min"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement