From: David-John Willis Date: Tue, 13 Oct 2009 10:53:22 +0000 (+0100) Subject: vairous: add in local updates for tasks/images. X-Git-Tag: Release-2010-05/1~186 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=openpandora.oe.git;a=commitdiff_plain;h=edadb6544b61a92e12a03b8eee2b21955caafad4 vairous: add in local updates for tasks/images. --- diff --git a/recipes/images/pandora-desktop-image.bb b/recipes/images/pandora-desktop-image.bb index a70c2c1..326feb9 100755 --- a/recipes/images/pandora-desktop-image.bb +++ b/recipes/images/pandora-desktop-image.bb @@ -19,6 +19,7 @@ SPLASH = "psplash-omap3pandora" DEPENDS = "task-base" IMAGE_INSTALL += " \ + task-pandora-core \ task-pandora-desktop \ ${SPLASH} \ " diff --git a/recipes/images/pandora-gnome-image.bb b/recipes/images/pandora-gnome-image.bb index eff9f50..af9a28d 100755 --- a/recipes/images/pandora-gnome-image.bb +++ b/recipes/images/pandora-gnome-image.bb @@ -22,6 +22,7 @@ SPLASH = "psplash-omap3pandora" DEPENDS = "task-base" IMAGE_INSTALL += " \ + task-pandora-core \ task-pandora-gnome \ ${SPLASH} \ " diff --git a/recipes/images/pandora-gui-image.bb b/recipes/images/pandora-gui-image.bb index dc116d1..0e7a455 100755 --- a/recipes/images/pandora-gui-image.bb +++ b/recipes/images/pandora-gui-image.bb @@ -19,6 +19,7 @@ SPLASH = "psplash-omap3pandora" DEPENDS = "task-base" IMAGE_INSTALL += " \ + task-pandora-core \ task-pandora-gui \ ${SPLASH} \ " diff --git a/recipes/images/pandora-validation-image.bb b/recipes/images/pandora-validation-image.bb index c648045..f0b4df8 100755 --- a/recipes/images/pandora-validation-image.bb +++ b/recipes/images/pandora-validation-image.bb @@ -1,26 +1,27 @@ # Validation image for Pandora handheld console # for hardware testing and flashing images to NAND if copied to the SD in the correct places. -IMAGE_LINGUAS = "de-de fr-fr en-gb en-us pt-br es-es kn-in ml-in ta-in" +XSERVER ?= " \ + xserver-xorg \ + xf86-input-evdev \ + xf86-input-mouse \ + xf86-video-fbdev \ + xf86-input-keyboard \ +" -ANGSTROM_EXTRA_INSTALL ?= "" +inherit image export IMAGE_BASENAME = "pandora-validation-image" DEPENDS = "task-base" IMAGE_INSTALL += " \ - ${ANGSTROM_EXTRA_INSTALL} \ - task-pandora-validation \ + task-pandora-core \ + task-pandora-validation \ " IMAGE_PREPROCESS_COMMAND = "create_etc_timestamp" -#zap root password for release images -#ROOTFS_POSTPROCESS_COMMAND += '${@base_conditional("DISTRO_TYPE", "release", "zap_root_password; ", "",d)}' - -inherit image - # Helper to say what image we built, include GIT tag and image name. PANDORA_VERSION_FILE = "${IMAGE_ROOTFS}/${sysconfdir}/op-version" ROOTFS_POSTPROCESS_COMMAND += "OLD_PWD=$PWD; cd `dirname '${FILE_DIRNAME}'`; echo Tag Name: `git tag|tail -n 1`> ${PANDORA_VERSION_FILE};cd $OLD_PWD;" diff --git a/recipes/images/pandora-xfce-image.bb b/recipes/images/pandora-xfce-image.bb index c4f3400..eabb1eb 100755 --- a/recipes/images/pandora-xfce-image.bb +++ b/recipes/images/pandora-xfce-image.bb @@ -19,6 +19,7 @@ SPLASH = "psplash-omap3pandora" DEPENDS = "task-base" IMAGE_INSTALL += " \ + task-pandora-core \ task-pandora-xfce \ ${SPLASH} \ " diff --git a/recipes/pandora-system/pandora-auto-startx.bb b/recipes/pandora-system/pandora-auto-startx.bb new file mode 100755 index 0000000..f87baee --- /dev/null +++ b/recipes/pandora-system/pandora-auto-startx.bb @@ -0,0 +1,26 @@ +DESCRIPTION = "Autostart X on the first boot to support the first run wizard on the OpenPandora." +LICENSE = "GPLV2" + +RDEPENDS_${PN} = "xinit" + +# Based on the scripts by JohnX/Mer Project - http://wiki.maemo.org/Mer/ + +COMPATIBLE_MACHINE = "omap3-pandora" + +PR = "r0.1" + +SRC_URI = " \ + file://rc.auto-startx \ +" + +inherit update-rc.d + +INITSCRIPT_NAME = "auto-startx-init" +INITSCRIPT_PARAMS = "start 60 2 3 4 . stop 60 0 1 5 6 ." + +do_install() { + install -d ${D}${sysconfdir}/init.d/ + cp -pP ${WORKDIR}/rc.auto-startx ${D}${sysconfdir}/init.d/auto-startx-init +} + +FILES_${PN} += "${sysconfdir}/init.d/auto-startx-init" diff --git a/recipes/pandora-system/pandora-auto-startx/rc.auto-startx b/recipes/pandora-system/pandora-auto-startx/rc.auto-startx new file mode 100755 index 0000000..3975cf3 --- /dev/null +++ b/recipes/pandora-system/pandora-auto-startx/rc.auto-startx @@ -0,0 +1,39 @@ +#!/bin/sh +# +# /etc/init.d/auto-startx: start/stop X windows +# + + +case $1 in +start) + if [ ! -f /etc/default/autologin ] ; then + if [ -x /usr/sbin/first-boot-wizard.sh ] ; then + /usr/bin/xinit /usr/sbin/first-boot-wizard.sh 2>&1 > /var/log/first-boot-wizard.log + else + echo -n "No user specified for auto login. Creating..." + adduser --disabled-password "Pandora User,,," user + echo 'export PREFERED_USER=user' > /etc/default/autologin + echo "Done." + fi + fi + + . /etc/default/autologin + + mkdir -p /var/run/console && touch /var/run/console/$PREFERED_USER + + /bin/su - $PREFERED_USER -l -c "/bin/bash --login -c startx >/dev/null 2>&1" & + ;; +stop) + killall Xorg + ;; +restart) + $0 stop + sleep 2 + $0 start + ;; +*) + echo "usage: $0 [start|stop|restart]" + ;; +esac + +# End of file diff --git a/recipes/pandora-system/pandora-firmware/wl1251-fw.bin b/recipes/pandora-system/pandora-firmware/wl1251-fw.bin new file mode 100755 index 0000000..1d7a033 Binary files /dev/null and b/recipes/pandora-system/pandora-firmware/wl1251-fw.bin differ diff --git a/recipes/pandora-system/pandora-firmware/wl1251-nvs.bin b/recipes/pandora-system/pandora-firmware/wl1251-nvs.bin new file mode 100755 index 0000000..2698b57 Binary files /dev/null and b/recipes/pandora-system/pandora-firmware/wl1251-nvs.bin differ diff --git a/recipes/pandora-system/pandora-first-run-wizard.bb b/recipes/pandora-system/pandora-first-run-wizard.bb new file mode 100755 index 0000000..2accf6e --- /dev/null +++ b/recipes/pandora-system/pandora-first-run-wizard.bb @@ -0,0 +1,22 @@ +DESCRIPTION = "Scripts to support the first run wizard on the OpenPandora." +LICENSE = "GPLV2" +RDEPENDS = "pandora-auto-startx zenity dbus" + +# Based on the scripts by JohnX/Mer Project - http://wiki.maemo.org/Mer/ + +COMPATIBLE_MACHINE = "omap3-pandora" + +PR = "r0.3" + +SRC_URI = " \ + file://first-boot-wizard.sh \ +" + +do_install() { + install -d ${D}${sbindir} + cp -pP ${WORKDIR}/first-boot-wizard.sh ${D}${sbindir}/first-boot-wizard.sh +} + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +FILES_${PN} += "/lib/firmware" diff --git a/recipes/pandora-system/pandora-first-run-wizard/first-boot-wizard.sh b/recipes/pandora-system/pandora-first-run-wizard/first-boot-wizard.sh new file mode 100755 index 0000000..68faa8f --- /dev/null +++ b/recipes/pandora-system/pandora-first-run-wizard/first-boot-wizard.sh @@ -0,0 +1,124 @@ +#!/bin/sh + +# notice: system dbus must be running + +export LANG=en_GB.UTF-8 +# for testing set display to something sane +if [ "x$DISPLAY" = "x" ]; then + export DISPLAY=:0 +fi +export MB_HUNG_APP_HANDLER='/usr/bin/hd-hung-app-handler' +export GTK2_RC_FILES=/usr/share/themes/default/gtk-2.0/gtkrc:/usr/share/themes/default/gtk-2.0/gtkrc.maemo_af_desktop + +WALLPAPER=`grep File= /usr/share/backgrounds/default.desktop | cut -d"=" -f2` +hsetroot -center $WALLPAPER + +export `dbus-launch --exit-with-session` + +#/usr/bin/maemo-launcher --daemon --booster gtk + +/usr/lib/gconf2/gconfd-2 & +#/usr/lib/libgconf2-4/gconfd-2 & + +#/usr/lib/sapwood/sapwood-server & + +SHOW_CURSOR=yes + +#/usr/bin/matchbox-window-manager \ +# -theme default \ +# -use_titlebar yes \ +# -use_desktop_mode plain \ +# -use_lowlight no \ +# -use_cursor $SHOW_CURSOR \ +# -use_super_modal no & + +/usr/bin/x-window-manager + +#maemo-invoker /usr/bin/hildon-input-method.launch & + +#if /usr/bin/lshal | grep info.product | grep -i keyboard ; then +# /usr/bin/gconftool-2 -s -t bool /apps/osso/inputmethod/keyboard_available true +#fi + + +##First we regenerate existing ssh keys: +#rm -f /etc/ssh/ssh_host* +#/usr/bin/ssh-keygen -t dsa -q -N "" -f /etc/ssh/ssh_host_dsa_key | \ +# zenity --title="Please wait..." --text="Generating SSH DSA key." \ +# --progress --pulsate --auto-close +#/usr/bin/ssh-keygen -t rsa -q -N "" -f /etc/ssh/ssh_host_rsa_key | +# zenity --title="Please wait..." --text="Generating SSH RSA key." \ +# --progress --pulsate --auto-close + + +swap_part=$(sfdisk -l /dev/mmcblk? | grep swap | cut -d" " -f1) +if [ x$swap_part != x ] ; then + use_swap=$(zenity --title="Enable swap?" --text "Swap partition found. Would you like to use it?" --list --radiolist --column " " --column "Answer" TRUE "Use swap on $swap_part" FALSE "Do not use swap") + if [ "$use_swap" = "Use swap on $swap_part" ] ; then + swapon $swap_part + echo "$swap_part none swap sw 0 0" >> /etc/fstab + fi +fi + +while ! name=$(zenity --title="Type your name" --entry --text "Please type your full name.") || [ "x$name" = "x" ] ; do + zenity --title="Error" --error --text="Please try again." +done + +username_guess=$(echo "$name" | cut -d" " -f1 | tr A-Z a-z) + +while ! username=$(zenity --title="Type your username" --entry --text "Please choose a short username. +It should be all lowercase and +contain only letters and numbers." --entry-text "$username_guess") || [ "x$username" = "x" ] ; do + zenity --title="Error" --error --text="Please try again." +done + +while ! adduser --gecos "$name,,," --disabled-password "$username" ; do + username=$(zenity --title="Please check username" --entry --text "Please be sure that your +username consists of only +letters and numbers." --entry-text "$username") +done + +password="" +while [ x$password = x ] ; do + password1=$(zenity --title=Password --entry --text="Choose a new password." --hide-text) + password2=$(zenity --title=Confirm --entry --text="Confirm your new password." --hide-text) + if [ $password1 != $password2 ] ; then + zenity --title="Error" --error --text="Passwords don't match. +Please try again." + else if [ x$password1 = x ] ; then + zenity --title="Error" --error --text="Password can't be blank! +Please try again." + else + password=$password1 + fi + fi +done + +passwd "$username" < /etc/default/autologin + +mkdir -p /etc/sudoers.d && echo '# Members of the admin group may gain root privileges' > /etc/sudoers.d/02ubuntu-admin +echo '%admin ALL=(ALL) ALL' >> /etc/sudoers.d/02ubuntu-admin +update-sudoers +while ! hostname=$(zenity --title="Choose a device name" --entry --text "Please choose a name for +your OpenPandora. It should only contain +letters, numbers and dashes." --entry-text "$username-pandora") || [ "x$hostname" = "x" ]; do + zenity --title="Error" --error --text="Please try again." +done + +echo $hostname > /etc/hostname +echo "127.0.0.1 localhost.localdomain localhost $hostname" > /etc/hosts +cat /usr/share/first-boot-wizard/hosts-template >> /etc/hosts +hostname -F /etc/hostname + +killall maemo-launcher +killall gconfd-2 diff --git a/recipes/tasks/task-pandora-desktop.bb b/recipes/tasks/task-pandora-desktop.bb index 9b8a823..762328a 100755 --- a/recipes/tasks/task-pandora-desktop.bb +++ b/recipes/tasks/task-pandora-desktop.bb @@ -96,7 +96,7 @@ XSERVER_BASE = " \ xvinfo \ " -RDEPENDS_${PN} = "\ +RDEPENDS_${PN} = " \ task-pandora-core \ ${ANGSTROM_EXTRA_INSTALL} \ ${APPS} \ diff --git a/recipes/tasks/task-pandora-gnome.bb b/recipes/tasks/task-pandora-gnome.bb index 82b8733..dd7e2f5 100755 --- a/recipes/tasks/task-pandora-gnome.bb +++ b/recipes/tasks/task-pandora-gnome.bb @@ -186,7 +186,7 @@ XSERVER_BASE = " \ xvinfo \ " -RDEPENDS_${PN} = "\ +RDEPENDS_${PN} = " \ task-pandora-core \ ${ANGSTROM_EXTRA_INSTALL} \ ${APPS} \ diff --git a/recipes/tasks/task-pandora-gui.bb b/recipes/tasks/task-pandora-gui.bb index d441c9b..e0eccfe 100755 --- a/recipes/tasks/task-pandora-gui.bb +++ b/recipes/tasks/task-pandora-gui.bb @@ -90,7 +90,7 @@ XSERVER_BASE = " \ xvinfo \ " -RDEPENDS_${PN} = "\ +RDEPENDS_${PN} = " \ task-pandora-core \ ${ANGSTROM_EXTRA_INSTALL} \ ${APPS} \ diff --git a/recipes/tasks/task-pandora-validation.bb b/recipes/tasks/task-pandora-validation.bb new file mode 100755 index 0000000..8d901b1 --- /dev/null +++ b/recipes/tasks/task-pandora-validation.bb @@ -0,0 +1,11 @@ +DESCRIPTION = "Task file for validation apps and scripts in the Pandora image" + +# Don't forget to bump the PR if you change it. + +PR = "r3.1" + +inherit task + +RDEPENDS_${PN} = "\ + +PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/recipes/tasks/task-pandora-xfce.bb b/recipes/tasks/task-pandora-xfce.bb index 890dd93..fd337e7 100755 --- a/recipes/tasks/task-pandora-xfce.bb +++ b/recipes/tasks/task-pandora-xfce.bb @@ -90,7 +90,7 @@ XSERVER_BASE = " \ xvinfo \ " -RDEPENDS_${PN} = "\ +RDEPENDS_${PN} = " \ task-pandora-core \ ${ANGSTROM_EXTRA_INSTALL} \ ${APPS} \