Commit 710601bf authored by Anton Midyukov's avatar Anton Midyukov

drop usupported armh features

parent 8fded4af
Поддержка SolidRun Cubox в расчёте на подключенный по HDMI дисплей FullHD.
use/armh-cubox: use/armh
@$(call add_feature)
@$(call set,KFLAVOURS,cubox)
#!/bin/sh
mkdir -p /boot
# 1920x1080 version of the boot script
cat > /boot/boot << EOF
setenv bootargs 'console=ttyS0,115200 root=/dev/mmcblk0p2 ro video=dovefb:lcd0:1920x1080-32@60-edid clcd.lcd0_enable=1 clcd.lcd1_enable=0 vmalloc=128M panic=3'
ext2load mmc 0:1 2000000 uimage
ext2load mmc 0:1 2800000 uinitrd
bootm 2000000 2800000
EOF
# 1280x720 version of the boot script (not used at the moment)
cat > /boot/boot.720 << EOF
setenv bootargs 'console=ttyS0,115200 root=/dev/mmcblk0p2 ro video=dovefb:lcd0:1280x720-24@60-edid clcd.lcd0_enable=1 clcd.lcd1_enable=0 vmalloc=128M panic=3'
ext2load mmc 0:1 2000000 uimage
ext2load mmc 0:1 2800000 uinitrd
bootm 2000000 2800000
EOF
Эта фича обеспечивает начальное конфигурирование Marvell Dove GPU.
use/armh-dovefb: use/armh
@$(call add_feature)
@$(call add,THE_PACKAGES,xorg-drv-dovefb)
#!/bin/sh
mkdir -p /etc/udev/rules.d
cd /etc/udev/rules.d
cat > 99-bmm.rules << EOF
KERNEL=="bmm|bmm[0-9]", GROUP="xgrp", MODE="0660"
EOF
cat > 99-fb.rules << EOF
KERNEL=="fb|fb[0-9]", GROUP="xgrp", MODE="0660"
EOF
cat > 99-galcore.rules << EOF
KERNEL=="galcore|galcore[0-9]", GROUP="xgrp", MODE="0660"
EOF
cat > 99-uio.rules << EOF
KERNEL=="uio|uio[0-9]", GROUP="xgrp", MODE="0660"
EOF
mkdir -p /etc/X11
cd /etc/X11
cat > xorg.conf.720 << EOF
Section "Device"
Identifier "Videocard0"
Driver "dovefb"
# Option "ExaAccel" "on"
Option "Solid" "on"
Option "Copy" "on"
Option "Composite" "on"
Option "Commit" "on"
Option "XvAccel" "on"
Option "UseGPU" "on"
EndSection
Section "Monitor"
Identifier "LCD0"
Option "PreferredMode" "1280x720"
EndSection
Section "Screen"
Identifier "Screen 0"
Device "Videocard0"
Monitor "LCD0"
DefaultDepth 24
DefaultFbBpp 24
SubSection "Display"
Depth 24
Modes "1280x720"
EndSubSection
EndSection
Section "ServerLayout"
Identifier "Main Layout"
Screen 0 "Screen 0"
EndSection
EOF
cat > xorg.conf.1080 << EOF
Section "Device"
Identifier "Videocard0"
Driver "dovefb"
# Option "ExaAccel" "on"
Option "Solid" "on"
Option "Copy" "on"
Option "Composite" "on"
Option "Commit" "on"
Option "XvAccel" "on"
Option "UseGPU" "on"
#Option "Debug" "on"
EndSection
Section "Monitor"
Identifier "LCD0"
Option "PreferredMode" "1920x1080"
EndSection
Section "Screen"
Identifier "Screen 0"
Device "Videocard0"
Monitor "LCD0"
DefaultDepth 16
DefaultFbBpp 16
SubSection "Display"
Depth 16
Modes "1920x1080@60"
EndSubSection
SubSection "Display"
Depth 24
Modes "1920x1080@60"
EndSubSection
SubSection "Display"
Depth 32
Modes "800x600@60"
EndSubSection
EndSection
Section "ServerLayout"
Identifier "Main Layout"
Screen 0 "Screen 0"
EndSection
EOF
ln -s xorg.conf.1080 xorg.conf
Эта фича конфигурирует специфические для Google/ASUS Nexus7 аспекты.
use/armh-nexus7:
@$(call add_feature)
#!/bin/sh
# FIXME: the exact partition may vary
cat >> /etc/fstab << EOF
# YMMV, this might be /dev/mmcblk0p10 either
/dev/mmcblk0p9 / ext4 defaults 1 1
EOF
cd /etc/udev/rules.d || exit 1
cat > 90-tegra-rt5640.rules << EOF
SUBSYSTEM!="sound", GOTO="tegra_rt5640_end"
ACTION!="change", GOTO="tegra_rt5640_end"
KERNEL!="card*", GOTO="tegra_rt5640_end"
ATTRS{id}=="tegrart5640", ENV{PULSE_PROFILE_SET}="tegra-nexus7.conf"
LABEL="tegra_rt5640_end"
EOF
cd /usr/share/pulseaudio/alsa-mixer/profile-sets || exit 1
cat > tegra-nexus7.conf << EOF
[General]
auto-profiles = yes
[Mapping analog-stereo]
device-strings = front:%f hw:%f plughw:%f
channel-map = left,right
paths-output = tegra-nexus7-speaker tegra-nexus7-headphone
paths-input = tegra-nexus7-intmic
priority = 10
EOF
cd /etc/X11 || exit 1
cat > xorg.conf << EOF
Section "Device"
Identifier "nexus"
Driver "tegra"
EndSection
EOF
cd /etc/X11/xorg.conf.d || exit 1
cat > 99-nexus-calibration.conf << EOF
Section "InputClass"
Identifier "Nexus 7 Touchscreen"
MatchIsTouchscreen "on"
MatchProduct "elan-touchscreen"
MatchDevicePath "/dev/input/event*"
MatchDriver "evdev"
# Option "Calibration" "29 2125 106 1356"
# Option "SwapAxes" "0"
# Option "Calibration" "566 1201 1025 2075"
# Option "SwapAxes" "1"
Option "Calibration" "6 2132 29 1294"
Option "SwapAxes" "0"
EndSection
EOF
cat > 99-nexus-rotation.conf << EOF
Section "Monitor"
Identifier "Monitor"
Option "Rotate" "right"
EndSection
Section "Screen"
Identifier "Screen"
Monitor "Monitor"
EndSection
EOF
cd /usr/share/pulseaudio/alsa-mixer/paths || exit 1
cat > tegra-nexus7-headphone.conf << EOF
[General]
priority = 90
name = analog-output-headphones
[Jack HP-detect]
state.plugged = yes
[Element Master]
switch = mute
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right
[Element HP]
switch = mute
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right
[Element Headphone Jack]
switch = mute
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right
[Element Int Spk]
switch = off
; Due to a kernel bug (?) the "Int Mic" is a playback control.
; Therefore we enable it here instead of in the proper place
[Element Int Mic]
switch = on
EOF
cat > tegra-nexus7-intmic.conf << EOF
[General]
priority = 90
name = analog-input-microphone-internal
[Element ADC]
; For some reason the ADC volume seems not to be affecting input gain
switch = mute
volume = zero
override-map.1 = all
override-map.2 = all-left,all-right
[Element ADC Boost Gain]
switch = mute
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right
[Element Int Mic]
switch = mute
[Element DMIC]
enumeration = select
[Option DMIC:DMIC1]
priority = 89
name = analog-input-internal-microphone
EOF
cat > tegra-nexus7-speaker.conf << EOF
[General]
priority = 100
name = analog-output-speaker
[Jack HP-detect]
state.plugged = no
state.unplugged = unknown
[Element Master]
switch = mute
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right
[Element Speaker]
switch = mute
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right
[Element Int Spk]
switch = mute
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right
[Element Headphone Jack]
switch = off
; Due to a kernel bug (?) the "Int Mic" is a playback control.
; Therefore we enable it here instead of in the proper place
[Element Int Mic]
switch = on
EOF
Эта фича предназначена для базовой поддержки систем на чипсете NVIDIA Tegra3.
use/armh-tegra3:
@$(call add_feature)
#!/bin/sh
cd /etc/udev/rules.d || exit 1
cat > 69-tegra-gpu.rules << EOF
# Set the right permissions to the devices provided by the
# tegra driver
ENV{ACL_MANAGE}=="0", GOTO="tegra_gpu_end"
ACTION!="add|change", GOTO="tegra_gpu_end"
# root only devices
KERNEL=="knvrm" OWNER="root" GROUP="root" MODE="0660"
KERNEL=="knvmap" OWNER="root" GROUP="root" MODE="0660"
# graphics devices
ACTION=="add|change", KERNEL=="nvhost*", GROUP="xgrp", MODE="0660"
ACTION=="add|change", KERNEL=="nvmap*", GROUP="xgrp", MODE="0660"
ACTION=="add|change", KERNEL=="tegra*", GROUP="xgrp", MODE="0660"
ACTION=="add|change", KERNEL=="nvram", GROUP="xgrp", MODE="0660"
ACTION=="add|change", KERNEL=="nvhdcp*", GROUP="xgrp", MODE="0660"
LABEL="tegra_gpu_end"
EOF
# FIXME: xgrp is a kludge
cat > 69-tegra-touchscreen.rules << EOF
SUBSYSTEM=="input",ACTION=="add|change",KERNEL=="event*",ATTRS{name}=="elan-touchscreen", SYMLINK+="twofingtouch", MODE="0660", GROUP="xgrp"
EOF
Эта фича занимается тем подмножеством необходимой для ARM-образов
функциональности, которую получается как-то обобщить.
use/armh: use/control/sudo-su use/net-dns/google
@$(call add_feature)
#!/bin/sh
echo 'HWCLOCK_SET_TIME_AT_START=false' >> /etc/sysconfig/clock
#!/bin/sh
kver="$(rpm -qa 'kernel-image*' \
--qf '%{installtime} %{version}-%{name}-%{release}\n' \
| sort -n \
| tail -n 1 \
| cut -f 2 -d ' ' \
| sed 's/kernel-image-//')"
[ -h /boot/vmlinuz ] || ln -s vmlinuz-$kver /boot/vmlinuz
[ -h /boot/initrd.img ] || ln -s initrd-$kver.img /boot/initrd.img
# NB: mkinitrd-3.0.16+ has rootsubdir support which is critical
# for TWRP based ARM "VE" chroots (e.g. for nexus7);
# should be implemented in make-initrd either
### rootfs type should become configurable
if rpm -q mkinitrd; then
mkinitrd --with ext4 -f /boot/initrd-$kver.img "$kver"
fi
# NB: if the adresses ever become different this "API" _will_ change
# NB: initrd compression (-C) might change, armadaxp handles gzip
umk() {
[ $# = 4 ] || exit 1
cd /boot
umkimage \
-A arm \
-O linux \
-T "$1" \
-C none \
-a "$2" \
-e "$2" \
-n "`readlink "$3"`" \
-d "$3" \
"$4"
}
### the addresses will become variables some day probably
if rpm -q uboot-tools; then
umk kernel 0x00008000 vmlinuz uimage
umk ramdisk 0x00800000 initrd.img uinitrd
if [ -s boot ]; then
umk script 0 boot boot.scr
fi
fi
:
#!/bin/sh
# Sisyphus/armh is not being signed as of June, 2013
repo_source='/etc/apt/sources.list.d/alt.list'
[ -s "$repo_source" ] || exit 0
sed -i 's, \[alt\],,' "$repo_source" ||:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment