Merge remote-tracking branch 'upstream/master'

This commit is contained in:
zador-blood-stained 2016-03-02 20:18:38 +03:00
commit e1c243c0c5
25 changed files with 85222 additions and 39 deletions

BIN
bin/brcm_bt_reset Normal file

Binary file not shown.

Binary file not shown.

View File

@ -819,7 +819,7 @@ kp_out7 = port:PH27<4><1><default><default>
[usbc0]
usb_used = 1
usb_port_type = 2
usb_detect_type = 1
usb_detect_type = 0
usb_id_gpio = port:PH04<0><1><default><default>
usb_det_vbus_gpio = "axp_ctrl"
usb_drv_vbus_gpio = port:PB09<1><0><default><0>
@ -942,7 +942,7 @@ bt_gpio = port:PI21<1><default><default><default>
bt_rst = port:PB05<1><default><default><default>
[i2s_para]
i2s_used = 0
i2s_used = 1
i2s_channel = 2
i2s_mclk = port:PB05<2><1><default><default>
i2s_bclk = port:PB06<2><1><default><default>
@ -969,13 +969,10 @@ switch_used = 0
[leds_para]
leds_used = 1
leds_num = 2
leds_num = 1
leds_pin_1 = port:PH24<1><default><default><0>
leds_pin_2 = port:PG02<1><default><default><0>
leds_name_1 = "green:ph24:led1"
leds_name_2 = "blue:pg02:led2"
leds_trigger_1 = "heartbeat"
leds_trigger_2 = "mmc0"
leds_trigger_1 = "mmc0"
[ir_para]
ir_used = 1

View File

@ -1511,6 +1511,11 @@ CONFIG_AP6210_FW_PATH="/lib/firmware/ap6210/fw_bcmxxxx.bin"
CONFIG_AP6210_NVRAM_PATH="/lib/firmware/ap6210/nvram_apxxxx.txt"
CONFIG_AP6210_OOB=y
# CONFIG_AP6210_SDIO_IRQ is not set
CONFIG_AP6211=m
CONFIG_AP6211_FW_PATH="/lib/firmware/ap6210/fw_bcmxxxx.bin"
CONFIG_AP6211_NVRAM_PATH="/lib/firmware/ap6210/nvram_ap6210.txt"
CONFIG_AP6211_OOB=y
# CONFIG_AP6211_SDIO_IRQ is not set
CONFIG_BRCMUTIL=m
CONFIG_BRCMFMAC=m
CONFIG_BRCMFMAC_SDIO=y

View File

@ -1185,7 +1185,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=y
CONFIG_FIRMWARE_IN_KERNEL=y
CONFIG_EXTRA_FIRMWARE=""
CONFIG_FW_LOADER_USER_HELPER=y
# CONFIG_FW_LOADER_USER_HELPER is not set
# CONFIG_DEBUG_DRIVER is not set
# CONFIG_DEBUG_DEVRES is not set
# CONFIG_SYS_HYPERVISOR is not set

View File

