Bananian

Banana PRO - Issue with bananian-config / bananian-hardware

2 2920
Alecto  
Hello guys,

I've a big prolbem with select board at bananian-hardware, i can't select BananaPRO or BananaPRO OTG from visual interfaces open with previous command (and consequently i can't activate wifi modules).

My board is BananaPro, i try to use enter button, asterisk, "+" button etc... but the selection remain at BananaPi.

I hope to hear a tough guy can help me!

- Alecto.
Alecto  
EDIT:
Solved!

In the followingpath:
  1. /usr/local/bin/bananian-hardware
Copy the Code
i found this script
  1. # get Bananian platform (default: BananaPi) and version
  2. [ -f /etc/bananian_platform ] && BANANIAN_PLATFORM=$(cat /etc/bananian_platform) || BANANIAN_PLATFORM="BananaPi"
  3. [ -f /etc/bananian_version ] && BANANIAN_VERSION=$(cat /etc/bananian_version) || BANANIAN_VERSION=140801

  4. if [ $BANANIAN_VERSION -lt 150101 ]; then {
  5.         echo -e "\033[0;31mThis version of bananian-hardware requires Bananian Linux 15.01 (or later). Exiting\033[0m"
  6.         exit
  7. } fi

  8. # prepare tmp dir
  9. TMPDIR=$(mktemp -d)
  10. cd $TMPDIR

  11. # mount /dev/mmcblk0p1
  12. mkdir ${TMPDIR}/mnt
  13. mount /dev/mmcblk0p1 ${TMPDIR}/mnt

  14. # fex dir
  15. FEXDIR="${TMPDIR}/mnt/fex"

  16. # read available fex configurations
  17. RADIOLIST=()
  18. for FEX in ${FEXDIR}/*
  19. do
  20.         FEX=$(basename $FEX)
  21.         if [ "$FEX" = "$BANANIAN_PLATFORM" ]; then {
  22.                 RADIOLIST+=("$FEX" "" "ON")
  23.         } else {
  24.                 RADIOLIST+=("$FEX" "" "OFF")
  25.         } fi
  26. done

  27. # show dialog
  28. BANANIAN_PLATFORM=$(whiptail --title "Bananian hardware configuration" --radiolist \
  29.         "\nPlease select your Banana board:" 20 78 10 \
  30.         "${RADIOLIST[@]}" \
  31.         3>&1 1>&2 2>&3)

  32. if [[ $BANANIAN_PLATFORM = *"OTG"* ]] || [[ $BANANIAN_PLATFORM = *"otg"* ]]; then {
  33.         if ! (whiptail --title "Warning" --yesno "Enabling OTG can lead to an unbootable system!\nTo avoid this issue please make sure you use the 'DC in' port for power supply\nin combination with a reliable 2 A power adapter\n\nDo you want to continue?" 12 85); then {
  34.                 BANANIAN_PLATFORM=""
  35.         } fi
  36. } fi

  37. # verify selection and set correct script.bin
  38. if [[ -z $BANANIAN_PLATFORM ]]; then {
  39.         echo -e "\033[0;31mNo platform selected. exiting!\033[0m"
  40. } else {
  41.         if [[ -f ${FEXDIR}/${BANANIAN_PLATFORM}/script.bin ]]; then {
  42.                 cp ${FEXDIR}/${BANANIAN_PLATFORM}/script.bin ${TMPDIR}/mnt/script.bin
  43.                 echo $BANANIAN_PLATFORM > /etc/bananian_platform
  44.                 echo -e "Hardware configuration has been set to: ${BANANIAN_PLATFORM}. Please reboot your system!"
  45.         } else {
  46.                 echo -e "\033[0;31mscript.bin not found. exiting!\033[0m"
  47.         } fi
  48. } fi

  49. # clean up
  50. umount ${TMPDIR}/mnt && rm -rf $TMPDIR
Copy the Code
at this string i see something...
  1. [ -f /etc/bananian_platform ] && BANANIAN_PLATFORM=$(cat /etc/bananian_platform) || BANANIAN_PLATFORM="BananaPi"
Copy the Code
at this point i've edit this file:
  1. nano etc/bananian_platform
Copy the Code
Delete "BananaPI" and insert "BananaPRO" and launch bananian-hardware (finally the RadioList show asterisk at correct board)
Press OK and Reboot.

I hope this can help someone to resolve similar issues.

Now, which may have been the problem of the non-functioning of radiolist?
I see the permission of involved files and it's ok.

Sorry for my horrible English

Use <space> to select an entry in the list.

http://en.wikibooks.org/wiki/Bas ... Whiptail#Radio_list

You have to log in before you can reply Login | Sign Up

Points Rules