From 5b52162dd952dd68c06bfa3d638e672bb8aab1b4 Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Tue, 23 Apr 2013 09:32:52 -0500 Subject: [PATCH] bone: introduce warning system Signed-off-by: Robert Nelson --- hwpack/am335x-bone-serial.conf | 2 ++ hwpack/am335x-bone-video.conf | 2 ++ hwpack/am335x-boneblack.conf | 2 ++ mk_mmc.sh | 27 +++++++++++++++++++++++++++ 4 files changed, 33 insertions(+) diff --git a/hwpack/am335x-bone-serial.conf b/hwpack/am335x-bone-serial.conf index 2a5c5ca..02962c2 100644 --- a/hwpack/am335x-bone-serial.conf +++ b/hwpack/am335x-bone-serial.conf @@ -46,3 +46,5 @@ SERIAL_CONSOLE="${SERIAL},115200n8" SERIAL_MODE=1 USE_KMS=1 + +conf_warning="MMC: Please use a 5Volt DC power supply, as the board may lockup during the mmc formating stage. ONBOARD Ethernet: dhcp ip retrieval is failing, use external usb-ethernet during initial install." diff --git a/hwpack/am335x-bone-video.conf b/hwpack/am335x-bone-video.conf index c97a041..31686a5 100644 --- a/hwpack/am335x-bone-video.conf +++ b/hwpack/am335x-bone-video.conf @@ -45,3 +45,5 @@ SERIAL="ttyO0" SERIAL_CONSOLE="${SERIAL},115200n8" USE_KMS=1 + +conf_warning="MMC: Please use a 5Volt DC power supply, as the board may lockup during the mmc formating stage. ONBOARD Ethernet: dhcp ip retrieval is failing, use external usb-ethernet during initial install." diff --git a/hwpack/am335x-boneblack.conf b/hwpack/am335x-boneblack.conf index a018964..604f9c5 100644 --- a/hwpack/am335x-boneblack.conf +++ b/hwpack/am335x-boneblack.conf @@ -45,3 +45,5 @@ SERIAL="ttyO0" SERIAL_CONSOLE="${SERIAL},115200n8" USE_KMS=1 + +conf_warning="MMC: Please use a 5Volt DC power supply, as the board may lockup during the mmc formating stage. ONBOARD Ethernet: dhcp ip retrieval is failing, use external usb-ethernet during initial install." diff --git a/mk_mmc.sh b/mk_mmc.sh index 8c4798b..c8189ef 100755 --- a/mk_mmc.sh +++ b/mk_mmc.sh @@ -1463,6 +1463,24 @@ uboot_dtb_error () { echo "-----------------------------" } +show_board_warning () { + echo "-----------------------------" + echo "Warning: at this time, this board [${dtb_board}] has a few issues with the NetInstall" + echo "-----------------------------" + echo ${conf_warning} + echo "-----------------------------" + echo "Alternate install:" + echo "http://elinux.org/BeagleBoardUbuntu#Demo_Image" + echo "http://elinux.org/BeagleBoardDebian#Demo_Image" + echo "-----------------------------" + unset response + echo -n "Knowing these issues, would you like to continue to install [${dtb_board}] (y/n)? " + read response + if [ "x${response}" != "xy" ] ; then + exit + fi +} + check_dtb_board () { error_invalid_uboot_dtb=1 @@ -1479,6 +1497,11 @@ check_dtb_board () { . "${DIR}"/hwpack/${dtb_board}.conf populate_dtbs=1 unset error_invalid_uboot_dtb + + if [ "${conf_warning}" ] ; then + show_board_warning + fi + else uboot_dtb_error exit @@ -1524,6 +1547,9 @@ is_omap () { convert_uboot_to_dtb_board () { populate_dtbs=1 + if [ "${conf_warning}" ] ; then + show_board_warning + fi } check_uboot_type () { @@ -1610,6 +1636,7 @@ check_uboot_type () { bone_dt|bone_dtb) echo "Note: [--dtb am335x-bone-serial] now replaces [--uboot bone_dtb]" . "${DIR}"/hwpack/am335x-bone-serial.conf + dtb_board="am335x-bone-serial" convert_uboot_to_dtb_board ;; igepv2)