SHARE
TWEET

configuration.sh

a guest Apr 2nd, 2016 225 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. #
  3. # Copyright (c) 2015 Igor Pecovnik, igor.pecovnik@gma**.com
  4. #
  5. # This file is licensed under the terms of the GNU General Public
  6. # License version 2. This program is licensed "as is" without any
  7. # warranty of any kind, whether express or implied.
  8. #
  9. # This file is a part of tool chain https://github.com/igorpecovnik/lib
  10. #
  11. #
  12. # Board configurations
  13. #
  14. #
  15.  
  16.  
  17. # vaid options for automatic building and menu selection
  18. #
  19. # build 0 = don't build
  20. # build 1 = old kernel
  21. # build 2 = next kernel
  22. # build 3 = both kernels
  23. # build 4 = dev kernel
  24. # build 5 = next and dev kernels
  25. # build 6 = legacy and next and dev kernel
  26.  
  27.  
  28. # common options
  29.  
  30. REVISION="5.07" # all boards have same revision
  31. ARCH="armhf"
  32. CROSS_COMPILE="arm-linux-gnueabihf-"
  33. TARGETS="zImage"
  34. ROOTPWD="1234" # Must be changed @first login
  35. MAINTAINER="Igor Pecovnik" # deb signature
  36. MAINTAINERMAIL="igor.pecovnik@****l.com" # deb signature
  37. SDSIZE="4000" # SD image size in MB
  38. TZDATA=`cat /etc/timezone` # Timezone for target is taken from host or defined here.
  39. USEALLCORES="yes" # Use all CPU cores for compiling
  40. OFFSET="1" # Bootloader space in MB (1 x 2048 = default)
  41. BOOTSIZE=${BOOTSIZE-0} # Mb size of boot partition
  42. EXIT_PATCHING_ERROR="" # exit patching if failed
  43. SERIALCON="ttyS0"
  44. MISC1="https://github.com/linux-sunxi/sunxi-tools.git" # Allwinner fex compiler / decompiler
  45. MISC1_DIR="sunxi-tools" # local directory
  46. MISC2="" # Reserved
  47. MISC2_DIR="" # local directory
  48. MISC3="https://github.com/dz0ny/rt8192cu" # Realtek drivers
  49. MISC3_DIR="rt8192cu" # local directory
  50. MISC4=""
  51. MISC4_DIR=""
  52. MISC5="https://github.com/hglm/a10disp/" # Display changer for Allwinner
  53. MISC5_DIR="sunxi-display-changer" # local directory
  54. MISC6="https://github.com/porjo/mt7601/" # Display changer for Allwinner
  55. MISC6_DIR="mt7601" # local directory
  56. CACHEDIR=$DEST/cache
  57.  
  58. # board configurations
  59.  
  60. case $BOARD in
  61.  
  62.     cubieboard4)#disabled
  63.         LINUXFAMILY="sun9i"
  64.         BOOTCONFIG="Cubieboard4_defconfig"
  65.         CPUMIN="1200000"
  66.         CPUMAX="1800000"
  67.         GOVERNOR="ondemand"
  68.     ;;
  69.  
  70.     aw-som-a20)#enabled
  71.         #description A20 dual core SoM
  72.         #build 0
  73.         LINUXFAMILY="sun7i"
  74.         BOOTCONFIG="Awsom_defconfig"
  75.         MODULES="hci_uart gpio_sunxi rfcomm hidp bonding spi_sun7i"
  76.         MODULES_NEXT="bonding"
  77.     ;;
  78.  
  79.     olinux-som-a13)#enabled
  80.         #description A13 single core 512Mb SoM
  81.         #build 0
  82.         LINUXFAMILY="sun5i"
  83.         BOOTCONFIG="A13-OLinuXino_defconfig"
  84.         MODULES="gpio_sunxi spi_sunxi"
  85.         MODULES_NEXT="bonding"
  86.     ;;
  87.  
  88.     cubieboard)#enabled
  89.         #description A10 single core 1Gb SoC
  90.         #build 6
  91.         LINUXFAMILY="sun4i"
  92.         BOOTCONFIG="Cubieboard_config"
  93.         MODULES="hci_uart gpio_sunxi rfcomm hidp sunxi-ir bonding spi_sunxi"
  94.         MODULES_NEXT="bonding"
  95.         CLI_TARGET="%,%"
  96.         DESKTOP_TARGET="jessie,%"
  97.     ;;
  98.  
  99.     cubieboard2)#enabled
  100.         #description A20 dual core 1Gb SoC
  101.         #build 6
  102.         LINUXFAMILY="sun7i"
  103.         BOOTCONFIG="Cubieboard2_config"
  104.         MODULES="hci_uart gpio_sunxi rfcomm hidp sunxi-ir bonding spi_sun7i"
  105.         MODULES_NEXT="bonding"
  106.         CLI_TARGET="%,%"
  107.         DESKTOP_TARGET="jessie,%"
  108.     ;;
  109.  
  110.     cubietruck)#enabled
  111.         #description A20 dual core 2Gb SoC Wifi
  112.         #build 6
  113.         LINUXFAMILY="sun7i"
  114.         BOOTCONFIG="Cubietruck_config"
  115.         MODULES="hci_uart gpio_sunxi rfcomm hidp sunxi-ir bonding spi_sun7i ap6210"
  116.         MODULES_NEXT="brcmfmac rfcomm hidp bonding"
  117.         CLI_TARGET="%,%"
  118.         DESKTOP_TARGET="jessie,%"
  119.     ;;
  120.  
  121.     lime-a10)#enabled
  122.         #description A10 single core 512Mb SoC
  123.         #build 6
  124.         LINUXFAMILY="sun4i"
  125.         BOOTCONFIG="A10-OLinuXino-Lime_defconfig"
  126.         MODULES="hci_uart gpio_sunxi rfcomm hidp bonding spi_sun7i 8021q a20_tp"
  127.         MODULES_NEXT="bonding"
  128.         CLI_TARGET="%,%"
  129.         DESKTOP_TARGET="jessie,%"
  130.     ;;
  131.  
  132.     lime)#enabled
  133.         #description A20 dual core 512Mb SoC
  134.         #build 6
  135.         LINUXFAMILY="sun7i"
  136.         BOOTCONFIG="A20-OLinuXino-Lime_defconfig"
  137.         MODULES="hci_uart gpio_sunxi rfcomm hidp bonding spi_sun7i 8021q a20_tp"
  138.         MODULES_NEXT="bonding"
  139.         CLI_TARGET="%,%"
  140.         DESKTOP_TARGET="jessie,%"
  141.     ;;
  142.  
  143.     lime2)#enabled
  144.         #description A20 dual core 1Gb SoC
  145.         #build 6
  146.         LINUXFAMILY="sun7i"
  147.         BOOTCONFIG="A20-OLinuXino-Lime2_defconfig"
  148.         MODULES="hci_uart gpio_sunxi rfcomm hidp bonding spi_sun7i 8021q a20_tp"
  149.         MODULES_NEXT="bonding"
  150.         CLI_TARGET="%,%"
  151.         DESKTOP_TARGET="jessie,%"
  152.     ;;
  153.  
  154.     micro)#enabled
  155.         #description A20 dual core 1Gb SoC
  156.         #build 6
  157.         LINUXFAMILY="sun7i"
  158.         BOOTCONFIG="A20-OLinuXino_MICRO_config"
  159.         MODULES="hci_uart gpio_sunxi rfcomm hidp bonding spi_sun7i 8021q a20_tp"
  160.         MODULES_NEXT="bonding"
  161.         CLI_TARGET="%,%"
  162.         DESKTOP_TARGET="jessie,%"
  163.     ;;
  164.  
  165.     pcduino3nano)#enabled
  166.         #description A20 dual core 1Gb SoC
  167.         #build 6
  168.         LINUXFAMILY="sun7i"
  169.         BOOTCONFIG="Linksprite_pcDuino3_Nano_defconfig"
  170.         MODULES="hci_uart gpio_sunxi rfcomm hidp sunxi-ir bonding spi_sun7i"
  171.         MODULES_NEXT="bonding"
  172.         CLI_TARGET="%,%"
  173.         DESKTOP_TARGET="jessie,%"
  174.     ;;
  175.  
  176.     bananapim2)#enabled
  177.         #description A31 quad core 1Gb SoC Wifi
  178.         #build 5
  179.         LINUXFAMILY="sun6i"
  180.         BOOTCONFIG="Sinovoip_BPI_M2_defconfig"
  181.         MODULES="hci_uart gpio_sunxi rfcomm hidp sunxi-ir bonding spi_sun7i 8021q a20_tp"
  182.         MODULES_NEXT="brcmfmac bonding"
  183.         CLI_TARGET="%,%"
  184.         DESKTOP_TARGET="jessie,next"
  185.     ;;
  186.  
  187.     bananapipro)#enabled
  188.         #description A20 dual core 1Gb SoC
  189.         #build 6
  190.         LINUXFAMILY="sun7i"
  191.         BOOTCONFIG="Bananapro_defconfig"
  192.         MODULES="hci_uart gpio_sunxi rfcomm hidp sunxi-ir bonding spi_sun7i 8021q a20_tp #ap6211"
  193.         MODULES_NEXT="brcmfmac bonding"
  194.         CLI_TARGET="%,%"
  195.         DESKTOP_TARGET="jessie,%"
  196.     ;;
  197.  
  198.     lamobo-r1)#enabled
  199.         #description A20 dual core 1Gb SoC Switch
  200.         #build 6
  201.         LINUXFAMILY="sun7i"
  202.         BOOTCONFIG="Lamobo_R1_defconfig"
  203.         MODULES="hci_uart gpio_sunxi rfcomm hidp sunxi-ir bonding spi_sun7i 8021q"
  204.         CLI_TARGET="%,%"       
  205.     ;;
  206.  
  207.     orangepi)#enabled
  208.         #description A20 dual core 1Gb SoC Wifi USB hub
  209.         #build 6
  210.         LINUXFAMILY="sun7i"
  211.         BOOTCONFIG="Orangepi_defconfig"
  212.         MODULES="hci_uart gpio_sunxi rfcomm hidp sunxi-ir bonding spi_sun7i 8021q a20_tp"
  213.         MODULES_NEXT="bonding"
  214.         CLI_TARGET="%,%"
  215.         DESKTOP_TARGET="jessie,%"
  216.     ;;
  217.  
  218.     orangepimini)#enabled
  219.         #description A20 dual core 1Gb SoC Wifi
  220.         #build 0
  221.         LINUXFAMILY="sun7i"
  222.         BOOTCONFIG="Orangepi_mini_defconfig"
  223.         MODULES="hci_uart gpio_sunxi rfcomm hidp sunxi-ir bonding spi_sun7i 8021q a20_tp"
  224.         MODULES_NEXT="bonding"
  225.         CLI_TARGET="%,%"
  226.         DESKTOP_TARGET="jessie,%"
  227.     ;;
  228.  
  229.     orangepiplus)#enabled
  230.         #description H3 quad core (Orange Pi Plus or Plus 2)
  231.         #build 6wip
  232.         LINUXFAMILY="sun8i"
  233.         BOOTCONFIG="orangepi_plus_defconfig"
  234.         MODULES="8189es #gpio_sunxi #w1-sunxi #w1-gpio #w1-therm #gc2035"
  235.         MODULES_NEXT=""
  236.         CPUMIN="480000"
  237.         CPUMAX="1296000"
  238.         GOVERNOR="interactive"
  239.         CLI_TARGET="%,%"
  240.         DESKTOP_TARGET="jessie,default"    
  241.     ;;
  242.  
  243.     orangepih3)#enabled
  244.         #description H3 quad core (Orange Pi PC/One/2/Lite)
  245.         #build 6wip
  246.         LINUXFAMILY="sun8i"
  247.         BOOTCONFIG="orangepi_h3_defconfig"
  248.         MODULES="8189es #gpio_sunxi #w1-sunxi #w1-gpio #w1-therm #gc2035"
  249.         MODULES_NEXT=""
  250.         CPUMIN="480000"
  251.         CPUMAX="1296000"
  252.         GOVERNOR="interactive"
  253.         CLI_TARGET="%,%"
  254.         DESKTOP_TARGET="jessie,default"    
  255.     ;;
  256.  
  257.     bananapim2plus)#enabled
  258.         #description H3 quad core 1Gb SoC Wifi
  259.         LINUXFAMILY="sun8i"
  260.         BOOTCONFIG="orangepi_plus_defconfig"
  261.         MODULES="#gpio_sunxi #w1-sunxi #w1-gpio #w1-therm #ap6211"
  262.         MODULES_NEXT="brcmfmac"
  263.         CPUMIN="648000"
  264.         CPUMAX="1200000"
  265.         GOVERNOR="interactive"
  266.     ;;
  267.  
  268.     cubox-i)#enabled
  269.         #description Freescale iMx dual/quad core Wifi
  270.         #build 6
  271.         LINUXFAMILY="cubox"
  272.         BOOTCONFIG="mx6_cubox-i_config"
  273.         MODULES="bonding"
  274.         MODULES_NEXT="bonding"
  275.         SERIALCON="ttymxc0"
  276.         CLI_TARGET="%,%"
  277.         DESKTOP_TARGET="jessie,%"
  278.     ;;
  279.  
  280.     udoo)#enabled
  281.         #description Freescale iMx dual/quad core Wifi
  282.         #build 3
  283.         LINUXFAMILY="udoo"
  284.         BOOTCONFIG="udoo_qdl_config"
  285.         MODULES="bonding"
  286.         MODULES_NEXT=""
  287.         SERIALCON="ttymxc1"
  288.         CLI_TARGET="%,%"
  289.         DESKTOP_TARGET="jessie,%"
  290.     ;;
  291.  
  292.     udoo-neo)#enabled
  293.         #description Freescale iMx singe core Wifi
  294.         #build 1
  295.         #BOOTSIZE="32"
  296.         LINUXFAMILY="neo"
  297.         BOOTCONFIG="udoo_neo_config"
  298.         MODULES="bonding"
  299.         MODULES_NEXT=""
  300.         SERIALCON="ttymxc0"
  301.         CLI_TARGET="%,%"
  302.         DESKTOP_TARGET="jessie,default"    
  303.     ;;
  304.  
  305.     guitar)#enabled
  306.         #description S500 Lemaker Guitar Action quad core
  307.         #build 0
  308.         LINUXFAMILY="s500"
  309.         OFFSET="16"
  310.         BOOTSIZE="16"
  311.         BOOTCONFIG="s500_defconfig"
  312.         MODULES="ethernet wlan_8723bs"
  313.         MODULES_NEXT=""
  314.         SERIALCON="ttyS3"
  315.     ;;
  316.  
  317.     odroidxu4)#enabled
  318.         #description Exynos5422 XU3/XU4 octa core
  319.         #build 1
  320.         LINUXFAMILY="odroidxu4"
  321.         BOOTSIZE="16"
  322.         OFFSET="2"
  323.         BOOTCONFIG="odroid_config"
  324.         MODULES="bonding"
  325.         MODULES_NEXT=""
  326.         SERIALCON="ttySAC2"
  327.         CLI_TARGET="%,%"
  328.         DESKTOP_TARGET="jessie,default"
  329.     ;;
  330.  
  331.     odroidc1)#enabled
  332.         #description S805 C1 quad core
  333.         #build 1
  334.         LINUXFAMILY="odroidc1"
  335.         BOOTSIZE="32"
  336.         BOOTCONFIG="odroidc_config"
  337.         MODULES="bonding"
  338.         MODULES_NEXT=""
  339.         SERIALCON="ttyS0"
  340.         CLI_TARGET="jessie,default"
  341.         DESKTOP_TARGET="jessie,default"
  342.     ;;
  343.    
  344.     odroidc2)#enabled
  345.         #description S905 C2 quad core
  346.         #build 1wip
  347.         ARCH="arm64"
  348.         CROSS_COMPILE="aarch64-linux-gnu-"
  349.         CCACHE=""
  350.         TARGETS="Image"
  351.         LINUXFAMILY="odroidc2"
  352.         BOOTSIZE="32"
  353.         OFFSET="1"
  354.         BOOTCONFIG="odroidc2_config"
  355.         MODULES="bonding"
  356.         MODULES_NEXT=""
  357.         CPUMIN="500000"
  358.         CPUMAX="2016000"
  359.         GOVERNOR="conservative"
  360.         SERIALCON="ttyS0"
  361.         CLI_TARGET="jessie,default"
  362.         DESKTOP_TARGET="jessie,default"
  363.     ;;
  364.    
  365.     toradex)#disabled
  366.         LINUXFAMILY="toradex"
  367.         BOOTCONFIG="colibri_imx6_defconfig"
  368.         MODULES=""
  369.         MODULES_NEXT=""
  370.         SERIALCON="ttymxc0"
  371.     ;;
  372.  
  373.     armada)#enabled
  374.         #description Marvell Armada 38x
  375.         #build 3
  376.         LINUXFAMILY="marvell"
  377.         BOOTCONFIG="armada_38x_clearfog_config"
  378.         MODULES=""
  379.         MODULES_NEXT=""
  380.         SERIALCON="ttyS0"
  381.         CLI_TARGET="%,%"
  382.     ;;
  383.  
  384.     *) exit_with_error "Board configuration not found" "$BOARD"
  385.     ;;
  386. esac
  387.  
  388.  
  389.  
  390. # board family configurations
  391. case $LINUXFAMILY in
  392.  
  393.     sun4i|sun5i|sun7i|sun8i|sun6i|sun9i)
  394.         [[ -z $LINUXCONFIG && $BRANCH == "default" ]] && LINUXCONFIG="linux-"$LINUXFAMILY-"$BRANCH"
  395.         [[ -z $LINUXCONFIG && $BRANCH != "default" ]] && LINUXCONFIG="linux-sunxi-"$BRANCH
  396.         # Kernel
  397.         # sun8i switches
  398.         if [[ $LINUXFAMILY == sun8i ]]; then
  399.             KERNEL_DEFAULT="https://github.com/O-Computers/linux-sunxi"
  400.             KERNEL_DEFAULT_BRANCH="h3-wip"
  401.             KERNEL_DEFAULT_SOURCE="linux-sun8i"
  402.             KERNEL_DEV=https://github.com/wens/linux
  403.             KERNEL_DEV_BRANCH=h3-emac
  404.             KERNEL_DEV_SOURCE="linux-sun8i-mainline"
  405.         else
  406.             KERNEL_DEFAULT='https://github.com/linux-sunxi/linux-sunxi'
  407.             KERNEL_DEFAULT_BRANCH="sunxi-3.4"
  408.             KERNEL_DEFAULT_SOURCE="linux-sunxi"
  409.             KERNEL_DEV='git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git'
  410.             [ "$USE_MAINLINE_GOOGLE_MIRROR" = "yes" ] && KERNEL_DEV='https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable'
  411.             KERNEL_DEV_BRANCH=""
  412.             KERNEL_DEV_SOURCE="linux-vanilla"
  413.         fi
  414.         KERNEL_NEXT='git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git'
  415.         [ "$USE_MAINLINE_GOOGLE_MIRROR" = "yes" ] && KERNEL_NEXT='https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable'
  416.         KERNEL_NEXT_BRANCH="v"`wget -qO-  https://www.kernel.org/finger_banner | grep "The latest st" | awk '{print $NF}' | head -1`
  417.         KERNEL_NEXT_SOURCE="linux-vanilla"
  418.  
  419.         # U-boot
  420.         UBOOT_DEFAULT="git://git.denx.de/u-boot.git"
  421.         UBOOT_DEFAULT_BRANCH="v"$(git ls-remote git://git.denx.de/u-boot.git | grep -v rc | grep -v "\^" | tail -1 | cut -d "v" -f 2)
  422.         UBOOT_DEFAULT_SOURCE="u-boot"
  423.         UBOOT_NEXT=$UBOOT_DEFAULT
  424.         UBOOT_NEXT_BRANCH=$UBOOT_DEFAULT_BRANCH
  425.         UBOOT_NEXT_SOURCE=$UBOOT_DEFAULT_SOURCE
  426.         UBOOT_DEV=$UBOOT_DEFAULT
  427.         UBOOT_DEV_BRANCH=$UBOOT_DEFAULT_BRANCH
  428.         UBOOT_DEV_SOURCE=$UBOOT_DEFAULT_SOURCE
  429.         # latest stable v2016.03 broken gmac on sun7i, fixing it for DEFAULT and NEXT
  430.         if [[ $LINUXFAMILY != sun8i ]]; then
  431.             UBOOT_DEFAULT_BRANCH="v2016.01"
  432.             UBOOT_NEXT_BRANCH="v2016.01"
  433.         fi
  434.     ;;
  435.  
  436.     odroidxu4)
  437.         KERNEL_DEFAULT='https://github.com/hardkernel/linux'
  438.         KERNEL_DEFAULT_BRANCH="odroidxu3-3.10.y"
  439.         KERNEL_DEFAULT_SOURCE="linux-odroidxu4"
  440.         KERNEL_NEXT='https://github.com/tobetter/linux'
  441.         KERNEL_NEXT_BRANCH="odroidxu4-v4.2"
  442.         KERNEL_NEXT_SOURCE="linux-odroidxu-next"
  443.         UBOOT_DEFAULT="https://github.com/hardkernel/u-boot.git"
  444.         UBOOT_DEFAULT_BRANCH="odroidxu3-v2012.07"
  445.         UBOOT_DEFAULT_SOURCE="u-boot-odroidxu"
  446.         UBOOT_NEXT=$UBOOT_DEFAULT
  447.         UBOOT_NEXT_BRANCH=$UBOOT_DEFAULT_BRANCH
  448.         UBOOT_NEXT_SOURCE=$UBOOT_DEFAULT_SOURCE
  449.         UBOOT_DEV=$UBOOT_DEFAULT
  450.         UBOOT_DEV_BRANCH=$UBOOT_DEFAULT_BRANCH
  451.         UBOOT_DEV_SOURCE=$UBOOT_DEFAULT_SOURCE
  452.     ;;
  453.  
  454.     odroidc1)
  455.         KERNEL_DEFAULT='https://github.com/hardkernel/linux'
  456.         KERNEL_DEFAULT_BRANCH="odroidc-3.10.y"
  457.         KERNEL_DEFAULT_SOURCE="linux-odroidc1"
  458.         KERNEL_NEXT='https://github.com/tobetter/linux'
  459.         KERNEL_NEXT_BRANCH="odroidxu4-v4.2"
  460.         KERNEL_NEXT_SOURCE="linux-odroidxu-next"
  461.         UBOOT_DEFAULT="https://github.com/hardkernel/u-boot.git"
  462.         UBOOT_DEFAULT_BRANCH="odroidc-v2011.03"
  463.         UBOOT_DEFAULT_SOURCE="u-boot-odroidc1"
  464.         UBOOT_NEXT=$UBOOT_DEFAULT
  465.         UBOOT_NEXT_BRANCH=$UBOOT_DEFAULT_BRANCH
  466.         UBOOT_NEXT_SOURCE=$UBOOT_DEFAULT_SOURCE
  467.         UBOOT_DEV=$UBOOT_DEFAULT
  468.         UBOOT_DEV_BRANCH=$UBOOT_DEFAULT_BRANCH
  469.         UBOOT_DEV_SOURCE=$UBOOT_DEFAULT_SOURCE
  470.     ;;
  471.    
  472.     odroidc2)
  473.         KERNEL_DEFAULT='https://github.com/hardkernel/linux'
  474.         KERNEL_DEFAULT_BRANCH="odroidc2-3.14.y"
  475.         KERNEL_DEFAULT_SOURCE="linux-odroidc2"
  476.         KERNEL_NEXT='https://github.com/hardkernel/linux'
  477.         KERNEL_NEXT_BRANCH="odroidc2-3.14.y"
  478.         KERNEL_NEXT_SOURCE="linux-odroidc2-next"
  479.         UBOOT_DEFAULT="https://github.com/hardkernel/u-boot.git"
  480.         UBOOT_DEFAULT_BRANCH="odroidc2-v2015.01"
  481.         UBOOT_DEFAULT_SOURCE="u-boot-odroidc2"
  482.         UBOOT_NEXT=$UBOOT_DEFAULT
  483.         UBOOT_NEXT_BRANCH=$UBOOT_DEFAULT_BRANCH
  484.         UBOOT_NEXT_SOURCE=$UBOOT_DEFAULT_SOURCE
  485.         UBOOT_DEV=$UBOOT_DEFAULT
  486.         UBOOT_DEV_BRANCH=$UBOOT_DEFAULT_BRANCH
  487.         UBOOT_DEV_SOURCE=$UBOOT_DEFAULT_SOURCE
  488.     ;;
  489.    
  490.     udoo)
  491.         KERNEL_DEFAULT="https://github.com/UDOOboard/linux_kernel"
  492.         KERNEL_DEFAULT_BRANCH="3.14-1.0.x-udoo"
  493.         KERNEL_DEFAULT_SOURCE="linux-udoo"
  494.         KERNEL_NEXT="https://github.com/patrykk/linux-udoo"
  495.         KERNEL_NEXT_BRANCH="v4.4.0-6-vivante-5.0.11.p7.3"
  496.         KERNEL_NEXT_SOURCE="linux-udoo-next"
  497.         UBOOT_DEFAULT="https://github.com/UDOOboard/uboot-imx"
  498.         UBOOT_DEFAULT_BRANCH="2015.10.fslc-qdl"
  499.         UBOOT_DEFAULT_SOURCE="u-boot-udoo"
  500.         UBOOT_NEXT=$UBOOT_DEFAULT
  501.         UBOOT_NEXT_BRANCH=$UBOOT_DEFAULT_BRANCH
  502.         UBOOT_NEXT_SOURCE=$UBOOT_DEFAULT_SOURCE
  503.         UBOOT_DEV=$UBOOT_DEFAULT
  504.         UBOOT_DEV_BRANCH=$UBOOT_DEFAULT_BRANCH
  505.         UBOOT_DEV_SOURCE=$UBOOT_DEFAULT_SOURCE
  506.     ;;
  507.  
  508.     neo)
  509.         KERNEL_DEFAULT='https://github.com/UDOOboard/linux_kernel'
  510.         #KERNEL_DEFAULT_BRANCH="imx_3.14.28_1.0.0_ga_neo"
  511.         KERNEL_DEFAULT_BRANCH="3.14-1.0.x-udoo"
  512.         #KERNEL_DEFAULT_SOURCE="linux-udoo-neo"
  513.         KERNEL_DEFAULT_SOURCE="linux-udoo"
  514.         UBOOT_DEFAULT="https://github.com/UDOOboard/uboot-imx"
  515.         UBOOT_DEFAULT_BRANCH="2015.04.imx-neo"
  516.         UBOOT_DEFAULT_SOURCE="u-boot-neo"
  517.         UBOOT_NEXT=$UBOOT_DEFAULT
  518.         UBOOT_NEXT_BRANCH=$UBOOT_DEFAULT_BRANCH
  519.         UBOOT_NEXT_SOURCE=$UBOOT_DEFAULT_SOURCE
  520.         UBOOT_DEV=$UBOOT_DEFAULT
  521.         UBOOT_DEV_BRANCH=$UBOOT_DEFAULT_BRANCH
  522.         UBOOT_DEV_SOURCE=$UBOOT_DEFAULT_SOURCE
  523.     ;;
  524.  
  525.     cubox)
  526.         KERNEL_DEFAULT='https://github.com/linux4kix/linux-linaro-stable-mx6'
  527.         KERNEL_DEFAULT_BRANCH="linux-linaro-lsk-v3.14-mx6"
  528.         KERNEL_DEFAULT_SOURCE="linux-cubox"
  529.         KERNEL_NEXT='git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git'
  530.         [ "$USE_MAINLINE_GOOGLE_MIRROR" = "yes" ] && KERNEL_NEXT='https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable'
  531.         KERNEL_NEXT_BRANCH="v"`wget -qO-  https://www.kernel.org/finger_banner | grep "The latest st" | awk '{print $NF}' | head -1`
  532.         KERNEL_NEXT_SOURCE="linux-vanilla"
  533.         KERNEL_DEV='https://github.com/SolidRun/linux-fslc'
  534.         KERNEL_DEV_BRANCH="3.14-1.0.x-mx6-sr"
  535.         KERNEL_DEV_SOURCE="linux-cubox"
  536.         UBOOT_DEFAULT="https://github.com/SolidRun/u-boot-imx6"
  537.         UBOOT_DEFAULT_BRANCH="imx6"
  538.         UBOOT_DEFAULT_SOURCE="u-boot-cubox"
  539.         UBOOT_NEXT=$UBOOT_DEFAULT
  540.         UBOOT_NEXT_BRANCH=$UBOOT_DEFAULT_BRANCH
  541.         UBOOT_NEXT_SOURCE=$UBOOT_DEFAULT_SOURCE
  542.         UBOOT_DEV=$UBOOT_DEFAULT
  543.         UBOOT_DEV_BRANCH=$UBOOT_DEFAULT_BRANCH
  544.         UBOOT_DEV_SOURCE=$UBOOT_DEFAULT_SOURCE
  545.     ;;
  546.  
  547.     s500)
  548.         KERNEL_DEFAULT='https://github.com/LeMaker/linux-actions'
  549.         KERNEL_DEFAULT_BRANCH="s500-master"
  550.         KERNEL_DEFAULT_SOURCE="linux-s500"
  551.         KERNEL_NEXT='https://github.com/LeMaker/linux-actions'
  552.         KERNEL_NEXT_BRANCH="linux-3.10.y"
  553.         KERNEL_NEXT_SOURCE="linux-s500"
  554.         UBOOT_DEFAULT="https://github.com/LeMaker/u-boot-actions"
  555.         UBOOT_DEFAULT_BRANCH="s500-master"
  556.         UBOOT_DEFAULT_SOURCE="u-boot-s500"
  557.         UBOOT_NEXT=$UBOOT_DEFAULT
  558.         UBOOT_NEXT_BRANCH=$UBOOT_DEFAULT_BRANCH
  559.         UBOOT_NEXT_SOURCE=$UBOOT_DEFAULT_SOURCE
  560.         UBOOT_DEV=$UBOOT_DEFAULT
  561.         UBOOT_DEV_BRANCH=$UBOOT_DEFAULT_BRANCH
  562.         UBOOT_DEV_SOURCE=$UBOOT_DEFAULT_SOURCE
  563.     ;;
  564.  
  565.     toradex)
  566.         KERNEL_DEFAULT="git://git.toradex.com/linux-toradex.git"
  567.         KERNEL_DEFAULT_BRANCH="toradex_imx_3.14.28_1.0.0_ga"
  568.         KERNEL_DEFAULT_SOURCE="linux-toradex"
  569.         UBOOT_DEFAULT="git://git.toradex.com/u-boot-toradex.git"
  570.         UBOOT_DEFAULT_BRANCH="2015.04-toradex"
  571.         UBOOT_DEFAULT_SOURCE="u-boot-toradex"
  572.         UBOOT_NEXT=$UBOOT_DEFAULT
  573.         UBOOT_NEXT_BRANCH=$UBOOT_DEFAULT_BRANCH
  574.         UBOOT_NEXT_SOURCE=$UBOOT_DEFAULT_SOURCE
  575.         UBOOT_DEV=$UBOOT_DEFAULT
  576.         UBOOT_DEV_BRANCH=$UBOOT_DEFAULT_BRANCH
  577.         UBOOT_DEV_SOURCE=$UBOOT_DEFAULT_SOURCE
  578.     ;;
  579.  
  580.     marvell)
  581.         KERNEL_DEFAULT="https://github.com/SolidRun/linux-armada38x"
  582.         KERNEL_DEFAULT_BRANCH="linux-3.10.70-15t1-clearfog"
  583.         KERNEL_DEFAULT_SOURCE="linux-armada"
  584.         KERNEL_NEXT='git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git'
  585.         [ "$USE_MAINLINE_GOOGLE_MIRROR" = "yes" ] && KERNEL_NEXT='https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable'
  586.         KERNEL_NEXT_BRANCH="v"`wget -qO-  https://www.kernel.org/finger_banner | grep "The latest st" | awk '{print $NF}' | head -1`
  587.         KERNEL_NEXT_SOURCE="linux-vanilla"
  588.         KERNEL_DEV='git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git'
  589.         [ "$USE_MAINLINE_GOOGLE_MIRROR" = "yes" ] && KERNEL_DEV='https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable'
  590.         KERNEL_DEV_BRANCH=""
  591.         KERNEL_DEV_SOURCE="linux-vanilla"
  592.         UBOOT_DEFAULT="https://github.com/SolidRun/u-boot-armada38x"
  593.         UBOOT_DEFAULT_BRANCH="u-boot-2013.01-15t1-clearfog"
  594.         UBOOT_DEFAULT_SOURCE="u-boot-armada"
  595.         UBOOT_NEXT=$UBOOT_DEFAULT
  596.         UBOOT_NEXT_BRANCH=$UBOOT_DEFAULT_BRANCH
  597.         UBOOT_NEXT_SOURCE=$UBOOT_DEFAULT_SOURCE
  598.         UBOOT_DEV=$UBOOT_DEFAULT
  599.         UBOOT_DEV_BRANCH=$UBOOT_DEFAULT_BRANCH
  600.         UBOOT_DEV_SOURCE=$UBOOT_DEFAULT_SOURCE
  601.     ;;
  602.  
  603.     *) exit_with_error "Defaults not found" "$LINUXFAMILY"
  604.     ;;
  605. esac
  606.  
  607.  
  608. # Let's set defalt data if not defined in board configuration above
  609. [[ -z $LINUXCONFIG ]] && LINUXCONFIG="linux-$LINUXFAMILY-$BRANCH"
  610. [[ -z $LINUXKERNEL ]] && eval LINUXKERNEL=\$KERNEL_${BRANCH^^}
  611. [[ -z $LINUXSOURCE ]] && eval LINUXSOURCE=\$KERNEL_${BRANCH^^}"_SOURCE"
  612. [[ -z $KERNELBRANCH ]] && eval KERNELBRANCH=\$KERNEL_${BRANCH^^}"_BRANCH"
  613. [[ -z $BOOTLOADER ]] && eval BOOTLOADER=\$UBOOT_${BRANCH^^}
  614. [[ -z $BOOTSOURCE ]] && eval BOOTSOURCE=\$UBOOT_${BRANCH^^}"_SOURCE"
  615. [[ -z $BOOTBRANCH ]] && eval BOOTBRANCH=\$UBOOT_${BRANCH^^}"_BRANCH"
  616. [[ -z $CPUMIN && $LINUXFAMILY == sun*i ]] && CPUMIN="480000" && CPUMAX="1010000" && GOVERNOR="interactive"
  617. [[ $BRANCH != "default" && $LINUXFAMILY == sun*i ]] && GOVERNOR="ondemand"
  618. [[ -z $CPUMIN && $LINUXFAMILY == odroidxu4 ]] && CPUMIN="600000" && CPUMAX="2000000" && GOVERNOR="conservative"
  619. [[ -z $CPUMIN && $LINUXFAMILY == cubox ]] && CPUMIN="396000" && CPUMAX="996000" && GOVERNOR="interactive"
  620. [[ -z $CPUMIN && $LINUXFAMILY == s500 ]] && CPUMIN="408000" && CPUMAX="1104000" && GOVERNOR="interactive"
  621. [[ -z $CPUMIN && $LINUXFAMILY == marvell ]] && CPUMIN="800000" && CPUMAX="1600000" && GOVERNOR="ondemand"
  622. [[ -z $CPUMIN && ($LINUXFAMILY == udoo || $LINUXFAMILY == neo ) ]] && CPUMIN="392000" && CPUMAX="996000" && GOVERNOR="interactive"
  623. [[ -z $GOVERNOR ]] && GOVERNOR="ondemand"
  624.  
  625.  
  626. # Essential packages
  627. PACKAGE_LIST="automake bash-completion bc bridge-utils build-essential cmake cpufrequtils \
  628.     device-tree-compiler dosfstools figlet fbset fping git haveged hdparm hostapd ifenslave-2.6 \
  629.     iw libtool libwrap0-dev libssl-dev lirc lsof fake-hwclock wpasupplicant libusb-dev psmisc \
  630.     ntp parted pkg-config pv rfkill rsync sudo curl dialog crda wireless-regdb ncurses-term \
  631.     sysfsutils toilet u-boot-tools unattended-upgrades unzip usbutils vlan wireless-tools \
  632.     console-setup console-data console-common unicode-data openssh-server libmtp-runtime initramfs-tools ca-certificates"
  633.  
  634. # Non-essential packages
  635. PACKAGE_LIST_ADDITIONAL="alsa-utils btrfs-tools bluez hddtemp i2c-tools iperf ir-keytable iotop iozone3 weather-util weather-util-data stress \
  636.     dvb-apps sysbench libbluetooth-dev libbluetooth3 subversion screen ntfs-3g vim pciutils evtest htop mtp-tools python-smbus \
  637.     apt-transport-https libfuse2 libdigest-sha-perl libproc-processtable-perl w-scan aptitude dnsutils f3"
  638.  
  639. # Release specific packages
  640. case $RELEASE in
  641.     wheezy)
  642.     PACKAGE_LIST_RELEASE="less makedev kbd libnl-dev acpid acpi-support-base"
  643.     PACKAGE_LIST_EXCLUDE=""
  644.     ;;
  645.     jessie)
  646.     PACKAGE_LIST_RELEASE="less makedev kbd thin-provisioning-tools libnl-3-dev libnl-genl-3-dev libpam-systemd \
  647.         software-properties-common python-software-properties libnss-myhostname f2fs-tools"
  648.     PACKAGE_LIST_EXCLUDE=""
  649.     ;;
  650.     trusty)
  651.     PACKAGE_LIST_RELEASE="man-db wget iptables nano libnl-3-dev libnl-genl-3-dev software-properties-common \
  652.         python-software-properties f2fs-tools acpid"
  653.     PACKAGE_LIST_EXCLUDE="ureadahead plymouth"
  654.     ;;
  655.     xenial)
  656.     PACKAGE_LIST_RELEASE="man-db wget iptables nano thin-provisioning-tools libnl-3-dev libnl-genl-3-dev libpam-systemd \
  657.         software-properties-common python-software-properties libnss-myhostname f2fs-tools"
  658.     PACKAGE_LIST_EXCLUDE=""
  659.     ;;
  660. esac
  661.  
  662. # Remove ARM64 missing packages. Temporally
  663. PACKAGE_LIST_RELEASE=${PACKAGE_LIST_RELEASE//thin-provisioning-tools }
  664.  
  665. # additional desktop packages
  666. if [[ $BUILD_DESKTOP == yes ]]; then
  667.     # common packages
  668.     PACKAGE_LIST_DESKTOP="xserver-xorg xserver-xorg-core xfonts-base xinit nodm x11-xserver-utils xfce4 lxtask xterm mirage radiotray wicd thunar-volman galculator \
  669.     gtk2-engines gtk2-engines-murrine gtk2-engines-pixbuf libgtk2.0-bin gcj-jre-headless xfce4-screenshooter libgnome2-perl gksu wifi-radar"
  670.     # release specific desktop packages
  671.     case $RELEASE in
  672.         wheezy)
  673.         PACKAGE_LIST_DESKTOP="$PACKAGE_LIST_DESKTOP mozo pluma iceweasel icedove"
  674.         ;;
  675.         jessie)
  676.         PACKAGE_LIST_DESKTOP="$PACKAGE_LIST_DESKTOP mozo pluma iceweasel libreoffice-writer libreoffice-java-common icedove gvfs policykit-1 policykit-1-gnome eject"
  677.         ;;
  678.         trusty)
  679.         PACKAGE_LIST_DESKTOP="$PACKAGE_LIST_DESKTOP libreoffice-writer libreoffice-java-common thunderbird firefox gnome-icon-theme-full tango-icon-theme gvfs-backends"
  680.         ;;
  681.         xenial)
  682.         PACKAGE_LIST_DESKTOP="$PACKAGE_LIST_DESKTOP libreoffice-writer thunderbird firefox gnome-icon-theme-full tango-icon-theme gvfs-backends \
  683.             policykit-1 xserver-xorg-video-fbdev"
  684.         ;;
  685.     esac
  686.     # hardware acceleration support packages
  687.     if [[ $LINUXCONFIG == *sun* && $BRANCH == default ]]; then
  688.         PACKAGE_LIST_DESKTOP="$PACKAGE_LIST_DESKTOP xorg-dev xutils-dev x11proto-dri2-dev xutils-dev libdrm-dev libvdpau-dev"
  689.     fi
  690. else
  691.     PACKAGE_LIST_DESKTOP=""
  692. fi
  693.  
  694. # For user override
  695. if [[ -f "$SRC/userpatches/lib.config" ]]; then
  696.     display_alert "Using user configuration override" "userpatches/lib.config" "info"
  697.     source $SRC/userpatches/lib.config
  698. fi
  699.  
  700. # Build final package list after possible override
  701. PACKAGE_LIST="$PACKAGE_LIST $PACKAGE_LIST_RELEASE $PACKAGE_LIST_ADDITIONAL $PACKAGE_LIST_DESKTOP"
  702.  
  703. # debug
  704. echo -e "Config: $LINUXCONFIG\nKernel source: $LINUXKERNEL\nBranch: $KERNELBRANCH" >> $DEST/debug/install.log
  705. echo -e "linuxsource: $LINUXSOURCE\nOffset: $OFFSET\nbootsize: $BOOTSIZE" >> $DEST/debug/install.log
  706. echo -e "bootloader: $BOOTLOADER\nbootsource: $BOOTSOURCE\nbootbranch: $BOOTBRANCH" >> $DEST/debug/install.log
  707. echo -e "CPU $CPUMIN / $CPUMAX with $GOVERNOR" >> $DEST/debug/install.log
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top