#8 move list of supported targets into text file
Merged 2 years ago by pbrobinson. Opened 2 years ago by hrw.
hrw/arm-image-installer master  into  master

move list of supported targets into text file
Marcin Juszkiewicz • 2 years ago  
file added
+27

@@ -0,0 +1,27 @@ 

+ AllWinner ones:

+     A10-OLinuXino-Lime A10s-OLinuXino-M A13-OLinuXino A13-OLinuXinoM

+     A20-OLinuXino-Lime A20-OLinuXino-Lime2 A20-OLinuXino_MICRO

+     A20-Olimex-SOM-EVB Ampe_A76 Auxtek-T003 Auxtek-T004 Bananapi Bananapro CHIP

+     CSQ_CS908 Chuwi_V7_CW0825 Colombus Cubieboard Cubieboard2 Cubietruck

+     Cubietruck_plus Hummingbird_A31 Hyundai_A7HD Itead_Ibox_A20 Lamobo_R1

+     Linksprite_pcDuino Linksprite_pcDuino3 Linksprite_pcDuino3_Nano MK808C

+     MSI_Primo73 MSI_Primo81 Marsboard_A10 Mele_A1000 Mele_A1000G_quad Mele_I7

+     Mele_M3 Mele_M5 Mele_M9 Mini-X Orangepi Orangepi_mini Sinlinx_SinA31s

+     UTOO_P66 Wexler_TAB7200 Wits_Pro_A20_DKT Yones_Toptech_BS1078_V2

+     ba10_tv_box colorfly_e708_q1 difrnce_dit4350 dserve_dsrv9703c i12-tvbox

+     iNet_86VS icnova-a20-swac inet86dz jesurun_q5 mk802 mk802_a10s mk802ii

+     orangepi_2 orangepi_lite orangepi_pc orangepi_plus polaroid_mid2809pxe04

+     pov_protab2_ips9 q8_a13_tablet q8_a23_tablet_800x480 q8_a33_tablet_1024x600

+     q8_a33_tablet_800x480 r7-tv-dongle sunxi_Gemei_G9

+ 

+ MX6 ones:

+     cm_fx6 mx6cuboxi novena riotboard wandboard

+ 

+ OMAP ones:

+     am335x_boneblack am57xx_evm kc1 omap3_beagle omap4_panda omap5_uevm

+ 

+ MVEBU ones:

+     clearfog

+ 

+ Other ones:

+     jetson-tk1 trimslice

file modified
+4 -45

@@ -14,7 +14,6 @@ 

  

     --image=IMAGE    - xz compressed image file name

     --target=TARGET  - target board

-    --list-targets   - list supported boards

     --media=DEVICE   - media device file (/dev/[sdX|mmcblkX])

     --selinux=ON/OFF - Turn SELinux off/on as needed

     --norootpass     - Remove the root password

@@ -23,7 +22,10 @@ 

     --resizefs	    - Resize root filesystem to fill media device

     --addconsole     - Add system console to extlinux.conf

  

- Example: $(basename ${0}) --image=Fedora-Rawhide.xz --target=Bananapi --media=/dev/mmcblk0" --selinux=OFF 

+ Example: $(basename ${0}) --image=Fedora-Rawhide.xz --target=Bananapi --media=/dev/mmcblk0 --selinux=OFF

+ 

+ For list of supported boards please check SUPPORTED-BOARDS file.

+ "

  }

  

  # Set some global variables for the command directory, target board directory,

@@ -87,9 +89,6 @@ 

                  --addconsole)

                          CONSOLE=1

                          ;;

-                 --list-targets)

-                         LISTTARGETS=1

-                         ;;

                  --version)

                          echo "$(basename ${0})-"$VERSION""

                          exit 0

@@ -117,46 +116,6 @@ 

      fi

  }

  

- if [ ! -z "$LISTTARGETS" ]; then

-         cd $BOARDDIR

-         echo "Supported boards are:"

-         echo ""

-         echo "AllWinner SoC based:"

-         ALLWINNER=$(find . -type l -ls|grep AllWinner|cut -d"/" -f2|cut -d" " -f1|sort)

-         echo $ALLWINNER | sed -e 's/[[:space:]]/ /g' | fold -w 80 -s

- 

-         echo ""

-         echo "i.Mx6 SoC based:"

-         MX6=$(find . -type l -ls|grep /imx6|cut -d"/" -f2|cut -d" " -f1|sort)

-         echo $MX6 | sed -e 's/[[:space:]]/ /g' | fold -w 80 -s

- 

-         echo ""

-         echo "TI SoC based:"

-         OMAP=$(find . -type l -ls|grep /omap|cut -d"/" -f2|cut -d" " -f1|sort)

-         echo $OMAP | sed -e 's/[[:space:]]/ /g' | fold -w 80 -s

- 

-         echo ""

-         echo "Marvell SoC based:"

-         MVEBU=$(find . -type l -ls|grep /mvebu|cut -d"/" -f2|cut -d" " -f1|sort)

-         echo $MVEBU | sed -e 's/[[:space:]]/ /g' | fold -w 80 -s

- 

-         TARGETS=$(ls -1 ${BOARDDIR})

-         TARGETS=$(echo ${TARGETS} | sed -e 's/[[:space:]]/ /g')

