summaryrefslogtreecommitdiffstats
path: root/F18-beagle-xfce.ks
blob: 7ba94b2892b2174159e530bd0a223ad70e2f3167 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
# Build an XFCE Fedora ARM (OMAP) BeagleBoard image using livemedia-creator

lang en_US.UTF-8
keyboard us
timezone --utc US/Eastern
auth --useshadow --enablemd5
selinux --enforcing
firstboot --enable
firewall --enabled --service=mdns,ssh
network --bootproto=dhcp --device=eth0 --onboot=on --activate --hostname=localhost.localdomain
services --enabled=NetworkManager,sshd,chronyd --disabled=network

# Set a default root password for Fedora
rootpw --plaintext fedora

# Repositories
# apparently we must use 'url' for the install repo for livemedia-creator
url --url="http://dl.fedoraproject.org/pub/fedora-secondary/releases/18/Fedora/armhfp/os/"
repo --name=fedora --baseurl="http://dl.fedoraproject.org/pub/fedora-secondary/releases/18/Everything/armhfp/os/"

#
# Define how large you want your rootfs to be
#
# NOTE: /boot and swap MUST use --asprimary to ensure '/' is 
#       the last partition in order for rootfs-resize to work.
#
bootloader --location=none
zerombr
clearpart --all
part /boot/uboot --size 200 --fstype vfat --label=uboot
part swap --size 500 --label=swap
part / --size 2200 --fstype ext4 --label=rootfs

#
# Add all the packages after the base packages
#
%packages --nobase
@standard

# vvvvvvvvvvvvvvvvvvvvvvv
@base-x
@fonts

@xfce-desktop
@xfce-apps
@xfce-extra-plugins
@xfce-media

# lm_sensors cause warnings on ARM systems
#-lm_sensors
-xfce4-sensors-plugin

# apparently, xfce-desktop does not include gdm or a theme (icons)
gdm
xfce4-icon-theme

# First, no office
-libreoffice-*
-planner

# Drop the Java plugin
-icedtea-web
-java-1.6.0-openjdk

# save some space
-autofs
-acpid

# Remove default unwanted hardware firmware and support we don't want
-foomatic*
-ghostscript*
-ivtv-firmware
# These are listed somewhere other than hardware support!
-irda-utils
-fprintd*

-hplip
-hpijs

# Dictionaries are big
-aspell-*
-hunspell-*
-man-pages*
-words

# scanning takes quite a bit of space :/
-xsane
-xsane-gimp
-sane-backends

# qlogic firmwares
-ql2100-firmware
-ql2200-firmware
-ql23xx-firmware
-ql2400-firmware

#-xfburn  appears twice in the menu, but the same behavior in PA

# ^^^^^^^^^^^^^^^^^^^^^^^

# apparently none of the groups sets the clock.
chrony

# and ifconfig would be nice.
net-tools

# we'll want to resize the rootfs on first boot
rootfs-resize

# get the uboot tools
uboot-tools
# get MLO and uboot.bin 
uboot-beagle


%end


# more configuration
%post --erroronfail

# vvvvvvvvvvvvvvvvvvvvvvv
# xfce configuration

# create /etc/sysconfig/desktop (needed for installation)

cat > /etc/sysconfig/desktop <<EOF
PREFERRED=/usr/bin/startxfce4
DISPLAYMANAGER=/usr/sbin/lightdm
EOF

mkdir -p /root/.config/xfce4

cat > /root/.config/xfce4/helpers.rc << FOE
MailReader=sylpheed-claws
FileManager=Thunar
FOE

# disable screensaver locking (#674410)
cat >> /root/.xscreensaver << FOE
mode:           off
lock:           False
dpmsEnabled:    False
FOE

# deactivate xfconf-migration (#683161)
rm -f /etc/xdg/autostart/xfconf-migration-4.6.desktop || :

# deactivate xfce4-panel first-run dialog (#693569)
mkdir -p /root/.config/xfce4/xfconf/xfce-perchannel-xml
cp /etc/xdg/xfce4/panel/default.xml /root/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml

# make sure the default target is graphical
ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target
ln -sf /lib/systemd/system/graphical.target /lib/systemd/system/default.target

# firstboot does not run for us, so force it
/bin/systemctl enable firstboot-graphical.service

# force xorg to use framebuffer until we get omapdrm working well
cat > /etc/X11/xorg.conf.d/arm-fbdev.conf << EOF
Section "Device"
    Identifier             "Device0"
    Driver                 "fbdev"	# Choose the driver used for this monitor
EndSection
EOF

# ^^^^^^^^^^^^^^^^^^^^^^^


# set up the U-Boot config for Beagle
cat << EOF >> /etc/sysconfig/uboot
UBOOT_DEVICE=mmcblk0p1
UBOOT_DIR=/boot/uboot
EOF


# Set up the bootloader bits on the U-Boot partition
pushd /boot

# MLO _must_ be the first thing copied to the partition
cp -p /usr/share/uboot-beagle/MLO /boot/uboot/.

sleep 3
sync

# try to make damned sure that MLO is written first!
sleep 3
sync; sync; sync;

# now copy the bootloader
cp -p /usr/share/uboot-beagle/u-boot.* /boot/uboot/.

# and move the U-Boot kernel and initrd images
mv boot.cmd uImage* uInitrd* uEnv* /boot/uboot/.


# Install U-Boot boot script and environment
pushd uboot

# get the root device from fstab, typically UUID=<string>
ROOTDEV=`grep -w / /etc/fstab | cut -d ' ' -f1`
KERNEL_ADDR=0x80300000
INITRD_ADDR=0x81600000

# setup uEnv.txt
cat <<EOL > uEnv.txt
mmcargs=setenv bootargs console=\${console} vram=\${vram} root=$ROOTDEV ro rootwait quiet rhgb
mmcload=fatload mmc 0:1 $INITRD_ADDR uInitrd; fatload mmc 0:1 $KERNEL_ADDR uImage; 
loaduimage=run mmcload; run mmcargs; bootm $KERNEL_ADDR $INITRD_ADDR
EOL

# and boot.scr
cat <<EOL > boot.cmd
setenv bootargs console=\${console} vram=\${vram} root=$ROOTDEV ro rootwait quiet rhgb
fatload mmc 0:1 $INITRD_ADDR uInitrd
fatload mmc 0:1 $KERNEL_ADDR uImage
bootm $KERNEL_ADDR $INITRD_ADDR
EOL

/usr/bin/mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "Beagle F18" -d boot.cmd boot.scr

popd

popd


# force resize of the rootfs
touch /.rootfs-repartition

# try Brendan's tip for workaround.
setfiles -v -F -e /proc -e /sys -e /dev \
  /etc/selinux/targeted/contexts/files/file_contexts /


%end