diff --git a/boards.sh b/boards.sh index 30d9e3c68..d24961cdb 100644 --- a/boards.sh +++ b/boards.sh @@ -132,7 +132,7 @@ install_board_specific (){ cp $SRC/lib/config/boot.cmd $DEST/cache/sdcard/boot/boot.cmd # orangepi h3 temp exceptions [[ $LINUXFAMILY == "sun8i" ]] && sed -i '1s/^/gpio set PA15\nsetenv machid 1029\nsetenv bootm_boot_mode sec\n/' $DEST/cache/sdcard/boot/boot.cmd - [[ $BOARD == orangepip* ]] && sed -i '/^gpio set PA15/a gpio set PG11' $DEST/cache/sdcard/boot/boot.cmd + [[ $BOARD == orangepiplus ]] && sed -i '/^gpio set PA15/a gpio set PG11' $DEST/cache/sdcard/boot/boot.cmd # let's prepare for old kernel too chroot $DEST/cache/sdcard /bin/bash -c \ "ln -s /boot/bin/$BOARD.bin /boot/script.bin >/dev/null 2>&1 || cp /boot/bin/$BOARD.bin /boot/script.bin" diff --git a/common.sh b/common.sh index 5cce217f2..9336589d8 100644 --- a/common.sh +++ b/common.sh @@ -387,6 +387,11 @@ _EOF_ # TODO: Set the module to build automatically via dkms in the future here fi + +# h3disp for sun8i/3.4.x +if [ "$BOARD" = "orangepiplus" -o "$BOARD" = "orangepih3" ]; then + install -m 755 "$SRC/lib/scripts/h3disp" "$DEST/cache/sdcard/usr/local/bin" +fi } diff --git a/configuration.sh b/configuration.sh index 7a0f03cc9..d76c60e66 100644 --- a/configuration.sh +++ b/configuration.sh @@ -213,65 +213,29 @@ ;; orangepiplus)#enabled - #description H3 quad core 1Gb SoC Wifi GbE USB hub + #description H3 quad core (Orange Pi Plus or Plus 2) #build 3wip LINUXFAMILY="sun8i" BOOTCONFIG="orangepi_plus_defconfig" - MODULES="8189es" + MODULES="8189es #gpio_sunxi #w1-sunxi #w1-gpio #w1-therm #gc2035" MODULES_NEXT="" CPUMIN="480000" CPUMAX="1296000" GOVERNOR="interactive" ;; - orangepi2)#enabled - #description H3 quad core 1Gb SoC Wifi USB hub + orangepih3)#enabled + #description H3 quad core (Orange Pi PC/One/2/Lite) #build 3wip LINUXFAMILY="sun8i" - BOOTCONFIG="orangepi_pc_defconfig" - MODULES="8189es" + BOOTCONFIG="orangepi_h3_defconfig" + MODULES="8189es #gpio_sunxi #w1-sunxi #w1-gpio #w1-therm #gc2035" MODULES_NEXT="" CPUMIN="480000" CPUMAX="1296000" GOVERNOR="interactive" ;; - orangepipc)#enabled - #description H3 quad core 1Gb SoC - #build 3wip - LINUXFAMILY="sun8i" - BOOTCONFIG="orangepi_pc_defconfig" - MODULES="" - MODULES_NEXT="" - CPUMIN="480000" - CPUMAX="1296000" - GOVERNOR="interactive" - ;; - - orangepione)#enabled - #description H3 quad core 512Mb SoC - #build 3wip - LINUXFAMILY="sun8i" - BOOTCONFIG="orangepi_one_defconfig" - MODULES="" - MODULES_NEXT="" - CPUMIN="648000" - CPUMAX="1200000" - GOVERNOR="interactive" - ;; - - orangepilite)#enabled - #description H3 quad core 512Mb SoC Wifi - #build 3wip - LINUXFAMILY="sun8i" - BOOTCONFIG="orangepi_pc_defconfig" - MODULES="8189es" - MODULES_NEXT="" - CPUMIN="648000" - CPUMAX="1200000" - GOVERNOR="interactive" - ;; - cubox-i)#enabled #description Freescale iMx dual/quad core Wifi #build 6 diff --git a/makeboarddeb.sh b/makeboarddeb.sh index 5873a6037..916d7baa0 100644 --- a/makeboarddeb.sh +++ b/makeboarddeb.sh @@ -115,18 +115,9 @@ create_board_package (){ mkdir -p $destination/boot/bin for i in $(ls -w1 $SRC/lib/config/*.fex | xargs -n1 basename); do fex2bin $SRC/lib/config/${i%*.fex}.fex $destination/boot/bin/${i%*.fex}.bin; - case ${i%*.fex} in - orangepiplus|orangepi2|orangepipc|orangepione|orangepilite) - # H3 based devices need a fix when used with DVI displays - # so we provide a 2nd script.bin to be replaced manually - # when using kernel 3.4.x - sed '/\[hdmi_para\]/a \ -hdcp_enable = 0\ -hdmi_cts_compatibility = 1\ -' <"${SRC}/lib/config/${i%*.fex}.fex" | fex2bin - "${destination}/boot/bin/${i%*.fex}_hdmi2dvi.bin" - ;; - esac done + # One H3 image for all Fast Ethernet equipped Orange Pi H3 + cp -p "$destination/boot/bin/orangepi2.bin" "$destination/boot/bin/orangepih3.bin" # bluetooth device enabler - for cubietruck install -m 755 $SRC/lib/bin/brcm_patchram_plus $destination/usr/local/bin diff --git a/patch/u-boot/u-boot-default/u-boot-99-opi-change-build-settings.patch b/patch/u-boot/u-boot-default/u-boot-99-opi-change-build-settings.patch index 9036ed914..6bae96834 100644 --- a/patch/u-boot/u-boot-default/u-boot-99-opi-change-build-settings.patch +++ b/patch/u-boot/u-boot-default/u-boot-99-opi-change-build-settings.patch @@ -1,7 +1,7 @@ -diff -Nur a/configs/orangepi_one_defconfig b/configs/orangepi_one_defconfig ---- a/configs/orangepi_one_defconfig 1970-01-01 01:00:00.000000000 +0100 -+++ b/configs/orangepi_one_defconfig 2016-02-19 00:58:31.007705977 +0100 -@@ -0,0 +1,17 @@ +diff -Nur a/configs/orangepi_h3_defconfig b/configs/orangepi_h3_defconfig +--- a/configs/orangepi_h3_defconfig 1970-01-01 01:00:00.000000000 +0100 ++++ b/configs/orangepi_h3_defconfig 2016-02-19 00:58:31.007705977 +0100 +@@ -0,0 +1,16 @@ +CONFIG_ARM=y +CONFIG_ARCH_SUNXI=y +CONFIG_MACH_SUN8I_H3=y @@ -18,7 +18,6 @@ diff -Nur a/configs/orangepi_one_defconfig b/configs/orangepi_one_defconfig +CONFIG_CMD_GPIO=y +CONFIG_DM=y +CONFIG_DM_GPIO=y -+CONFIG_SUNXI_NO_PMIC=y diff -Nur a/configs/orangepi_pc_defconfig b/configs/orangepi_pc_defconfig --- a/configs/orangepi_pc_defconfig 2016-02-18 17:59:46.843681159 +0100 +++ b/configs/orangepi_pc_defconfig 2016-02-19 00:58:41.071856141 +0100 @@ -31,15 +30,6 @@ diff -Nur a/configs/orangepi_pc_defconfig b/configs/orangepi_pc_defconfig diff -Nur a/configs/orangepi_plus_defconfig b/configs/orangepi_plus_defconfig --- a/configs/orangepi_plus_defconfig 2016-02-15 22:44:30.000000000 +0100 +++ b/configs/orangepi_plus_defconfig 2016-02-19 00:59:04.440204776 +0100 -@@ -1,7 +1,7 @@ - CONFIG_ARM=y - CONFIG_ARCH_SUNXI=y - CONFIG_MACH_SUN8I_H3=y --CONFIG_DRAM_CLK=672 -+CONFIG_DRAM_CLK=624 - CONFIG_DRAM_ZQ=3881979 - CONFIG_DRAM_ODT_EN=y - # CONFIG_VIDEO is not set @@ -12,3 +12,5 @@ # CONFIG_CMD_FLASH is not set # CONFIG_CMD_FPGA is not set diff --git a/scripts/firstrun b/scripts/firstrun index 1f143d1b7..e8f12c741 100644 --- a/scripts/firstrun +++ b/scripts/firstrun @@ -96,6 +96,9 @@ autodetect_h3() { # This function adjusts script.bin, hostname and cpufreq settings based on # /run/machine.id so that two OS images (one built for Orange Pi Plus and one # for the other H3 devices using the internal Ethernet PHY) can be shipped. + + # trigger red LED as user feedback + echo heartbeat >/sys/class/leds/red_led/trigger # wait for armhwinfo sleep 3 @@ -121,8 +124,10 @@ autodetect_h3() { -e 's/MAX_SPEED=1296000/MAX_SPEED=1200000/' /etc/default/cpufrequtils ;; esac - echo "${MACHINE}" | tr '[:upper:]' '[:lower:]' | sed -e 's/+/plus/' \ - -e 's/\ //g' >/etc/hostname + NEWHOSTNAME="$(echo "${MACHINE}" | tr '[:upper:]' '[:lower:]' | sed -e 's/+/plus/' -e 's/\ //g')" + echo "${NEWHOSTNAME}" >/etc/hostname + sed -i "s/orangepih3/${NEWHOSTNAME}/" /etc/hosts + rm /boot/bin/orangepih3.bin touch /var/run/reboot } # autodetect_h3