@ -3951,7 +3951,7 @@ CONFIG_USBIP_CORE=m
CONFIG_USBIP_VHCI_HCD=m
CONFIG_USBIP_HOST=m
# CONFIG_USBIP_DEBUG is not set
CONFIG_USB_MUSB_HDRC=m
CONFIG_USB_MUSB_HDRC=y
# CONFIG_USB_MUSB_HOST is not set
# CONFIG_USB_MUSB_GADGET is not set
CONFIG_USB_MUSB_DUAL_ROLE=y
@ -3959,7 +3959,7 @@ CONFIG_USB_MUSB_DUAL_ROLE=y
#
# Platform Glue Layer
#
CONFIG_USB_MUSB_SUNXI=m
CONFIG_USB_MUSB_SUNXI=y
#
# MUSB DMA mode
@ -3970,9 +3970,10 @@ CONFIG_USB_MUSB_SUNXI=m
# CONFIG_USB_CHIPIDEA is not set
CONFIG_USB_ISP1760=m
CONFIG_USB_ISP1760_HCD=y
CONFIG_USB_ISP1760_HOST_ROLE=y
CONFIG_USB_ISP1761_UDC=y
# CONFIG_USB_ISP1760_HOST_ROLE is not set
# CONFIG_USB_ISP1760_GADGET_ROLE is not set
# CONFIG_USB_ISP1760_DUAL_ROLE is not set
CONFIG_USB_ISP1760_DUAL_ROLE=y
#
# USB port drivers
@ -4084,7 +4085,7 @@ CONFIG_NOP_USB_XCEIV=y
# CONFIG_USB_GPIO_VBUS is not set
# CONFIG_USB_ISP1301 is not set
# CONFIG_USB_ULPI is not set
CONFIG_USB_GADGET=m
CONFIG_USB_GADGET=y
# CONFIG_USB_GADGET_DEBUG is not set
# CONFIG_USB_GADGET_DEBUG_FILES is not set
# CONFIG_USB_GADGET_DEBUG_FS is not set
@ -4117,23 +4118,24 @@ CONFIG_USB_F_EEM=m
CONFIG_USB_F_SUBSET=m
CONFIG_USB_F_RNDIS=m
CONFIG_USB_F_MASS_STORAGE=m
CONFIG_USB_F_UAC2=m
CONFIG_USB_F_UAC1=m
CONFIG_USB_F_UVC=m
CONFIG_USB_F_HID=m
CONFIG_USB_F_PRINTER=m
# CONFIG_USB_CONFIGFS is not set
# CONFIG_USB_ZERO is not set
CONFIG_USB_AUDIO=m
# CONFIG_GADGET_UAC1 is not set
CONFIG_GADGET_UAC1=y
CONFIG_USB_ETH=m
CONFIG_USB_ETH_RNDIS=y
CONFIG_USB_ETH_EEM=y
# CONFIG_USB_G_NCM is not set
# CONFIG_USB_GADGETFS is not set
CONFIG_USB_GADGETFS=m
# CONFIG_USB_FUNCTIONFS is not set
CONFIG_USB_MASS_STORAGE=m
CONFIG_USB_G_SERIAL=m
# CONFIG_USB_MIDI_GADGET is not set
# CONFIG_USB_G_PRINTER is not set
CONFIG_USB_G_PRINTER=m
CONFIG_USB_CDC_COMPOSITE=m
CONFIG_USB_G_ACM_MS=m
CONFIG_USB_G_MULTI=m
@ -4142,7 +4144,7 @@ CONFIG_USB_G_MULTI_RNDIS=y
CONFIG_USB_G_HID=m
# CONFIG_USB_G_DBGP is not set
CONFIG_USB_G_WEBCAM=m
CONFIG_USB_LED_TRIG=y
# CONFIG_USB_LED_TRIG is not set
# CONFIG_UWB is not set
CONFIG_MMC=y
# CONFIG_MMC_DEBUG is not set

View File

@ -541,7 +541,7 @@ usb_regulator_vol = 0
usb_not_suspend = 0
[usbc3]
usb_used = 0
usb_used = 1
usb_drv_vbus_gpio =
usb_restrict_gpio =
usb_host_init_state = 1

View File

@ -531,7 +531,7 @@ usb_regulator_vol = 0
usb_not_suspend = 0
[usbc2]
usb_used = 0
usb_used = 1
usb_drv_vbus_gpio =
usb_restrict_gpio =
usb_host_init_state = 1
@ -541,7 +541,7 @@ usb_regulator_vol = 0
usb_not_suspend = 0
[usbc3]
usb_used = 0
usb_used = 1
usb_drv_vbus_gpio =
usb_restrict_gpio =
usb_host_init_state = 1

View File

