Check-in [41197d3a04]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview

SHA1 Hash:41197d3a04ec33c072b6ee49d3855d620b4e0621
Date: 2012-07-14 02:15:26
User: BarryK
Comment:set audio routing for raspberry pi in quicksetup

Tags And Properties
Changes

Changes to woof-code/3builddistro

@@ -124,10 +124,11 @@
 #120704 sd card image, ext2 f.s., offer to bump to ext4 (without journal).
 #120705 refine upgrade ext2 to ext4. 120706 disktype misreports ext4 without journal as ext2.
 #120707 change relatime to noatime. see also rc.sysinit.
 #120708 added BOOT_QUICKSETUP='quickarm'. quickarm is symlink to /usr/sbin/quicksetup. leave out X config frame for arm boards.
 #120709 fix for pci.ids and usb.ids in "wrong" place. new BOOT_UDEVDCHILDREN.
+#120714 revert 120708. instead, BOOT_BOARD (= raspi, mele, odroidx, etc.) read by quicksetup.
 
 #v431 accepts passed params, from woof_gui_tabs:
 #$1=$CHOICE_KERNELPKG $2=$CHOICE_SCSI $3=$CHOICE_BIGMODEM $4=$CHK_FB_STATE $5=$CHK_EXOTIC_STATE $6=$CHK_RADICAL_STATE
 #100912 add $7=CHK_SIMPLE_FILENAMES
 
@@ -215,13 +216,29 @@
 current directory ${WKGDIR}/sandbox3
 to expand the SD image file, typically 4GB."
 echo "Press ENTER only for normal .iso creation, or "
 echo -n "any other printable character for SD-card: "
 read SDFLAG
+#120714 ask what type of arm board...
+if [ "$SDFLAG" != "" ];then
+ echo "...ok, chose sd-card image."
+ echo
+ echo "Type number of board that you are building for:
+1 Raspberry Pi
+2 Mele A1000 or A2000 (or other A10 board)
+3 ODROID-X (or other Exynos 4412 board)"
+ read boardnum
+ BOARDTYPE="`echo -n "$boardnum" | head -n $sdnumber | tail -n 1 | cut -f 2 -d ' '`"
+ case $BOARDTYPE in
+  Raspberry) BOOT_BOARD='raspi' ;;
+  Mele)      BOOT_BOARD='mele' ;;
+  ODROID-X)  BOOT_BOARD='odroidx' ;;
+ esac
+ echo "...you chose $BOOT_BOARD"
+fi
 if [ "$SDFLAG" != "" ];then
  #override module choices, as kernel is built customized to particular hardware...
- echo "...ok, chose sd-card image."
  CHOICE_BIGMODEM="Keep_big_modems"
  CHOICE_SCSI="Keep_SCSI"
  CHK_FB_STATE="false"
  CHK_EXOTIC_STATE="false"
  CHK_RADICAL_STATE="false"
@@ -2452,12 +2469,13 @@
 none          /sys         sysfs    defaults,noatime               0 0
 none          /dev/pts     devpts   gid=2,mode=620,noatime         0 0
 shmfs         /dev/shm     tmpfs    defaults,noatime      0 0' > rootfs-complete/etc/fstab
  echo "BOOT_DIRTYWRITE='1500'" >> rootfs-complete/etc/rc.d/BOOTCONSTRAINED #defer writing to disk. refer: http://www.lesswatts.org/tips/disks.php
  echo "BOOT_SCHEDULER='deadline'" >> rootfs-complete/etc/rc.d/BOOTCONSTRAINED #my kernel defaults to 'cfq', change to 'deadline'. refer: http://tombuntu.com/index.php/2008/09/04/four-tweaks-for-using-linux-with-solid-state-drives/
- echo "BOOT_QUICKSETUP='quickarm'" >> rootfs-complete/etc/rc.d/BOOTCONSTRAINED #120708 leaves out X config frame.
+ #echo "BOOT_QUICKSETUP='quickarm'" >> rootfs-complete/etc/rc.d/BOOTCONSTRAINED #120708 leaves out X config frame. 120714 removed.
  echo "BOOT_UDEVDCHILDREN='1'" >> rootfs-complete/etc/rc.d/BOOTCONSTRAINED #120709 is this a good idea? append --children-max=1 to udevd in rc.sysinit.
