summaryrefslogtreecommitdiffstats
path: root/fedora-arm-tegra.ks
blob: 72702e2ccc3ca27619d63e042895fb3a50122885 (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
# Customizations to fit in the Toshiba AC100
# Also tested on Tegra Trimslice
# Maintained by the Nicolas Chauvet:
# http://fedoraproject.org/wiki/Architectures/ARM
# mailto:kwizart@gmail.com
%include fedora-lxde-packages.ks

lang en_US.UTF-8
#keyboard us
auth --useshadow --enablemd5
selinux --enforcing
firewall --enabled --service=mdns,ssh

bootloader --location=none
part /boot --size=300 --fstype ext4 --label=bootfs
part / --grow --size=3500 --fstype ext4 --label=rootfs

# make sure that initial-setup runs and lets us do all the configuration bits
firstboot --reconfig

services --enabled=sshd,NetworkManager,avahi-daemon,chronyd --disabled=network

#repo --name=rawhide --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=rawhide&arch=$basearch
repo --name=fedora --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
repo --name=updates --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f$releasever&arch=$basearch
#repo --name=updates-testing --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-testing-f$releasever&arch=$basearch
repo --name=fedora-ac100 --baseurl=http://repos.fedorapeople.org/repos/kwizart/ac100/fedora-$releasever/armhfp/ --includepkgs=kernel,llvm,llvm-libs
repo --name=kwizart --baseurl=http://rpms.kwizart.net/fedora/$releasever/armhfp/
repo --name=kwizart-testing --baseurl=http://rpms.kwizart.net/fedora/testing/$releasever/armhfp/

%packages
@core
@standard
@base-x
@fonts
@input-methods
@multimedia
@printing

kernel

chrony
arm-boot-config
initial-setup
gdisk

fedora-release
fedora-release-notes

system-config-date
system-config-keyboard
system-config-language
gnome-power-manager

# Install ac100 specific packages
ac100-hacks
kmscon
uboot-paz00
uboot-tools
xorg-x11-drv-freedreno
xorg-x11-drv-opentegra
xorg-x11-drv-fbdev
xorg-x11-drv-modesetting
xorg-x11-drv-evdev
xorg-x11-glamor


# Needed by bootloader
cbootimage
parted

# Uneeded on AC100
-dvd+rw-tools
-gnomebaker
-pcmciautils
-rng-tools
-transmission-cli
-transmission-gtk
-transmission-common
-transmission
-xorg-x11-drv-ati
-xorg-x11-drv-omap
-xorg-x11-drv-mga
-prelink

# Experimental things
f2fs-tools
criu

#Usual things on desktop
gnash-plugin


%end

%post
# setup systemd to boot to the right runlevel
echo -n "Setting default runlevel to multiuser graphical mode"
rm -f /etc/systemd/system/default.target
ln -s /lib/systemd/system/graphical.target /etc/systemd/system/default.target
echo .

echo -n "Enabling initial-setup text mode on startup"
ln -fs /usr/lib/systemd/system/initial-setup-graphical.service /etc/systemd/system/graphical.target.wants/initial-setup-graphical.service
echo .

# Tweak cma - Disable plymouth
sed -i -e 's/rootwait/rootwait cma=128M plymouth.enable=0/' /etc/sysconfig/arm-boot-config

#from fedora-arm-base.ks
/usr/sbin/a-b-c

#Exclude kernel from fedora-release repos
sed -i -e "s/\[updates\]/\[updates\]\nexclude=kernel/1" /etc/yum.repos.d/fedora-updates.repo

#Hack opentegra.conf
#
cat > /usr/share/X11/xorg.conf.d/opentegra.conf<<EOF
# Commented by kickstart script
EOF

cat > /etc/X11/xorg.conf<<EOF
Section "Device"
        Identifier  "Videocard0"
        Driver      "opentegra"
EndSection
EOF

#Hack module loading:
cat > /etc/modules-load.d/tegra.conf<<EOF
i2c-tegra
tps6586x-regulator
rtc-tps6586x
phy-tegra-usb
gpio-pca953x
gpio_keys
leds-gpio
pwm-tegra
backlight
pwm_bl
panel-simple
host1x
tegra_drm
EOF

# zram module
cat > /etc/modules-load.d/zram.conf<<EOF
zram
EOF

# Add Zram
cat > /etc/modprobe.d/zram.conf<<EOF
options zram num_devices=1
EOF

cat > /etc/udev/rules.d/10-zram.rules<<EOF
KERNEL=="zram0", SUBSYSTEM=="block", DRIVER=="", ACTION=="add", ATTR{disksize}=="0", ATTR{disksize}="128M", RUN+="/sbin/mkswap $env{DEVNAME}"
EOF

# Tweak dracut.d
cat > /etc/dracut.d/tegra.conf<<EOF
add_drivers+="i2c-tegra"
add_drivers+="tps6586x-regulator,rtc-tps6586x"
add_drivers+="rtc_em3027"
add_drivers+="pwm-tegra,backlight,pwm_bl,panel-simple"
omit_dracutmodules+="plymouth"
EOF

# simple-boot.cmd
cat > /boot/simple-boot.cmd<<EOF
ext2load $devtype $devnum 0x4080000 /uImage
ext2load $devtype $devnum 0x4800000 /uInitrd
ext2load $devtype $devnum 0x4000000 /dtb/$soc-$board.dtb
setenv bootargs console=ttyS0,115200n8 ro rhgb quiet plymouth.enable=0
sleep $bootdelay
bootm 0x4080000 0x4800000 0x4000000
EOF
mkimage -A arm -O linux -T script -C none -d /boot/simple-boot.cmd /boot/simple-boot.scr

%end