blob: 37eb2c54442560dbffd05e6100c425047d41bca6 [file] [log] [blame] [view]
dmazzoni2f489752017-02-16 03:39:161# BRLTTY in Chrome OS
2
3Chrome OS uses the open-source [BRLTTY](http://mielke.cc/brltty/)
4library to provide support for refreshable braille displays.
5
6We typically ship with a stable release build of BRLTTY plus some
7cherry-picked patches.
8
9## Updating BRLTTY or adding a patch
10
11First, follow the public
12[Chromium OS Developer Guide](http://www.chromium.org/chromium-os/developer-guide) to check out the source.
13At a minimum you'll need to create a chroot.
14You do not need to build everything from source.
15You do need to start the devserver.
16
17Next, flash your device to a very recent test build. Internally at Google
18you can do this with the following command when the dev server is running,
19where CHROMEBOOK_IP_ADDRESS is the IP address of your Chromebook already
20in developer mode, and $BOARD is your Chromebook's board name.
21
22```cros flash ssh://CHROMEBOOK_IP_ADDRESS xbuddy://remote/$BOARD/latest-dev/test```
23
24The BRLTTY files can be found in this directory:
25
26```third_party/chromiumos-overlay/app-accessibility/brltty```
27
28The first thing you'll need to do is edit the ebuild symlink to change the
29revision number. The real file is something like brltty-5.4.ebuild,
30but the revision will be something like brltty-5.4-r5.ebuild. You'll need
31to increment it.
32
33To increment it from r5 to r6, you'd do something like this:
34
35```
36rm brltty-5.4-r5.ebuild
37ln -s brltty-5.4.ebuild brltty-5.4-r6.ebuild
38git add brltty-5.4-r6.ebuild
39```
40
41The changes we make are all patches against a stable release of brltty.
42To add a new patch, put it in the files/ directory and reference it in
43brltty.bashrc
44
45Once you're done adding patches or making other changes, flash it to your
46device like this:
47
48```
49emerge-$BOARD brltty
50cros deploy CHROMEBOOK_IP_ADDRESS brltty
51```
52
53After that, reboot your Chromebook and verify that brltty works.
54
55To upload a change, use repo, something like this:
56
57```
58repo start <branch_name> .
59git commit -a
60 BUG=chromium:12345
61 TEST=Write what you tested here
62repo upload .
63```
64
65Note that you shouldn't need to run cros_workon.
David Tseng9e78ce82018-10-26 22:08:0566
67## Uprevving Brltty
68
69This section outlines the process to upgrade Brltty to a major release.
70
71### Prerequisites
72
73First, download the latest brltty release tarball
74http://mielke.cc/brltty/archive
75E.g.
76brltty-5.6.tar.gz
77
78The server holding all Chrome OS source packages is Google Cloud Storage. In
79order to update Brltty, you will need to first get started with GCS.
80[Google-internal only](https://sites.google.com/a/google.com/chromeos/resources/engineering/releng/localmirror)
81
82If you follow the alternative cli workflow, you should have the ability to
83list the Chrome OS GCS bucket:
84
85
86```gsutil ls gs://chromeos-localmirror/```
87
88for example:
89gs://chromeos-localmirror/distfiles/brltty-5.6.tar.gz
90is the latest release as of writing.
91
92It will also be handy to checkout brltty.
93
94```Git clone http://github.com/brltty/brltty```
95
96And follow the instructions in the readme to configure/build.
97
98### Upload the latest stable release of brltty.
99
100You can do this via ```gsutil cp```.
101
102After copying, you will likely want the package to be world readable:
103
104
105```
106gsutil acl ch -u AllUsers:R gs://chromeos-localmirror/distfiles/brltty-5.6.tar.gz
107
108```
109
110### Upreving
111
112Next, you will need to uprev the ebuild. Do this by renaming all files from the previous version to the new one.
113E.g.
114Brltty-5.4.ebuild -> brltty-5.6.ebuild
115
116Note: Manifest has various checksums computed based on the release you uploaded to GCS. Each of these will need to be replaced/updated.
117
118This should be enough to kick off a build. It is likely patches won’t apply cleanly.
119Apply patches
120It is often much easier to apply patches to your local checkout of brltty from github, an build there.
121
122```git tags```
123
124Will ensure you find the right release. You can then checkout that release via
125
126```Git checkout tags/<tag_name>```
127
128### Testing
129
130Once you have a build deployed on a machine, here are a few useful things
131to check:
132* Routing keys within a text field
133* Routing keys on a link
134* Basic braille output
135* Chorded commands (e.g. space + s to toggle speech)
136* Typing (e.g. dots 1-2-3 within a text field)
137* Display specific hardware keys
138* Unload ChromeVox (ctrl+alt+z), plug in a display; ChromeVox should auto
139start
140
141Try to test with at least two displays.