forked from mthuurne/opendingux-kernel
-
Notifications
You must be signed in to change notification settings - Fork 1
/
README-A320
172 lines (130 loc) · 5.98 KB
/
README-A320
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
Linux for the Dingoo A320
-------------
** History **
-------------
The initial port of Linux 2.6.24.3 to the A320 was done by Ignacio Garcia Perez
aka booboo. He added support for the Dingoo to the 2.6.24.3 kernel from Ingenic.
Ignacio Garcia Perez <iggarpe@gmail.com>
http://www.dingux.com/
The OpenDingux tree is a merge between booboo's patches and the qi-kernel tree
from Qi Hardware. This tree is kept up-to-date with the mainline kernel and
the latest drivers from Ingenic.
http://projects.qi-hardware.com/index.php/p/qi-kernel/
------------------
** Contributing **
------------------
You can find the latest code on github:
http://github.com/mthuurne/opendingux-kernel
Developers can be found on the #dingoonity channel on freenode IRC:
irc://irc.freenode.net/dingoonity
----------------
** Quickstart **
----------------
First download booboo's Dingux toolchain from:
http://code.google.com/p/dingoo-linux/downloads/list
It must be unpacked in /opt, otherwise applications will fail to link.
Tell the Linux kernel build that you want to compile for MIPS:
export ARCH=mips
Alternatively, you can pass "ARCH=mips" to every "make" command.
Use "make a320_defconfig" for a default configuration.
If your A320 is one of the older models, you must change the LCD driver
to ILI9325: (the default config uses ILI9331)
Device drivers
|---Graphics support
|---Support for framebuffer devices
|---SLCD panel
If you have an A330, keep the ILI9331 setting. If you want to use the full
64 MB of RAM, you need a new boot loader:
http://boards.dingoonity.org/dingux-releases/(release)-64mb-dingux-for-a330
Also, you should tell Linux that there is 64 MB present:
Kernel hacking
|---Built-in kernel command line
(... mem=64M)
You can modify the kernel configuration using "make menuconfig".
To build the kernel, use "make vmlinuz.bin". It will produce the kernel
binary named "vmlinuz.bin" in the top-level directory. The current u-boot
boot loaders expect the kernel image under its old name "zImage", so you
have to rename it if you put it on an SD card.
--------------
** Keyboard **
--------------
The keyboard driver has been completely rewritten now using the polled
input device code. The standard keyboard map is as follows:
D-pad up KEY_UP KEY_VOLUMEUP 's'
D-pad down KEY_DOWN KEY_VOLUMEDOWN 'u'
D-pad left KEY_LEFT KEY_BRIGHTNESSDOWN 'e'
D-pad right KEY_RIGHT KEY_BRIGHTNESSUP 'i'
A button KEY_LEFTCTRL
B button KEY_LEFTATL
X button KEY_SPACE
Y button KEY_LEFTSHIFT
Left shoulder KEY_TAB KEY_EXIT
Right shoulder KEY_BACKSPACE
START button KEY_ENTER
SELECT button KEY_ESC KEY_MENU 'b'
The second column is the generated keycode when the button is pressed normally.
The third column is the generated keycode when the button is pressed while the
power slider is pressed too.
The fourth column is the generated system request when the button is pressed
while both the power slider and the START button are pressed:
's' Emergency sync of all discs.
'u' Remount all discs read-only.
'e' Send SIGTERM to all processes except init.
'i' Send SIGKILL to all processes except init.
'b' Reboot immediately.
For example, to reboot the console syncing all disces and mounting read-only,
press and hold POWER, press and hold START, and press secuentially UP, DOWN
and SELECT. Note that SELECT is also used in dual-boot to select linux boot,
so if you hold SELECT pressed at the end of the previous sequence, you should
reboot back into linux.
Note that the POWER + key combinations are selected to enable an user space
daemon handle the volume, LCD bightness, and perhaps an on-screen keyboard.
If you hold the power slider pressed alone this is what will happen:
- After two seconds a KEY_POWER key press and release will be generated.
- After five seconds, an inmediate reboot will happen.
This is subject to change when hardware powerdown or idle support works.
I did my best to come up with a clever and useful keyboard map, but if you
have any suggestions, please do not hesitate to contact me.
-----------
** Sound **
-----------
The audio driver uses ALSA. For backwards compatibility, the OSS PCM API
driver is enabled as well.
The build of SDL in booboo's rootfs contains only OSS support. Some
applications are statically linked against an SDL that contains both OSS
and ALSA support. However, the latter tries to load libalsa at runtime,
which is not included in the rootfs. To force the use of OSS, set the
following environment variable:
export SDL_AUDIODRIVER=dsp
---------------------------------
** IPU (Image Processing Unit) **
---------------------------------
There is no IPU driver yet in this new kernel.
---------------------------
** CPU frequency scaling **
---------------------------
CPU frequency scaling is now default enabled. Have a look at the stuff
in /sys/devices/system/cpu/cpu0/cpufreq/. Default governor is "userspace".
It is untested, and anyway at the moment you can only REDUCE the CPU
frequency below the 336MHz set by the boot hardware initialization code
(in hwinit if you're booting vía USB boot).
-------------
** Battery **
-------------
You can read the battery status from the following file:
/sys/class/power_supply/battery/capacity
It contains a percentage: 0 is empty and 100 is full.
The /proc/jz interface of the old kernel is no longer supported. The new
interface is platform independent, so using it will improve the portability
of your applications.
-------------------
** LCD backlight **
-------------------
You can change the LCD backlight level by writing a value between 0 (off)
and 255 (max) to:
/sys/class/backlight/pwm-backlight/brightness
-------------------
** Miscellaneous **
-------------------
Lots of JZ4740 hardware support is disabled. Not because it doesn't
work but because it is untested. Enable it at your own risk.