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