+ echo "BOOT_BOARD='${BOOT_BOARD}'" >> rootfs-complete/etc/rc.d/BOOTCONSTRAINED #120714 read by quicksetup.
 fi
 
 #120709 debian squeeze has /usr/share/misc/pci.ids, usb.ids, which confuses some apps, create symlinks...
 if [ ! -e rootfs-complete/usr/share/pci.ids ];then
  if [ -e rootfs-complete/usr/share/misc/pci.ids ];then
@@ -2654,11 +2672,11 @@
 
  echo
  echo "Please choose the SD-card skeleton image file, to suit target board."
  CNT=1
  echo -n "" > /tmp/3builddistro-probeimage
- ls -1 ../sd-skeleton-images | grep 'xz$' |
+ ls -1 ../sd-skeleton-images | grep 'xz$' | grep "$BOOT_BOARD" | #120714 BOOT_BOARD is raspi, mele, or odroidx.
  while read ONEIMAGE
  do
   echo "${CNT} ${ONEIMAGE}" >> /tmp/3builddistro-probeimage
   CNT=`expr $CNT + 1`
  done

Changes to woof-code/rootfs-skeleton/usr/sbin/delayedrun

@@ -44,10 +44,11 @@
 #120329 shinobar: download tweaks.
 #120401 added warning flash player may not work.
 #120403 removed adobe flash download. no, have changed to older version.
 #120620 removed adobe flash download. want quicksetup/welcome1stboot for any PUPMODE at first startup.
 #120708 run 'quickarm' instead of 'quicksetup' on arm boards. see 3builddistro, /usr/sbin/quicksetup.
+#120714 revert 120708.
 
 [ "`whoami`" != "root" ] && exec sudo -A ${0} ${@} #120110
 
 export TEXTDOMAIN=delayedrun
 export OUTPUT_CHARSET=UTF-8
@@ -124,11 +125,10 @@
   touch /var/local/delayedrun_firstboot_flag
   if [ "$DISTRO_XORG_AUTO" = "yes" ];then #see /etc/DISTRO_SPECS 111019
    #quick setup window for country and language and X resolution...
    QUICKSETUP="quicksetup"
    [ "`readlink /usr/bin/X | grep 'Xorg'`" = "" ] && QUICKSETUP="quickcountry" #probably Xvesa, offer country settings only.
-   [ "$BOOT_QUICKSETUP" != "" ] && QUICKSETUP="$BOOT_QUICKSETUP" #120708 see /etc/rc.d/BOOTCONSTRAINED
    ${QUICKSETUP}
   fi
   if [ -c /dev/mixer ];then #110113 test for sound ready, see /etc/init.d/10alsa.
    aplay /usr/share/audio/2barks.au &
    #wavplay /usr/share/audio/2barks.wav &

Deleted woof-code/rootfs-skeleton/usr/sbin/quickarm

Changes to woof-code/rootfs-skeleton/usr/sbin/quicksetup

@@ -42,10 +42,11 @@
 #120402 expand locale help window.
 #120524 Please wait... msg after click ok button.
 #120625 always display network frame, remove set-hostname button, added firewall and ntp checkboxes.
 #120627 support kbd pkg.
 #120708 'quickarm' symlink to 'quicksetup', for booting on arm boards. see also /etc/rc.d/BOOTCONSTRAINED and /usr/sbin/delayedrun.
+#120714 revert 120708. instead, read BOOT_BOARD to determine type of board booting off. support raspberry pi audio settings.
 
 [ "`whoami`" != "root" ] && exec sudo -A ${0} ${@}
 
 export TEXTDOMAIN=quicksetup
 export OUTPUT_CHARSET=UTF-8
@@ -53,10 +54,11 @@
 
 . /etc/DISTRO_SPECS
 . /etc/rc.d/PUPSTATE
 . /etc/rc.d/BOOTCONFIG
 . /etc/clock
+. /etc/rc.d/BOOTCONSTRAINED #120714
 
 PARAM1=""
 [ $1 ] && PARAM1="$1"
 PARAM2=""
 [ $2 ] && PARAM2="$2"
