Small bugfixes regarding firstrun/resize2fs and BT on BPi M2+

This commit is contained in:
ThomasKaiser
2016-06-08 22:40:33 +02:00
parent 031cac1564
commit 2ff6fc6819
3 changed files with 10 additions and 9 deletions

View File

@@ -269,10 +269,10 @@ uart_rx = port:PA05<2><1><default><default>
uart_used = 1
uart_port = 1
uart_type = 4
uart_tx = port:PG06<3><1><default><default>
uart_rx = port:PG07<3><1><default><default>
uart_rts = port:PG08<3><1><default><default>
uart_cts = port:PG09<3><1><default><default>
uart_tx = port:PG06<2><1><default><default>
uart_rx = port:PG07<2><1><default><default>
uart_rts = port:PG08<2><1><default><default>
uart_cts = port:PG09<2><1><default><default>
[uart2]
uart_used = 1

View File

@@ -109,7 +109,7 @@ adjust_sunxi_settings() {
# set some mac address for wifi
[[ "$(lsmod | grep 8189fs)" != "" ]] && \
(MACADDR=$(printf '43:29:B1:%02X:%02X:%02X\n' $[RANDOM%256] $[RANDOM%256] $[RANDOM%256]) ; \
echo "options 8189fs rtw_initmac=${MACADDR}" > /etc/modprobe.d/8189fs.conf \
echo "options 8189fs rtw_initmac=${MACADDR}" > /etc/modprobe.d/8189fs.conf ; \
echo -e "\n### [firstrun] Use MAC address ${MACADDR} for Wi-Fi from now" >>${Log})
# set some mac address for BT
@@ -200,7 +200,7 @@ do_expand_rootfs() {
fi
# Start resizing
echo -e "\n### [firstrun] ${ResizeLog}. Start resizing\n\nPartitions now:\n" >>${Log}
echo -e "\n### [firstrun] ${ResizeLog}. Start resizing Partition now:\n" >>${Log}
cat /proc/partitions >>${Log}
echo -e "\nAnd then:\n" >>${Log}
((echo d; echo $PARTITIONS; echo n; echo p; echo ; echo $STARTFROM; echo ${LASTSECTOR} ; echo w;) | fdisk ${DEVICE}) >/dev/null || true
@@ -217,7 +217,7 @@ do_expand_rootfs() {
touch /var/run/reboot
display_alert "Automatic reboot is needed. Please wait"
update-rc.d resize2fs defaults >/dev/null 2>&1
echo -e "\nAutomated reboot needed to let /etc/init.d/resize2fs do the job\n" >>${Log}
echo -e "\n### [firstrun] Automated reboot needed to let /etc/init.d/resize2fs do the job\n" >>${Log}
fi
return 0
} # do_expand_rootfs
@@ -257,4 +257,4 @@ main() {
rm /tmp/firstrun_running
} # main
main
main

View File

@@ -37,7 +37,8 @@ fi
case "$1" in
start)
if [[ $rootfstype == ext4 && ! -f "/root/.no_rootfs_resize" ]]; then
/sbin/resize2fs $device >>${Log} 2>&1
echo -e "\n### [resize2fs] Start resizing partition now\n" >>/var/log/armhwinfo.log
/sbin/resize2fs $device >>/var/log/armhwinfo.log 2>&1
fi
if [[ ! -f "/var/swap" ]]; then
dd if=/dev/zero of=/var/swap bs=1024 count=131072 status=noxfer >/dev/null 2>&1