@ -174,12 +174,12 @@ case $BOARD in
DESKTOP_TARGET="trusty,next"
;;
bananapi)#enabled
bananapipro)#enabled
#description A20 dual core 1Gb SoC
#build 6
LINUXFAMILY="sun7i"
BOOTCONFIG="Bananapi_defconfig"
MODULES="hci_uart gpio_sunxi rfcomm hidp sunxi-ir bonding spi_sun7i 8021q a20_tp ap6210"
BOOTCONFIG="Bananapro_defconfig"
MODULES="hci_uart gpio_sunxi rfcomm hidp sunxi-ir bonding spi_sun7i 8021q a20_tp #ap6211"
MODULES_NEXT="brcmfmac bonding"
DESKTOP_TARGET="trusty,%"
;;

View File

@ -67,6 +67,8 @@ sed "s/NODM_ENABLED=\(.*\)/NODM_ENABLED=false/g" -i $DEST/cache/sdcard/etc/defau
# Compile Turbo Frame buffer for sunxi
if [[ $LINUXFAMILY == *sun* && $BRANCH == "default" ]]; then
mkdir -p $DEST/cache/sdcard/etc/udev/rules.d
cp $SRC/lib/config/sunxi-udev/* $DEST/cache/sdcard/etc/udev/rules.d/
grep "CONFIG_MALI is not set" $SOURCES/$LINUXSOURCEDIR/.config 2>&1 >/dev/null
local error_num=$?

View File

@ -19,6 +19,11 @@ Armbian supports starting with release 5.04 all available H3 based Orange Pi boa
- Full HDMI colour-range adjustable/accessible through _h3disp_ utility
- already useable as stable headless/server board
***Known issues with 5.04***
- Auto detection for the Orange Pi 2 doesn't work properly. Please have a look [for a manual fix](http://forum.armbian.com/index.php/topic/617-wip-orange-pi-one-support-for-the-upcoming-orange-pi-one/?p=5718) or wait for 5.05 where this will be fixed
- Mali acceleration currently only working for root user. Please apply [a fix](http://forum.armbian.com/index.php/topic/617-wip-orange-pi-one-support-for-the-upcoming-orange-pi-one/?p=5719) manually or wait for 5.05 to fix this
***Important to know***
- 1st boot takes longer (up to 5 minutes). Please do not interrupt while the red LED is blinking, the board reboots automatically one time and the green LED starts to blink when ready

View File

@ -1,11 +1,21 @@
# Release history
**v5.04 / 27.2.2016**
- added desktop images for H3 based boards
**v5.04 / 1.3.2016**
**v5.04 / 26.2.2016**
- Banana M1/PRO/M1+ rebuilded
- fixed SATA problem
- set OTG port in HOST mode in vanilla kernel
- wireless is working on PRO out of the box
- added utility to switch between OTG and HOST in vanilla kernel
- Bugs left: OTG mode not working, M1+ wireless not work in vanilla kernel
**v5.04 / 28.2.2016**
- H3 images rebuilded
- added desktop images for H3 based boards
- rebuilded Cubieboard 1 & 2 with 3.4.110 and 4.4.3
- fixed Bluetooth on Cubietruck + rebuild with 3.4.110 and 4.4.3
- all new images has no login policy: forced user generation
**v5.03 / 20.2.2016**

View File

@ -156,9 +156,12 @@ keyboard:
dpkg-reconfigure keyboard-configuration
system language:
system language:
# Debian --> https://wiki.debian.org/ChangeLanguage
dpkg-reconfigure locales
# Ubuntu --> https://help.ubuntu.com/community/Locale
update-locale LANG=[options] && dpkg-reconfigure locales
console font, codepage:

View File

@ -71,6 +71,9 @@ create_board_package (){
mkdir -p $destination/usr/local/bin
tar xfz $SRC/lib/bin/temper.tgz -C $destination/usr/local/bin
# add USB OTG port mode switcher
install -m 755 $SRC/lib/scripts/sunxi-musb $destination/usr/local/bin
# replace hostapd from latest self compiled & patched
mkdir -p $destination/usr/sbin/
tar xfz $SRC/lib/bin/hostapd25-rt.tgz -C $destination/usr/sbin/
@ -122,6 +125,7 @@ create_board_package (){
cp -p "$destination/boot/bin/orangepi2.bin" "$destination/boot/bin/orangepih3.bin"
# bluetooth device enabler - for cubietruck
install -m 755 $SRC/lib/bin/brcm_bt_reset $destination/usr/local/bin
install -m 755 $SRC/lib/bin/brcm_patchram_plus $destination/usr/local/bin
install $SRC/lib/scripts/brcm40183 $destination/etc/default
install -m 755 $SRC/lib/scripts/brcm40183-patch $destination/etc/init.d

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,94 @@
diff --git a/arch/arm/boot/dts/sun7i-a20-bananapro.dts b/arch/arm/boot/dts/sun7i-a20-bananapro.dts
index 18fcc87..d5519c6 100644
--- a/arch/arm/boot/dts/sun7i-a20-bananapro.dts
+++ b/arch/arm/boot/dts/sun7i-a20-bananapro.dts
@@ -66,13 +66,14 @@
pinctrl-0 = <&led_pins_bananapro>;
blue {
- label = "bananapro:blue:usr";
+ label = "bananapro:blue:usr";
gpios = <&pio 6 2 GPIO_ACTIVE_HIGH>;
};
green {
label = "bananapro:green:usr";
gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "mmc0";
};
};
@@ -95,6 +96,8 @@
regulator-name = "vmmc3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ regulator-boot-on;
enable-active-high;
gpio = <&pio 7 22 GPIO_ACTIVE_HIGH>;
};
@@ -104,6 +107,10 @@
status = "okay";
};
+&codec {
+ status = "okay";
+};
+
&ehci0 {
status = "okay";
};
@@ -164,12 +171,26 @@
};
&mmc3 {
+ #address-cells = <1>;
+ #size-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&mmc3_pins_a>;
vmmc-supply = <&reg_vmmc3>;
bus-width = <4>;
non-removable;
+ enable-sdio-wakeup;
status = "okay";
+
+/*
+ brcmf: bcrmf@1 {
+ reg = <1>;
+ compatible = "brcm,bcm4329-fmac";
+ interrupt-parent = <&pio>;
+ interrupts = <15 8>;
+ interrupt-names = "host-wake";
+ };
+*/
+
};
&ohci0 {
@@ -180,6 +201,10 @@
status = "okay";
};
+&otg_sram {
+ status = "okay";
+};
+
&pio {
gmac_power_pin_bananapro: gmac_power_pin@0 {
allwinner,pins = "PH23";
@@ -262,8 +287,11 @@
status = "okay";
};
-&usbphy {
- usb1_vbus-supply = <&reg_usb1_vbus>;
- usb2_vbus-supply = <&reg_usb2_vbus>;
+&usb_otg {
+ dr_mode = "host";
status = "okay";
};
+
+&usbphy {
+ status = "okay";
+};
\ No newline at end of file

View File

@ -0,0 +1,19 @@
diff --git a/configs/Bananapi_defconfig b/configs/Bananapi_defconfig
index 6cbb76c..5ed845c 100644
--- a/configs/Bananapi_defconfig
+++ b/configs/Bananapi_defconfig
@@ -15,3 +15,4 @@ CONFIG_CMD_GPIO=y
CONFIG_NETCONSOLE=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_USB_EHCI_HCD=y
+CONFIG_AXP_ALDO4_VOLT=2500
diff --git a/configs/Bananapro_defconfig b/configs/Bananapro_defconfig
index 40588b9..f1554bc 100644
--- a/configs/Bananapro_defconfig
+++ b/configs/Bananapro_defconfig
@@ -17,3 +17,4 @@ CONFIG_CMD_GPIO=y
CONFIG_NETCONSOLE=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_USB_EHCI_HCD=y
+CONFIG_AXP_ALDO4_VOLT=2500
\ No newline at end of file

View File

@ -7,4 +7,13 @@ index 6cbb76c..5ed845c 100644
CONFIG_ETH_DESIGNWARE=y
CONFIG_USB_EHCI_HCD=y
+CONFIG_AXP_ALDO4_VOLT=2500
diff --git a/configs/Bananapro_defconfig b/configs/Bananapro_defconfig
index 40588b9..f1554bc 100644
--- a/configs/Bananapro_defconfig
+++ b/configs/Bananapro_defconfig
@@ -17,3 +17,4 @@ CONFIG_CMD_GPIO=y
CONFIG_NETCONSOLE=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_USB_EHCI_HCD=y
+CONFIG_AXP_ALDO4_VOLT=2500
\ No newline at end of file

View File

@ -13,6 +13,17 @@ if [ "X$1" != "Xstart" ]; then
exit 1
fi
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
create_motd_warning() {
cat > /etc/update-motd.d/90-warning <<EOT
#!/bin/bash
echo -e "\e[0;91mAttention:\x1B[0m $1\n"
rm "\$0"
EOT
chmod +x /etc/update-motd.d/90-warning
} # create_motd_warning
TMPFILE=$(mktemp /tmp/${0##*/}.XXXXXX)
trap "rm \"${TMPFILE}\" ; exit 0" 0 1 2 3 15
dmesg >"${TMPFILE}"
@ -30,6 +41,7 @@ TERMINUS=$(lsusb | grep "1a40:0101")
SWITCH=$(grep "BCM53125" "${TMPFILE}")
INTERUPT=$(grep "eth0" /proc/interrupts)
WIFI8189ES=$(lsmod | grep 8189es | grep -v "0 $" | grep -v "0$") # ignore when not loaded
WIFIAP6211=$(lsmod | grep ap6211)
for i in $( lsblk -idn -o NAME ); do
read ROTATE </sys/block/$i/queue/rotational
@ -72,6 +84,8 @@ if [ "$ARCH" = "armv7l" ]; then
ID="Lamobo R1"
elif [ "$LEDS" != "" ]; then
ID="Lime 2"
elif [ "$WIFIAP6211" != "" ]; then
ID="Banana PRO"
else
ID="Banana"
fi
@ -156,13 +170,22 @@ if [ "$ARCH" = "armv7l" ]; then
fi
# prepare board/settings mismatch detection. If we cleanup board/config names then this
# might work for all boards later and can be moved from sun8i section further down to support
# all $HARDWARE variants
# all $HARDWARE variants. Only check board after 1st login already happened to be not in
# conflict with our board auto detection mechanisms
ScriptBinName="$(echo "${ID}" | tr '[:upper:]' '[:lower:]' | sed -e 's/+/plus/' -e 's/\ //g' -e 's/2mini$/2/g' -e 's/plus2$/plus/g').bin"
ScriptBinUsed="$(readlink -f "/boot/script.bin")"
if [ "X${ScriptBinName}" != "X${ScriptBinUsed##*/}" ]; then
:
if [ "X${ScriptBinName}" != "X${ScriptBinUsed##*/}" -a ! -f "/root/.not_logged_in_yet" ]; then
create_motd_warning "It seems the image is running on ${ID} but you're using wrong settings: ${ScriptBinUsed##*/}"
fi
fi
elif [ "$ARCH" = "aarch64" ]; then
if [ $HARDWARE = "sun50iw1p1" ]; then
if [ $MEMTOTAL -gt 600 ]; then
ID="Pine64+"
else
ID="Pine64"
fi
fi
fi
[ -f /proc/device-tree/model ] && read MACHINE </proc/device-tree/model
@ -182,3 +205,27 @@ if [[ $MACHINE == *M2* ]]; then ID="Banana M2"; fi
echo -e "[\e[0;32m ok \x1B[0m] Starting ARM hardware info: $ID"
echo $ID > /var/run/machine.id
export HARDWARE DISTROID DISTROCODE ARCH KERNELID MACHINE ID
if [ -f /var/log/armhwinfo.log ]; then
echo -e "\n\n\n$(date) $HARDWARE $DISTROID $DISTROCODE $ARCH $KERNELID $MACHINE $ID" >>/var/log/armhwinfo.log
else
echo "$(date) $HARDWARE $DISTROID $DISTROCODE $ARCH $KERNELID $MACHINE $ID" >>/var/log/armhwinfo.log
chmod 755 /var/log/armhwinfo.log
fi
cat /proc/version >>/var/log/armhwinfo.log
echo -e "\n### dmesg:\n" >>/var/log/armhwinfo.log
cat "${TMPFILE}" >>/var/log/armhwinfo.log
echo -e "\n### lsusb:" >>/var/log/armhwinfo.log
lsusb -v >>/var/log/armhwinfo.log
echo -e "\n### lscpu:\n" >>/var/log/armhwinfo.log
lscpu >>/var/log/armhwinfo.log
echo -e "\n### cpuinfo:\n" >>/var/log/armhwinfo.log
cat /proc/cpuinfo >>/var/log/armhwinfo.log
echo -e "\n### meminfo:\n" >>/var/log/armhwinfo.log
cat /proc/meminfo >>/var/log/armhwinfo.log
echo -e "\n### interrupts:\n" >>/var/log/armhwinfo.log
cat /proc/interrupts >>/var/log/armhwinfo.log
echo -e "\n### ifconfig:\n" >>/var/log/armhwinfo.log
ifconfig >>/var/log/armhwinfo.log
echo -e "\n### df:\n" >>/var/log/armhwinfo.log
df -h >>/var/log/armhwinfo.log

View File

@ -42,6 +42,9 @@ else
PORT="ttyS1"
fi
# reset port
/usr/local/bin/brcm_bt_reset /dev/$PORT
# Start patching
/bin/echo -en "" > /dev/$PORT # pull down RTS on UART
log_action_begin_msg "Start pushing firmware to device and waiting max. 60sec to complete"

View File

@ -16,7 +16,7 @@
# Create this file to speed up boot process
#
# Immediately exit if not called correctly
# Immediately exit if not called by init system
if [ "X$1" != "Xstart" ]; then
exit 1
fi
@ -94,10 +94,16 @@ display_alert() {
fi
}
autodetect_a20() {
sleep 3
MACHINE="$(tail -n1 /run/machine.id)"
}
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.
# /run/machine.id so that two OS images (one built for GbE H3 devices like
# Orange Pi Plus or Banana Pi M2+ and one for the other H3 devices using
# the internal Ethernet PHY) can be shipped.
#
# TODO for mainline kernel: Ship with u-boot debs for all Oranges and install
# the right one instead of trying to relink script.bin if detecting mainline
@ -111,9 +117,16 @@ autodetect_h3() {
# wait for armhwinfo
sleep 3
MACHINE="$(tail -n1 /run/machine.id)"
NEWHOSTNAME="$(echo "${MACHINE}" | tr '[:upper:]' '[:lower:]' | sed -e 's/+/plus/' -e 's/\ //g')"
ScriptBinName="$(echo "${NEWHOSTNAME}" | sed -e 's/2mini$/2/g' -e 's/plus2$/plus/g').bin"
ScriptBinUsed="$(readlink -f "/boot/script.bin")"
case ${MACHINE} in
"Orange Pi+"*)
ln -sf /boot/bin/orangepiplus.bin /boot/script.bin
if [ "X${ScriptBinName}" != "X${ScriptBinUsed##*/}" ]; then
# wrong detection due to disabled Ethernet on 1st boot
ln -sf /boot/bin/orangepi2.bin /boot/script.bin
NEWHOSTNAME="orangepi2"
fi
;;
"Orange Pi 2"*)
ln -sf /boot/bin/orangepi2.bin /boot/script.bin
@ -131,8 +144,14 @@ autodetect_h3() {
sed -i -e 's/MIN_SPEED=480000/MIN_SPEED=648000/' \
-e 's/MAX_SPEED=1296000/MAX_SPEED=1200000/' /etc/default/cpufrequtils
;;
"Banana Pi M2+")
if [ "X${ScriptBinName}" != "X${ScriptBinUsed##*/}" ]; then
# wrong detection due to disabled Ethernet on 1st boot
ln -sf /boot/bin/orangepipc.bin /boot/script.bin
NEWHOSTNAME="orangepipc"
fi
;;
esac
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
@ -160,7 +179,14 @@ do_expand_rootfs() {
return 0
}
check_prerequisits() {
for needed_tool in fdisk parted partprobe resize2fs ; do
which ${needed_tool} >/dev/null 2>&1 || exit 1
done
} # check_prerequisits
main() {
check_prerequisits
collect_informations
display_alert "Force password change upon first login"
chage -d 0 root
@ -179,10 +205,13 @@ main() {
autodetect_h3
fi
if [ "X${HARDWARE}" = "Xsun7i" ]; then
autodetect_a20
fi
update-rc.d -f firstrun remove >/dev/null 2>&1
sed -i 's/allow-hotplug\ eth0/auto eth0/' /etc/network/interfaces.default
} # main
main
exit 0

39
scripts/sunxi-musb Normal file
View File

@ -0,0 +1,39 @@
#!/bin/bash
#
#
# sunxi_musb
#
# Patches Device Tree Blob to modify dr_mode - function of the OTG port
#
# Usage: filename.dtb otg | host
#
# It searches for dtb files in /boot/dtb
#
# It's a part of Armbian project.
if [[ -z $1 ]]; then
echo -e "OTG / HOST changer for DTB v1.0"
echo -e "\n`basename "$0"` filename.dtb otg | host"
echo -e ""
echo -e "\e[0;32mUsage example:\x1B[0m `basename "$0"` sun4i-a10-mini-xplus.dtb otg"
echo -e
exit
fi
[[ ! -f "/boot/dtb/$1" ]] && echo -e "[\e[0;31m Device tree blob /boot/dtb/$1 not found \x1B[0m]"
if [[ $2 != "otg" && $2 != "host" ]]; then
echo -e "[\e[0;31m error \x1B[0m] Unkown parameter $2"
exit 2
fi
( dtc -I dtb -O dts /boot/dtb/$1 | grep dr_mode ) > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo -e "[\e[0;31m error \x1B[0m] dr_mode undefined in /boot/dtb/$1"
exit 1
fi
dtc -I dtb -O dts /boot/dtb/$1 | sed -e "s/dr_mode =.*/dr_mode = \"$2\";/" | dtc -I dts -O dtb -o /boot/dtb/$1
echo -e "[\e[0;32m o.k. \x1B[0m] $2 mode enabled in /boot/dtb/$1"

View File

@ -182,7 +182,7 @@ select_boards ()
if [ -z "$BOARD" ]; then
IFS=" "
Options="Cubieboard A10 Cubieboard2 A20 Cubietruck A20 Lime-A10 A10 Lime \
A20 Lime2 A20 Micro A20 Bananapi A20 Lamobo-R1 A20 Orangepi A20 Pcduino3nano A20"
A20 Lime2 A20 Micro A20 Bananapipro A20 Lamobo-R1 A20 Orangepi A20 Pcduino3nano A20"
BoardOptions=($Options);
BoardCmd=(dialog --title "Choose a board:" --backtitle "$backtitle" --menu "\n$infos" 20 60 26)
BoardChoices=$("${BoardCmd[@]}" "${BoardOptions[@]}" 2>&1 >/dev/tty)
@ -216,7 +216,7 @@ if [[ $BRANCH == "vanilla" ]] ; then
fi
case $BOARD in
bananapi | bananapipro | lamobo-r1 | orangepi | orangepimini)
bananapipro | lamobo-r1 | orangepi | orangepimini)
LINUXFAMILY="sun7i"
if [[ $BRANCH == "vanilla" ]] ; then LINUXFAMILY="sunxi"; fi
;;