@@ -77,12 +79,16 @@
  chooselocale) SET_WINTITLE="2"; SET_COUNTRYFRAMETITLE="2"; SET_LOCALE="yes"; SET_BACKTITLE="2" ;;
  timezone-set) SET_WINTITLE="3"; SET_COUNTRYFRAMETITLE="3"; SET_TIMEZONE="yes"; SET_BACKTITLE="3" ;;
  quickcountry) SET_WINTITLE="4"; SET_LOCALE="yes"; SET_TIMEZONE="yes"; SET_KEYBOARD="yes"; SET_BACKTITLE="4" ;;
  countrywizard) SET_WINTITLE="5"; SET_LOCALE="yes"; SET_TIMEZONE="yes"; SET_KEYBOARD="yes"; SET_BACKTITLE="5" ;;
  xrandrshell) SET_WINTITLE="6"; SET_XRES="yes"; SET_BACKTITLE="6"; SET_XFRAMETITLE="6" ;;
- quickarm) SET_WINTITLE="1"; SET_LOCALE="yes"; SET_TIMEZONE="yes"; SET_KEYBOARD="yes"; SET_BACKTITLE="1"; SET_NETWORK="yes" ;; #120708
- *) SET_LOCALE="yes"; SET_TIMEZONE="yes"; SET_KEYBOARD="yes"; SET_XRES="yes"; SET_XWIZARD="yes"; SET_NETWORK="yes" ;;
+ *) #quicksetup
+  case $BOOT_BOARD in
+   raspi) SET_LOCALE="yes"; SET_TIMEZONE="yes"; SET_KEYBOARD="yes"; SET_NETWORK="yes"; SET_RP_AUDIO="yes"; SET_RP_VIDEO="yes" ;; #120714 Raspberry Pi
+   *) SET_LOCALE="yes"; SET_TIMEZONE="yes"; SET_KEYBOARD="yes"; SET_XRES="yes"; SET_XWIZARD="yes"; SET_NETWORK="yes" ;; #normal quicksetup.
+  esac
+ ;;
 esac
 [ "$SET_LOCALE" -o "$SET_TIMEZONE" -o "$SET_KEYBOARD" ] && SET_COUNTRY="yes"
 [ "$SET_XRES" -o "$SET_XWIZARD" ] && SET_X="yes"
 case $SET_WINTITLE in
  1) WINTITLE=$(gettext "Quick Setup") ;;
@@ -143,11 +149,11 @@
 #      <button tooltip-text=\"$(gettext 'Click button to apply hostname')\">
 #       <input file>/usr/local/lib/X11/mini-icons/mini-hostname.xpm</input>
 #       <action>/usr/sbin/hostname-set \$ENTRY_HOSTNAME ; echo \$? > /tmp/quicksetup-hostname-change-flag</action>
 #      </button>
 #      <text><label>\"                                            \"</label></text>
-if [ "$MYBASE" = "quicksetup" -o "$MYBASE" = "quickarm" ];then #120313 only allow in main quicksetup window. 120708 quickarm.
+if [ "$MYBASE" = "quicksetup" ];then #120313 only allow in main quicksetup window.
  if [ -f /var/local/quicksetup-network-check-flag1 ];then
     SET_NETWORK="yes"
     HOSTNAME="`cat /etc/hostname`" #do not use $HOSTNAME, as hostname-set may have just been run.
 
     #120625 firewall checkbox...
@@ -175,11 +181,11 @@
     H_net="$(gettext "Your computer has been assigned a unique name, known as the 'hostname', by which it identifies itself on a network.") $(eval_gettext "It is currently named '\${HOSTNAME}', however you might wish to change that to a name that is more meaningful to yourself, such as 'johnsmithpc'.") $(gettext "The hostname can have letters and numbers, no spaces.")"
     export DLG_HELP_NET="<window resizable=\"false\" title=\"$(gettext 'Help: Network')\" icon-name=\"${HELPICON}\" window_position=\"1\"><vbox><text use-markup=\"true\"><label>\"${H_net}\"</label><variable>VAR_HELP_NET</variable></text><hbox><button><label>${M_close}</label><action type=\"closewindow\">VAR_HELP_NET</action></button></hbox></vbox></window>"
     H_fw="$(gettext "It is always recommended that the firewall be enabled when connected to a network, unless it is a local trusted network. Note that you can run the Firewall Wizard any time in the future if you want to change the settings -- see the 'Setup' menu.")"
     export DLG_HELP_FW="<window resizable=\"false\" title=\"$(gettext 'Help: Firewall')\" icon-name=\"${HELPICON}\" window_position=\"1\"><vbox><text use-markup=\"true\"><label>\"${H_fw}\"</label><variable>VAR_HELP_FW</variable></text><hbox><button><label>${M_close}</label><action type=\"closewindow\">VAR_HELP_FW</action></button></hbox></vbox></window>"
 
