Add NAND issues warning to nand-sata-install
This commit is contained in:
parent
cf5eda358e
commit
2a7ccaca1a
@ -290,12 +290,31 @@ umountdevice()
|
||||
fi
|
||||
} # umountdevice
|
||||
|
||||
show_nand_warning()
|
||||
{
|
||||
local temp_rc=$(mktemp)
|
||||
cat <<-'EOF' > $temp_rc
|
||||
screen_color = (WHITE,RED,ON)
|
||||
EOF
|
||||
local warn_text="You are installing the system to sunxi NAND.
|
||||
|
||||
This is not recommended as NAND has \Z1worse performance
|
||||
and reliability\Zn than a good SD card.
|
||||
|
||||
You have been warned."
|
||||
|
||||
DIALOGRC=$temp_rc dialog --title "NAND warning" --backtitle "$backtitle" --colors \
|
||||
--ok-label "I understand and agree" --msgbox "$warn_text" 10 70
|
||||
}
|
||||
|
||||
# formatting sunxi NAND - no parameters, fixed solution.
|
||||
#
|
||||
formatnand()
|
||||
{
|
||||
[[ ! -e /dev/nand ]] && echo "NAND error" && exit 0
|
||||
|
||||
show_nand_warning
|
||||
|
||||
dialog --title "$title" --backtitle "$backtitle" --infobox "\nFormating ... up to one minute." 5 40
|
||||
if [[ $DEVICE_TYPE = a20 ]]; then
|
||||
(echo y;) | sunxi-nand-part -f a20 /dev/nand 65536 'bootloader 65536' 'linux 0' >> $logfile 2>&1
|
||||
|
||||
Loading…
Reference in New Issue
Block a user