- 

-         for board in $TARGETS

-         do

-                 if [[ none == $board || $ALLWINNER =~ $board || $MX6 =~ $board || $OMAP =~ $board || $MVEBU =~ $board ]]; then

-                         A=1

-                 else

-                         OTHER="$OTHER $board"

-                 fi

-         done

-         echo ""

-         echo "Other SoC based:"

-         echo $OTHER

-         exit 0

- fi

- 

  # ensure sudo user

  if [ "$(whoami)" != "root" ] ; then

          echo "Error: This script requires 'sudo' privileges in order to write to disk & mount media."

file added
+47

@@ -0,0 +1,47 @@ 

+ #!/bin/python3

+ 

+ import os

+ import pprint

+ import re

+ 

+ def printboards(boards):

+     print("%s\n" % re.sub(r"'|[)]|[(]|^ ", '', pprint.pformat("%s" % boards, width=80)))

+ 

+ os.chdir("boards.d")

+ 

+ allwinner = ""

+ mx6 = ""

+ omap = ""

+ mvebu = ""

+ other = ""

+ 

+ for entry in sorted(os.listdir('.')):

+ 

+     if os.path.islink(entry):

+         if 'AllWinner' in os.path.realpath(entry):

+             allwinner += "%s " % entry

+         elif 'omap' in os.path.realpath(entry):

+             omap += "%s " % entry

+         elif 'imx6' in os.path.realpath(entry):

+             mx6 += "%s " % entry

+         elif 'mvebu' in os.path.realpath(entry):

+             mvebu += "%s " % entry

+         else:

+             if entry != 'none':

+                 other += "%s " % entry

+ 

+ 

+ print("AllWinner ones:")

+ printboards(allwinner)

+ 

+ print("MX6 ones:")

+ printboards(mx6)

+ 

+ print("OMAP ones:")

+ printboards(omap)

+ 

+ print("MVEBU ones:")

+ printboards(mvebu)

+ 

+ print("Other ones:")

+ printboards(other)

file modified
+4 -46

@@ -11,11 +11,13 @@ 

  Usage: $(basename ${0}) <options>

  

     --target=TARGET  - target board

-    --list-targets   - list supported boards

     --media=DEVICE   - media device file (/dev/[sdX|mmcblkX])

     --tag=KOJI TAG   - koji tag to download build

  

- Example: $(basename ${0}) --target=panda --media=/dev/mmcblk0"

+ Example: $(basename ${0}) --target=panda --media=/dev/mmcblk0

+ 

+ For list of supported boards please check SUPPORTED-BOARDS file.

+ "

  }

  

  # check the args

@@ -51,9 +53,6 @@ 

                                  shift

                          fi

                          ;;

-                 --list-targets)

-                         LISTTARGETS=1

-                         ;;

                  *)

                          echo "$(basename ${0}): Error - ${1}"

                          usage

@@ -70,47 +69,6 @@ 

          BOARDDIR="${DIR}/boards.d"

  fi

  

- if [ ! -z "$LISTTARGETS" ]; then

-         cd $BOARDDIR

-         echo "Supported boards are:"

-         echo ""

-         echo "AllWinner SoC based:"

-         ALLWINNER=$(find . -type l -ls|grep AllWinner|cut -d"/" -f2|cut -d" " -f1|sort)

-         echo $ALLWINNER | sed -e 's/[[:space:]]/ /g' | fold -w 80 -s

- 

-         echo ""

-         echo "i.Mx6 SoC based:"

-         MX6=$(find . -type l -ls|grep /imx6|cut -d"/" -f2|cut -d" " -f1|sort)

-         echo $MX6 | sed -e 's/[[:space:]]/ /g' | fold -w 80 -s

- 

-         echo ""

-         echo "TI SoC based:"

-         OMAP=$(find . -type l -ls|grep /omap|cut -d"/" -f2|cut -d" " -f1|sort)

-         echo $OMAP | sed -e 's/[[:space:]]/ /g' | fold -w 80 -s

- 

-         echo ""

-         echo "Marvell SoC based:"

-         MVEBU=$(find . -type l -ls|grep /mvebu|cut -d"/" -f2|cut -d" " -f1|sort)

-         echo $MVEBU | sed -e 's/[[:space:]]/ /g' | fold -w 80 -s

- 

-         TARGETS=$(ls -1 ${BOARDDIR})

-         TARGETS=$(echo ${TARGETS} | sed -e 's/[[:space:]]/ /g')

- 

-         for board in $TARGETS

-         do

-                 if [[ none == $board || $ALLWINNER =~ $board || $MX6 =~ $board || $OMAP =~ $board || $MVEBU =~ $board ]]; then

-                         A=1

-                 else

-                         OTHER="$OTHER $board"

-                 fi

-         done

-         echo ""

-         echo "Other SoC based:"

-         echo $OTHER

-         exit 0

- fi

- 

- 

  # check if media exists

  if [[ ! -e $MEDIA ]] ; then

          echo "Missing media"

We update list of supported devices from time to time (usually when
U-Boot gets new boards support) and do not ship boards.d/ files as
symlinks so previous attempt fail when arm-image-installer is installed
in host system.

Pull-Request has been merged by pbrobinson

2 years ago