-    NETWORK_XML="<frame $(gettext 'Network settings')>
+    NETWORK_XML="<frame $(gettext 'Network Settings')>
      <hbox>
 
       <vbox>
        <hbox>
         <checkbox tooltip-text=\"${TT_CH_F}\"><label>${L_CH_F}</label><variable>CHECK_FIREWALL</variable><default>${DEFAULT_FIREWALL}</default></checkbox>
@@ -785,10 +791,49 @@
    ${XYRESXML}
   </frame>
  </vbox>"
 fi
 
+#120714 alternate audio/video frame for arm board... create $XXML...
+if [ "$SET_RP_AUDIO" -o "$SET_RP_VIDEO" ];then
+ if [ "$SET_RP_AUDIO" ];then
+  RP_DEF_AUDIO='0'; RP_AUDIO_0_DEF='false'; RP_AUDIO_1_DEF='false'; RP_AUDIO_2_DEF='false'
+  if [ -f /etc/init.d/11alsa_raspi ];then
+   RP_DEF_AUDIO="`grep 'amixer cset numid' /etc/init.d/11alsa_raspi | rev | cut -f 1 -d ' ' | rev`" #0=auto, 1=analog, 2=hdmi.
+  else #precaution. script should be provided by 'z_raspi_fixes_hack' pet.
+   echo '#!/bin/sh
+case $1 in
+ start)
+  amixer cset numid=3 0
+ ;;
+esac' > /etc/init.d/11alsa_raspi
+   chmod 755 /etc/init.d/11alsa_raspi
+  fi
+  case $RP_DEF_AUDIO in
+   1) RP_AUDIO_1_DEF='true' ;;
+   2) RP_AUDIO_2_DEF='true' ;;
+   *) RP_AUDIO_0_DEF='true' ;;
+  esac
+  RP_AUDIOXML="<frame $(gettext 'Raspberry Pi Audio Settings')>
+   <radiobutton active=\"${RP_AUDIO_0_DEF}\"><label>$(gettext 'Automatic output routing')</label><variable>RP_AUDIO_0_RAD</variable></radiobutton>
+   <radiobutton active=\"${RP_AUDIO_1_DEF}\"><label>$(gettext 'Output to round analog socket')</label><variable>RP_AUDIO_1_RAD</variable></radiobutton>
+   <radiobutton active=\"${RP_AUDIO_2_DEF}\"><label>$(gettext 'Output to HDMI TV/monitor')</label><variable>RP_AUDIO_2_RAD</variable></radiobutton>
+  </frame>"
+ fi
+ if [ "$SET_RP_VIDEO" ];then
+  RP_VIDEOXML="<frame Raspberry Pi Video Settings>
+   <text><label>No fancy GUI here yet! Please edit file 'config.txt' in partition #1 then reboot.</label></text>
+  </frame>"
+ fi
+ XXML="<vbox>
+  ${RP_AUDIOXML}
+  ${RP_VIDEOXML}
+ </vbox>"
+fi
+
+
+
 ####main window####
 ###################
 [ $XPID -ne 0 ] && kill $XPID 2> /dev/null
 BACKTITLEXML=""
 #[ "$SET_BACKTITLE" ] && BACKTITLEXML="<text use-markup=\"true\" wrap=\"false\"><label>\"<b>${BACKTITLE}</b>\"</label></text>"
@@ -1309,11 +1354,33 @@
      [ -f /tmp/settertime ] && FLAG_CHANGED="${FLAG_CHANGED}$(gettext 'NTP set-time (this session only)'):yes|"
     fi
    fi
   fi
  fi
+fi
 
