From fc1b7a0992330b35f5b78b97c2b06cf64fa03c94 Mon Sep 17 00:00:00 2001 From: Stephane Desneux Date: Fri, 10 Jan 2014 18:49:02 +0100 Subject: adjust scripts, patterns and config for generic-[x11,wayland]-[i586,x86_64] Change-Id: I66cf0b359885bf2ce6e35e66697bfb6ae237b3ca Signed-off-by: Stephane Desneux --- generic-repos.yaml | 6 +---- generic.yaml | 37 ++++++++++++++++------------- ks/generic-mbr-i586.yaml | 9 ------- ks/generic-wayland-mbr-i586.yaml | 9 +++++++ ks/generic-wayland-mbr-x86_64.yaml | 9 +++++++ ks/generic-x11-mbr-i586.yaml | 9 +++++++ ks/generic-x11-mbr-x86_64.yaml | 9 +++++++ partitions/generic-mbr | 2 +- patterns/generic-adaptation.yaml | 8 +++---- patterns/generic-applications.yaml | 2 +- patterns/generic-middleware.yaml | 3 +++ patterns/generic-wayland.yaml | 11 +++++++++ patterns/generic-x11.yaml | 8 +++++++ scripts/base-general.post | 2 +- scripts/base-generic-minimal.post | 4 ++++ scripts/base-ivi-minimal.post | 3 --- scripts/base-weston-default.post | 27 +++++++++++++++++---- scripts/base-x11-default.post | 5 ++++ scripts/buildname.nochroot | 7 +++--- scripts/customize.post | 48 ++++++++++++++++++++++++++++++++++++++ scripts/efi.post | 3 --- scripts/optimization.post | 2 ++ scripts/rpm.post | 3 ++- scripts/vconf-keys-default.post | 2 ++ scripts/wrt-widgets.post | 5 ++-- 25 files changed, 179 insertions(+), 54 deletions(-) delete mode 100644 ks/generic-mbr-i586.yaml create mode 100644 ks/generic-wayland-mbr-i586.yaml create mode 100644 ks/generic-wayland-mbr-x86_64.yaml create mode 100644 ks/generic-x11-mbr-i586.yaml create mode 100644 ks/generic-x11-mbr-x86_64.yaml create mode 100644 patterns/generic-wayland.yaml create mode 100644 patterns/generic-x11.yaml create mode 100644 scripts/base-generic-minimal.post delete mode 100644 scripts/base-ivi-minimal.post create mode 100644 scripts/base-x11-default.post create mode 100644 scripts/customize.post delete mode 100644 scripts/efi.post diff --git a/generic-repos.yaml b/generic-repos.yaml index 537cfeb..cbc8bf3 100644 --- a/generic-repos.yaml +++ b/generic-repos.yaml @@ -1,8 +1,4 @@ Repositories: - - Name: generic - Url: http://download.tizen.org/live/Tizen:/Generic/x86_64-wayland/ - Options: --ssl_verify=no - - Name: generic-wayland_i586 Url: http://download.tizen.org/live/Tizen:/Generic/ia32-wayland/ Options: --ssl_verify=no @@ -17,4 +13,4 @@ Repositories: - Name: generic-x11_x86_64 Url: http://download.tizen.org/live/Tizen:/Generic/x86_64-x11/ - Options: --ssl_verify=no \ No newline at end of file + Options: --ssl_verify=no diff --git a/generic.yaml b/generic.yaml index 210e108..bf1d72c 100644 --- a/generic.yaml +++ b/generic.yaml @@ -2,7 +2,6 @@ Default: Baseline: tizen-3.0 Active: True Mic2Options: -f raw --fstab=uuid --copy-kernel --compress-disk-image=bz2 --generate-bmap - Architecture: ia32 Part: generic-mbr Language: en_US.UTF-8 Keyboard: us @@ -11,9 +10,9 @@ Default: DefaultUser: tizen DefaultUserPass: tizen BootLoader: True - BootloaderAppend: "rootwait rootfstype=ext4 quiet rw vga=current" + BootloaderAppend: "rw vga=current splash rootwait rootfstype=ext4 plymouth.enable=0" BootloaderTimeout: 3 - BootloaderOptions: '--ptable=gpt --menus="install:Wipe and Install:systemd.unit=system-installer.service:test"' + BootloaderOptions: '--ptable=gpt --menus="install:Wipe and Install:systemd.unit=system-installer.service:test"' StartX: False Desktop: None Repos: @@ -22,35 +21,41 @@ Default: UserGroups: "audio,video" Groups: - Base System + - Console Tools - Generic Packaging - - Generic Adaptation PostScripts: - base-general - rpm - - base-weston-default - - wrt-widgets.post - - vconf-keys-default + - optimization + - customize NoChrootScripts: - buildname -Wayland-i586: +Minimal: + Part: generic-mbr + +Wayland: Part: generic-mbr UserGroups: "audio,video,weston-launch" Groups: + - Generic Wayland + - Generic Adaptation - Generic Middleware - - Wayland - - Console Tools - Generic Applications PostScripts: - - optimization + - base-weston-default + - wrt-widgets + - vconf-keys-default -Wayland-x86_64: +X11: Part: generic-mbr - UserGroups: "audio,video,weston-launch" Groups: + - Generic X11 + - Generic Adaptation - Generic Middleware - - Wayland - - Console Tools - Generic Applications PostScripts: - - optimization \ No newline at end of file + - base-x11-default + - wrt-widgets + - vconf-keys-default + diff --git a/ks/generic-mbr-i586.yaml b/ks/generic-mbr-i586.yaml deleted file mode 100644 index 0a8f3fe..0000000 --- a/ks/generic-mbr-i586.yaml +++ /dev/null @@ -1,9 +0,0 @@ -Name: Generic MBR 86_x64 -Schedule: "*" -Active: True -Platform: Wayland-i586 -Part: generic-mbr -FileName: generic-mbr-i586 -Kernel: kernel-x86-generic -Repos: - - generic-wayland_x86_64 diff --git a/ks/generic-wayland-mbr-i586.yaml b/ks/generic-wayland-mbr-i586.yaml new file mode 100644 index 0000000..b914080 --- /dev/null +++ b/ks/generic-wayland-mbr-i586.yaml @@ -0,0 +1,9 @@ +Name: Generic Wayland MBR i586 +Schedule: "*" +Active: True +Platform: Wayland +Part: generic-mbr +FileName: generic-wayland-mbr-i586 +Kernel: kernel-x86-generic +Repos: + - generic-wayland_i586 diff --git a/ks/generic-wayland-mbr-x86_64.yaml b/ks/generic-wayland-mbr-x86_64.yaml new file mode 100644 index 0000000..cd07a08 --- /dev/null +++ b/ks/generic-wayland-mbr-x86_64.yaml @@ -0,0 +1,9 @@ +Name: Generic Wayland MBR x86_64 +Schedule: "*" +Active: True +Platform: Wayland +Part: generic-mbr +FileName: generic-wayland-mbr-x86_64 +Kernel: kernel-x86-generic +Repos: + - generic-wayland_x86_64 diff --git a/ks/generic-x11-mbr-i586.yaml b/ks/generic-x11-mbr-i586.yaml new file mode 100644 index 0000000..2ae7dc4 --- /dev/null +++ b/ks/generic-x11-mbr-i586.yaml @@ -0,0 +1,9 @@ +Name: Generic X11 MBR i586 +Schedule: "*" +Active: True +Platform: X11 +Part: generic-mbr +FileName: generic-x11-mbr-i586 +Kernel: kernel-x86-generic +Repos: + - generic-x11_i586 diff --git a/ks/generic-x11-mbr-x86_64.yaml b/ks/generic-x11-mbr-x86_64.yaml new file mode 100644 index 0000000..30e7ac8 --- /dev/null +++ b/ks/generic-x11-mbr-x86_64.yaml @@ -0,0 +1,9 @@ +Name: Generic X11 MBR x86_64 +Schedule: "*" +Active: True +Platform: X11 +Part: generic-mbr +FileName: generic-x11-mbr-x86_64 +Kernel: kernel-x86-generic +Repos: + - generic-x11_x86_64 diff --git a/partitions/generic-mbr b/partitions/generic-mbr index 1a5d132..5b79934 100644 --- a/partitions/generic-mbr +++ b/partitions/generic-mbr @@ -1 +1 @@ -part / --fstype="ext4" --ondisk=sda --size=6144 --active --label tizen-pc-genericdev \ No newline at end of file +part / --fstype="ext4" --ondisk=sda --size=6144 --active --label tizen-generic diff --git a/patterns/generic-adaptation.yaml b/patterns/generic-adaptation.yaml index 413db24..0e30bc0 100644 --- a/patterns/generic-adaptation.yaml +++ b/patterns/generic-adaptation.yaml @@ -1,10 +1,8 @@ Description: Generic Adaptation Name: generic-adaptation Packages: -- desktop-skin - linux-firmware -- xf86-input-synaptics -- xf86-video-intel -- xf86-input-keyboard -- wrt-widgets +- kernel-x86-generic +- dlogutil +- system-installer Summary: Generic Adaptation diff --git a/patterns/generic-applications.yaml b/patterns/generic-applications.yaml index fac54d4..89fd479 100644 --- a/patterns/generic-applications.yaml +++ b/patterns/generic-applications.yaml @@ -1,7 +1,7 @@ Description: Generic Applications Name: generic-applications Packages: +- ail - ca-certificates -- ca-certificates-mozilla - webkit2-efl-test Summary: Generic Applications diff --git a/patterns/generic-middleware.yaml b/patterns/generic-middleware.yaml index b587d63..6663f00 100644 --- a/patterns/generic-middleware.yaml +++ b/patterns/generic-middleware.yaml @@ -24,6 +24,7 @@ Packages: - gst-plugins-good - gstreamer - gstreamer-vaapi +- gstreamer-utils - iptables - libprivilege-control-conf - libva-intel-driver @@ -42,6 +43,7 @@ Packages: - pulseaudio-module-bluetooth - pulseaudio-utils - rfkill +- sqlite3 - tree - vaapi-tools - wpa_supplicant @@ -56,5 +58,6 @@ Packages: - wrt-installer-preinstall-service - wrt-plugins-tizen - wrt-security +- wrt-widgets - zypper Summary: Generic Middleware diff --git a/patterns/generic-wayland.yaml b/patterns/generic-wayland.yaml new file mode 100644 index 0000000..09bae5a --- /dev/null +++ b/patterns/generic-wayland.yaml @@ -0,0 +1,11 @@ +Description: Generic Wayland +Name: generic-wayland +Packages: +- cantarell-fonts +- dejavu-fonts +- weston +- xkeyboard-config +- tizen-branding-default +- user-session-units +- desktop-skin +Summary: Generic Wayland diff --git a/patterns/generic-x11.yaml b/patterns/generic-x11.yaml new file mode 100644 index 0000000..5b722a6 --- /dev/null +++ b/patterns/generic-x11.yaml @@ -0,0 +1,8 @@ +Description: Generic X11 +Name: generic-x11 +Packages: +- xorg-server +- xf86-input-synaptics +- xf86-video-intel +- xf86-input-keyboard +Summary: Generic X11 diff --git a/scripts/base-general.post b/scripts/base-general.post index e944197..5a74bad 100644 --- a/scripts/base-general.post +++ b/scripts/base-general.post @@ -1,4 +1,4 @@ -# base-general.post +################ base-general.post ################## ln -sf /proc/self/mounts /etc/mtab diff --git a/scripts/base-generic-minimal.post b/scripts/base-generic-minimal.post new file mode 100644 index 0000000..65e09eb --- /dev/null +++ b/scripts/base-generic-minimal.post @@ -0,0 +1,4 @@ +################### base-generic-minimal.post ################# + +rm /usr/lib/systemd/system/default.target +ln -sf multi-user.target /usr/lib/systemd/system/default.target diff --git a/scripts/base-ivi-minimal.post b/scripts/base-ivi-minimal.post deleted file mode 100644 index 33f28c2..0000000 --- a/scripts/base-ivi-minimal.post +++ /dev/null @@ -1,3 +0,0 @@ -# base-ivi-minimal.post -rm /usr/lib/systemd/system/default.target -ln -sf multi-user.target /usr/lib/systemd/system/default.target diff --git a/scripts/base-weston-default.post b/scripts/base-weston-default.post index 310e1f2..12e5ef5 100644 --- a/scripts/base-weston-default.post +++ b/scripts/base-weston-default.post @@ -1,3 +1,6 @@ +#################### base-weston-default.post ################## +# to be synced with profile/ivi/meta-ivi/scripts/base-weston-default.post + # Initialize the native application database pkg_initdb @@ -12,13 +15,15 @@ chown -R app:app /opt/home/app # home dir must have the same label chsmack -a User /opt/home/app -# base-weston-default.post +# Enable a logind session for 'app' user on seat0 (the default seat for +# graphical sessions) mkdir -p /usr/lib/systemd/system/graphical.target.wants +ln -s ../user-session-launch@.service /usr/lib/systemd/system/graphical.target.wants/user-session-launch@seat0-5000.service ln -sf weston.target /usr/lib/systemd/user/default.target # Enable user@5000.service by setting the linger for user 'app' -mkdir -p /var/lib/systemd/linger -touch /var/lib/systemd/linger/app +#mkdir -p /var/lib/systemd/linger +#touch /var/lib/systemd/linger/app # Add over-riding environment to enable the web runtime to # run on an IVI image as a different user then the tizen user @@ -37,13 +42,27 @@ EOF # Use the same over-rides for the native prelaunch daemon cp /etc/sysconfig/wrt /etc/sysconfig/launchpad +# sdx: for AMD (ac.service) +#cp /etc/sysconfig/wrt /etc/sysconfig/prelaunch + # Add a rule to ensure the app user has permissions to # open the graphics device cat > /etc/udev/rules.d/99-dri.rules </etc/profile.d/user-dbus.sh <<'EOF' +export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$UID/dbus/user_bus_socket +EOF + # sdx: user 'app' must own /dev/tty1 for weston to start correctly cat >/usr/lib/udev/rules.d/99-tty.rules <>/etc/ssh/sshd_config +echo "AddressFamily inet" >>/etc/ssh/sshd_config diff --git a/scripts/buildname.nochroot b/scripts/buildname.nochroot index 36ae504..b248084 100644 --- a/scripts/buildname.nochroot +++ b/scripts/buildname.nochroot @@ -1,5 +1,6 @@ -# buildname.nochroot +####################### buildname.nochroot ####################### if [ -n "$IMG_NAME" ]; then - echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/tizen-release - echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/os-release + echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/tizen-release + echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/os-release + echo "$IMG_NAME @BUILD_ID@" >>$INSTALL_ROOT/etc/tizen-snapshot fi diff --git a/scripts/customize.post b/scripts/customize.post new file mode 100644 index 0000000..66745c1 --- /dev/null +++ b/scripts/customize.post @@ -0,0 +1,48 @@ +##################### customize.post #################### + +# customize bash prompt +cat >/etc/profile.d/bash_prompt_custom.sh <<'EOF' +if [ "$PS1" ]; then + + function parse_git_branch { + [ -x "/usr/bin/git" ] && git branch --no-color 2>/dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' + } + + function proml { + # set a fancy prompt (overwrite the one in /etc/profile) + local default="\[\e[0m\]" + local usercol='\[\e[1;34m\]' # blue + local hostcol='\[\e[1;32m\]' # green + local pathcol='\[\e[1;33m\]' # yellow + local gitcol='\[\e[1;31m\]' # light red + local termcmd='' + local _p="$"; + + if [ "`id -u`" -eq 0 ]; then + usercol='\[\e[1;31m\]' + _p="#" + fi + + PS1="${usercol}\u${default}@${hostcol}\h${default}:${pathcol}\w${default}${gitcol}\$(parse_git_branch)${default}${_p} ${termcmd}" + } + + proml + + function rcd () { + [ "${1:0:1}" == "/" ] && { cd $1; } || { cd $(pwd -P)/$1; } + } + + alias ll="ls -lZ" + alias lr="ls -ltrZ" + alias la="ls -alZ" + + function dbus_find () { + echo export $(tr '\0' '\n'