increase dvbapp PR.
[vuplus_openembedded] / recipes / images / shr-image.inc
1 #------------------------------------------------------
2 # SHR Image Recipe
3 #------------------------------------------------------
4
5 PV = "2.0"
6 PR = "r10"
7
8
9 DEPENDS += "task-shr-minimal"
10
11 RDEPENDS += "\
12   ${MACHINE_TASK_PROVIDER} \
13   task-base \
14   task-shr-minimal-base \
15   task-shr-minimal-cli \
16   task-shr-minimal-fso \
17   task-shr-minimal-apps \
18   task-shr-minimal-audio \
19   task-shr-minimal-gtk \
20   task-shr-minimal-x \
21   task-x11-illume \
22   task-fso2-compliance \
23   task-fonts-truetype-core \
24 "
25
26 IMAGE_INSTALL += "\
27   ${MACHINE_TASK_PROVIDER} \
28   task-base \
29   task-shr-minimal-base \
30   task-shr-minimal-cli \
31   task-shr-minimal-apps \
32   task-shr-minimal-audio \
33   task-shr-minimal-gtk \
34   task-shr-minimal-x \
35   task-x11-illume \
36   task-fso2-compliance \
37   task-fonts-truetype-core \
38 "
39
40 inherit image
41
42 # perform some SHR convenience tweaks to the rootfs
43 shr_rootfs_postprocess() {
44     dirs=`find ${FILESDIR} -type d -printf "%P\n" | grep -v "^.$" | grep -v ".git"`
45     for dir in $dirs; do
46         mkdir -p ${IMAGE_ROOTFS}/$dir
47     done
48     files=`find ${FILESDIR} -type f -printf "%P\n" | grep -v ".git"`
49     for file in $files; do
50         cp -f ${FILESDIR}/$file ${IMAGE_ROOTFS}/$file
51     done
52
53     curdir=$PWD
54     cd ${IMAGE_ROOTFS}
55     # date/time
56     date "+%m%d%H%M%Y" >./etc/timestamp
57     # alias foo
58     echo "alias pico=nano" >>./etc/profile
59     echo "alias fso='cd /local/pkg/fso'" >>./etc/profile
60     echo "alias ipkg='opkg'" >>./etc/profile
61     # dns
62     echo "nameserver 208.67.222.222" >./etc/resolv.conf
63     echo "nameserver 208.67.220.220" >>./etc/resolv.conf
64     # nfs
65     mkdir -p ./local/pkg
66     echo >>./etc/fstab
67     echo "# NFS Host" >>./etc/fstab
68     echo "192.168.0.200:/local/pkg /local/pkg nfs noauto,nolock,soft,rsize=32768,wsize=32768 0 0" >>./etc/fstab
69
70     # minimal gtk theme foo
71     # this should be set in postinst phase of installed gtk-theme package
72     #mkdir -p ./etc/gtk-2.0/
73     #echo 'gtk-font-name = "Sans 5"' >> ./etc/gtk-2.0/gtkrc.default
74     #echo 'gtk-theme-name = "shr-theme-gtk-e17lookalike"' >> ./etc/gtk-2.0/gtkrc.default
75     #echo 'gtk-icon-theme-name = "openmoko-standard"' >> ./etc/gtk-2.0/gtkrc.default
76     #echo 'style "treeview"' >> ./etc/gtk-2.0/gtkrc.default
77     #echo '{   ' >> ./etc/gtk-2.0/gtkrc.default
78     #echo '    GtkTreeView::expander-size = 40' >> ./etc/gtk-2.0/gtkrc.default
79     #echo '}' >> ./etc/gtk-2.0/gtkrc.default
80     #echo 'widget_class "*TreeView*" style "treeview"' >> ./etc/gtk-2.0/gtkrc.default
81     #update-alternatives --install /etc/gtk-2.0/gtkrc gtk-theme /etc/gtk-2.0/gtkrc.default 1
82
83     # elementary theme foo
84     ELM_PROFILE_SCR=./etc/profile.d/elementary.sh
85     echo 'export ELM_ENGINE=x11' > ${ELM_PROFILE_SCR}
86     echo 'export ELM_THEME=gry' >> ${ELM_PROFILE_SCR}
87     echo 'export ELM_SCALE=2' >> ${ELM_PROFILE_SCR}
88     echo 'export ELM_FINGER_SIZE=70' >> ${ELM_PROFILE_SCR}
89     chmod +x ${ELM_PROFILE_SCR}
90
91     echo '' >> ./etc/ld.so.conf
92     # fix strange iconv/gconf bug
93     ln -s libc.so.6 ./lib/libc.so
94
95     #font cache optimization, persistent cache
96     sed -i "s/<cachedir>.*\/var\/cache\/\(.*\)<\/cachedir>/<cachedir>\/var\/local\/\1<\/cachedir>/g" ./etc/fonts/fonts.conf
97
98     #set up a nice gentoo-like PS1
99     echo "export PS1=\"\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] \"">> ./etc/profile
100
101     #set up some variables to improve default settings
102     echo "if [ \"\$DISPLAY\" = \"\" ]" >> ./etc/profile
103     echo "then" >> ./etc/profile
104     echo "    export DISPLAY=localhost:0" >> ./etc/profile
105     echo "fi" >> ./etc/profile
106     echo "export HISTFILESIZE=1000" >> ./etc/profile
107     echo "export HISTSIZE=1000" >> ./etc/profile
108     echo "alias rm='rm -i'; alias cp='cp -i'; alias mv='mv -i'" >> ./etc/profile
109     echo "alias la='ls $LS_OPTIONS -ltrA'; alias lh='ls $LS_OPTIONS -ltrh'; alias lr='ls $LS_OPTIONS -ltr';" >> ./etc/profile
110     echo "alias lR='ls $LS_OPTIONS -ltrR'" >> ./etc/profile
111     echo "# set your locale here:" >> ./etc/profile
112     echo "export LANG=en_US.UTF-8" >> ./etc/profile
113
114     # Add some missing entries to the passwd and group file; but do so carefully
115     # since this will be fixed upstream at some point.
116     grep -q '^tss:' ./etc/passwd || echo 'tss:x:93:93:Linux TSS User:/bin:/bin/sh' >>./etc/passwd
117     grep -q '^scanner:' ./etc/group || echo 'scanner:*:91:' >>./etc/group
118     grep -q '^nvram:'   ./etc/group || echo 'nvram:*:92:'   >>./etc/group
119     grep -q '^tss:'     ./etc/group || echo 'tss:*:93:'     >>./etc/group
120     grep -q '^fuse:'    ./etc/group || echo 'fuse:*:94:'    >>./etc/group
121     grep -q '^kvm:'     ./etc/group || echo 'kvm:*:95:'     >>./etc/group
122     grep -q '^rdma:'    ./etc/group || echo 'rdma:*:96:'    >>./etc/group
123
124     cd $curdir
125 }
126
127 shr_rootfs_gta02_postprocess() {
128     curdir=$PWD
129     cd ${IMAGE_ROOTFS}
130     cd ${IMAGE_ROOTFS}/boot
131     ln -s uImage uImage-GTA02.bin
132     cd $curdir
133     #sed -i 's/#SCORouting=PCM/SCORouting=PCM/' ${IMAGE_ROOTFS}/etc/bluetooth/audio.conf
134 }
135
136 shr_rootfs_gta01_postprocess() {
137     curdir=$PWD
138     cd ${IMAGE_ROOTFS}
139     cd ${IMAGE_ROOTFS}/boot
140     ln -s uImage uImage-GTA01.bin
141     cd $curdir
142     #sed -i 's/#SCORouting=PCM/SCORouting=PCM/' ${IMAGE_ROOTFS}/etc/bluetooth/audio.conf
143 }
144
145 ROOTFS_POSTPROCESS_COMMAND += " shr_rootfs_postprocess"
146
147 ROOTFS_POSTPROCESS_COMMAND_append_om-gta02 = ";shr_rootfs_gta02_postprocess"
148 ROOTFS_POSTPROCESS_COMMAND_append_om-gta01 = ";shr_rootfs_gta01_postprocess"
149
150 #do_testlab() {
151 #       :
152 #}