+#120714 raspberry pi support...
+if [ "$SET_RP_AUDIO" -o "$SET_RP_VIDEO" ];then
+ if [ "$SET_RP_AUDIO" ];then
+  RP_AUDIO_OUT='0'
+  [ "$RP_AUDIO_0_RAD" = "true" ] && RP_AUDIO_OUT='0' #auto
+  [ "$RP_AUDIO_1_RAD" = "true" ] && RP_AUDIO_OUT='1' #analog
+  [ "$RP_AUDIO_2_RAD" = "true" ] && RP_AUDIO_OUT='2' #hdmi
+  if [ "$RP_DEF_AUDIO" != "$RP_AUDIO_OUT" ];then
+   rpPTN="s%amixer cset numid.*%amixer cset numid=3 ${RP_AUDIO_OUT}%"
+   sed -i -e "$rpPTN" /etc/init.d/11alsa_raspi
+   amixer cset numid=3 ${RP_AUDIO_OUT} #do it now.
+   case $RP_AUDIO_OUT in
+    0) FLAG_CHANGED="${FLAG_CHANGED}$(gettext 'Automatic audio output'):yes|" ;;
+    1) FLAG_CHANGED="${FLAG_CHANGED}$(gettext 'Analog audio output'):yes|" ;;
+    2) FLAG_CHANGED="${FLAG_CHANGED}$(gettext 'HDMI audio output'):yes|" ;;
+   esac
+  fi
+ fi
+ if [ "$SET_RP_VIDEO" ];then
+  echo
+ fi
 fi
 
 [ ! $DISPLAY ] && exit
 
 if [ "`echo -n "$FLAG_CHANGED" | grep "restart"`" != "" ];then

Changes to woof-distro/arm/Packages-puppy-armv6-official

@@ -247,13 +247,13 @@
 xdialog_DOC-2.3.1-patched20090721-armv6|xdialog_DOC|2.3.1-patched20090721-armv6||BuildingBlock|696K||xdialog_DOC-2.3.1-patched20090721-armv6.pet||gui for shell scripts||||
 xdialog_NLS-2.3.1-patched20090721-armv6|xdialog_NLS|2.3.1-patched20090721-armv6||BuildingBlock|172K||xdialog_NLS-2.3.1-patched20090721-armv6.pet|+xdialog|gui for shell scripts||||
 xfdiff-cut-4.5.0-armv6|xfdiff-cut|4.5.0-armv6||Utility|104K||xfdiff-cut-4.5.0-armv6.pet|+gtk+|Xfdiff-cut compare two files|puppy|||
 xfdiff-cut_NLS-4.5.0-armv6|xfdiff-cut_NLS|4.5.0-armv6||Utility|704K||xfdiff-cut_NLS-4.5.0-armv6.pet|+xfdiff-cut|compare two files||||
 xload-1.1.0-armv6|xload|1.1.0-armv6||BuildingBlock|44K||xload-1.1.0-armv6.pet|+xorg|plot cpu load|puppy|||
-xlockmore-5.31-patched-armv6|xlockmore|5.31-patched-armv6||BuildingBlock|212K||xlockmore-5.31-patched-armv6.pet|+xorg_base|screen lock and screensaver|puppy|||
-xlockmore_DOC-5.31-patched-armv6|xlockmore_DOC|5.31-patched-armv6||BuildingBlock|84K||xlockmore_DOC-5.31-patched-armv6.pet||screen lock||||
+xlockmore-5.31-patched-sap6|xlockmore|5.31-patched-sap6||BuildingBlock|212K||xlockmore-5.31-patched-sap6.pet|+xorg_base|screen lock and screensaver|debian|squeeze||
+xlockmore_DOC-5.31-patched-sap6|xlockmore_DOC|5.31-patched-sap6||BuildingBlock|84K||xlockmore_DOC-5.31-patched-sap6.pet||screen lock||||
 xwininfo-1.0.5-sap6|xwininfo|1.0.5-sap6||BuildingBlock|40K||xwininfo-1.0.5-sap6.pet|+xorg|get information about a window, such as its dimensions, including root window|debian|sap6||
 yad-0.17.1.1-armv6|yad|0.17.1.1-armv6||BuildingBlock|164K||yad-0.17.1.1-armv6.pet|+gtk+|gui for shell scripts|puppy|||
 yad_DOC-0.17.1.1-armv6|yad_DOC|0.17.1.1-armv6||BuildingBlock|44K||yad_DOC-0.17.1.1-armv6.pet||gui for shell scripts||||
 yad_NLS-0.17.1.1-armv6|yad_NLS|0.17.1.1-armv6||BuildingBlock|196K||yad_NLS-0.17.1.1-armv6.pet|+yad|gui for shell scripts||||
 yaf_splash-1.02-armv6|yaf_splash|1.02-armv6||BuildingBlock|60K||yaf_splash-1.02-armv6.pet|+xorg|text splash window|puppy|||
 z_raspi_fixes_hack-20120709|z_raspi_fixes_hack|20120709||BuildingBlock|24K||z_raspi_fixes_hack-20120709.pet||some hacks for the raspberry pi, make sound work||||