README.md 3.38 KB
Newer Older
iv's avatar
iv committed
1 2
# NayuOS

3
This is a SlapOS recipe to build NayuOS. It needs to be put in the <code>/srv/slapgrid/\<part\>/srv/runner/project/slapos/software/</code> directory. The created directory is called <code>\<nayuos_build_dirname\></code> in this documentation.
iv's avatar
iv committed
4 5 6 7

## License

GPL v2 or later
iv's avatar
iv committed
8 9 10

## Requirements

11 12 13 14 15
*   sudo on the host (for now)
*   some environment variables need to be authorized to be propagated when cros_sdk calls sudo:

: Defaults        env_keep += "CROS_CACHEDIR DEPOT_TOOLS"

iv's avatar
iv committed
16
*   slapuser with sudo rights to execute the cros_sdk scripts (needed to access the chroot environment provided by Chromium OS)
17 18 19 20 21
in /etc/sudoers (replace slapuser9 by your user, and release-R48-7647.B by the release you have chosen):

: slapuser9    ALL=NOPASSWD: /srv/slapgrid/slappart9/srv/runner/instance/slappart0/parts/chromiumos/release-R48-7647.B/chromite/bin/cros_sdk, /srv/slapgrid/slappart9/srv/runner/instance/slappart0/wrapper_bin/wrapper_cros_sdk, /bin/kill

It's useful to have the right to kill cros_sdk processes, when needed. ;)
iv's avatar
iv committed
22 23 24 25

## Input
In the vifib parameters (softinst\<nb\>.host.vifib.net \> Services \> Parameters):

iv's avatar
iv committed
26
*   board / ex: peppy, swanky, ... (choosing daisy will accept all licenses for the daisy board build only, in order to use Mali drivers, see [chromium mailing list](https://groups.google.com/a/chromium.org/forum/#!topic/chromium-os-dev/Pf9ZG2itxWM))
27
*   branch / ex: release-R46-7390.B (you can find the release in the [Chromium OS source tree](https://chromium.googlesource.com/chromiumos/manifest/+refs))
iv's avatar
iv committed
28
*   keep_cache / yes|no (choosing "no" saves about 15Go of disk space per board, choosing "yes" will makes next build faster and less expensive in term of needed ressources because of not rebuilding everything)
iv's avatar
iv committed
29 30 31


## Output
32 33 34
The image will be produced in:
<code>/srv/slapgrid/\<part\>/srv/runner/instance/\<inst_part\>/parts/chromiumos/images/</code>
and the logs are in:
iv's avatar
iv committed
35 36 37
<code>/srv/slapgrid/\<part\>/srv/runner/instance/\<inst_part\>/var/log/cros_sources_dl.log</code> and <code>/srv/slapgrid/\<part\>/srv/runner/instance/\<inst_part\>/var/log/cros_build.log</code>

The script that download the sources and build is located in
iv's avatar
iv committed
38
<code>/srv/slapgrid/\<part\>/srv/runner/instance/\<inst_part\>/etc/run</code>
39 40 41

## External documents

iv's avatar
iv committed
42
*   [ <code>repo</code> command reference ](https://source.android.com/source/using-repo.html)
43
*   [ NayuOS official website ](https://www.nayuos.com)
iv's avatar
iv committed
44 45 46
*   [ crouton for chroot ](https://github.com/dnschneid/crouton) ([warning about verified boot](https://github.com/dnschneid/crouton/blob/2a1fc9da380650f47e2bcf37d00962bfb68c4830/installer/main.sh#L517-L536))

## Notes for possible improvements
iv's avatar
iv committed
47 48
*   [ Running virtual machines on your chromebook ](https://www.chromium.org/chromium-os/developer-information-for-chrome-os-devices/running-virtual-machines-on-your-chromebook)
*   to have a more common User Agent (the one of ChromiumOS/NayuOS is quite rare and identifies the user, see [studies of the EFF](https://panopticlick.eff.org/static/browser-uniqueness.pdf)), it seems possible to change the User-Agent flag for guest mode in the getOffTheRecord function, and adding a line (key "kUserAgent" , value "some common user agent" string). Then rebuild Chromium and [add it to NayuOS](https://www.chromium.org/chromium-os/developer-guide#TOC-Making-changes-to-the-Chromium-web-).
49
*   remove need of root priviledge for entering the chroot, maybe by using fakeroot in 'scripts/wrapper_sudo.in'?