Cobalt Evergreen Raspi-2 Reference Port
Stay organized with collections
Save and categorize content based on your preferences.
Requirements
Build instructions
## Clone the repository
$ git clone https://cobalt.googlesource.com/cobalt
## Build the loader app (new entry point)
$ cd cobalt/src
$ cobalt/build/gn.py -p raspi-2 -c qa
$ ninja -C out/raspi-2_qa loader_app crashpad_handler
## Create package directory for Cobalt Evergreen
$ export COEG_PATH=coeg
$ cp out/raspi-2_qa/loader_app $COEG_PATH
## Create directory structure for the initial installation
[2-slot configuration]
$ mkdir -p ~/.cobalt_storage/installation_0/
$ cd ~/.cobalt_storage/installation_0/
[3-slot configuration]
$ mkdir -p $COEG_PATH/content/app/cobalt
$ cd $COEG_PATH/content/app/cobalt
## Download package
$ curl -L https://dl.google.com/cobalt/evergreen/latest/cobalt_arm-hardfp_qa.crx -o cobalt.zip
## Unpack content package
$ unzip cobalt.zip
$ rm cobalt.zip
$ cd -
The following are the steps to build the Cobalt content that’s contained in the
crx package. Note you only need to do this if you want to build the Cobalt
shared library and supplementary components.
## Build Cobalt core locally
$ cd cobalt/src
$ cobalt/build/gn.py -p evergreen-arm-hardfp -c qa
$ ninja -C out/evergreen-arm-hardfp_qa cobalt
## Copy the generated files to the package directory for Cobalt Evergreen
$ cp -r out/evergreen-arm-hardfp_qa/lib $COEG_PATH/content/app/cobalt/
$ cp -r out/evergreen-arm-hardfp_qa/content $COEG_PATH/content/app/cobalt/
## Create a file named manifest.json with the following content, and put it under $COEG_PATH/content/app/cobalt/
$ cat > $COEG_PATH/content/app/cobalt/manifest.json <<EOF
{
"manifest_version": 2,
"name": "Cobalt",
"description": "Cobalt",
"version": "1.0.0"
}
EOF
Deployment instructions
Configure your Raspberry Pi 2 with the following steps from your Linux machine.
## Save the address of the device
$ export RASPI_ADDR=<YOUR_RASPI_ID_ADDR>
## Remove old storage directory
$ rm -rf /home/pi/.cobalt_storage
## Copy the Evergreen contents to the device
$ rsync -arvp $COEG_PATH pi@$RASPI_ADDR:/home/pi
## Launch
$ ssh pi@$RASPI_ADDR /home/pi/$COEG_PATH/loader_app
Run instructions
$ ssh pi@$RASPI_ADDR
$ cd coeg
$ ./loader_app
Cobalt should load and work as usual, but leveraging Evergreen. That’s it!
Troubleshooting
Certificate errors on execution of loader_app
Certificate issues may occur on certain network environments when launching
loader_app
via SSH. In this case, try launching with a keyboard directly
connected to the device.
“Failed to load library at ” thrown on startup
The loader can’t find the libcobalt.so
file. Check that the path to
libcobalt.so
completely matches the one in Deployment instructions.
“fatal error: “assert(sk_file)”” thrown on startup
The loader can’t find the content/data folder or it is malformed. Check that the
path to this folder completely matches the one in Deployment instructions.
“Check failed: address. Failed to retrieve the address” thrown on startup
Ensure that libcobalt.so
being used is the correct version. For a rebuild, you
may need to remove the old .cobalt_storage directory on your device.
## Remove old storage directory
$ rm -rf /home/pi/.cobalt_storage
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-09-03 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-03 UTC."],[[["\u003cp\u003eThis document provides instructions for setting up, building, and deploying Cobalt Evergreen on a Raspberry Pi 2 environment.\u003c/p\u003e\n"],["\u003cp\u003eThe build process involves cloning the Cobalt repository, building the loader app, and creating a package directory for Cobalt Evergreen.\u003c/p\u003e\n"],["\u003cp\u003eDeployment requires configuring the Raspberry Pi 2, copying the Evergreen contents to the device via rsync, and launching the loader app through SSH.\u003c/p\u003e\n"],["\u003cp\u003eThe instructions outline how to build the Cobalt core locally and copy the generated files to the package directory, including the creation of a \u003ccode\u003emanifest.json\u003c/code\u003e file.\u003c/p\u003e\n"],["\u003cp\u003eTroubleshooting tips are provided for common errors, such as certificate issues, missing libraries, and address retrieval failures, which includes removing old storage directories.\u003c/p\u003e\n"]]],["The process involves cloning the Cobalt repository, building the loader app, and creating a package directory for Cobalt Evergreen. A content package is downloaded, unpacked, and the Cobalt core is built locally. Generated files are copied to the package directory, along with a `manifest.json` file. For deployment, the storage directory on the Raspberry Pi is cleared and Evergreen content is copied over. Finally, it describes launching `loader_app` through SSH, alongside troubleshooting common certificate, library, data, or address-related errors.\n"],null,["Requirements\n\n- Raspberry Pi environment setup per [instructions](https://developers.google.com/youtube/cobalt/docs/development/setup-raspi).\n\nBuild instructions \n\n ## Clone the repository\n $ git clone https://cobalt.googlesource.com/cobalt\n\n ## Build the loader app (new entry point)\n $ cd cobalt/src\n $ cobalt/build/gn.py -p raspi-2 -c qa\n $ ninja -C out/raspi-2_qa loader_app crashpad_handler\n\n ## Create package directory for Cobalt Evergreen\n $ export COEG_PATH=coeg\n $ cp out/raspi-2_qa/loader_app $COEG_PATH\n\n ## Create directory structure for the initial installation\n [2-slot configuration]\n $ mkdir -p ~/.cobalt_storage/installation_0/\n $ cd ~/.cobalt_storage/installation_0/\n\n [3-slot configuration]\n $ mkdir -p $COEG_PATH/content/app/cobalt\n $ cd $COEG_PATH/content/app/cobalt\n\n ## Download package\n $ curl -L https://dl.google.com/cobalt/evergreen/latest/cobalt_arm-hardfp_qa.crx -o cobalt.zip\n\n ## Unpack content package\n $ unzip cobalt.zip\n $ rm cobalt.zip\n $ cd -\n\nThe following are the steps to build the Cobalt content that's contained in the\ncrx package. Note you only need to do this if you want to build the Cobalt\nshared library and supplementary components. \n\n ## Build Cobalt core locally\n $ cd cobalt/src\n $ cobalt/build/gn.py -p evergreen-arm-hardfp -c qa\n $ ninja -C out/evergreen-arm-hardfp_qa cobalt\n\n ## Copy the generated files to the package directory for Cobalt Evergreen\n $ cp -r out/evergreen-arm-hardfp_qa/lib $COEG_PATH/content/app/cobalt/\n $ cp -r out/evergreen-arm-hardfp_qa/content $COEG_PATH/content/app/cobalt/\n\n ## Create a file named manifest.json with the following content, and put it under $COEG_PATH/content/app/cobalt/\n $ cat \u003e $COEG_PATH/content/app/cobalt/manifest.json \u003c\u003cEOF\n {\n \"manifest_version\": 2,\n \"name\": \"Cobalt\",\n \"description\": \"Cobalt\",\n \"version\": \"1.0.0\"\n }\n EOF\n\nDeployment instructions\n\nConfigure your Raspberry Pi 2 with the following steps from your Linux machine. \n\n ## Save the address of the device\n $ export RASPI_ADDR=\u003cYOUR_RASPI_ID_ADDR\u003e\n\n ## Remove old storage directory\n $ rm -rf /home/pi/.cobalt_storage\n\n ## Copy the Evergreen contents to the device\n $ rsync -arvp $COEG_PATH pi@$RASPI_ADDR:/home/pi\n\n ## Launch\n $ ssh pi@$RASPI_ADDR /home/pi/$COEG_PATH/loader_app\n\nRun instructions \n\n $ ssh pi@$RASPI_ADDR\n $ cd coeg\n $ ./loader_app\n\nCobalt should load and work as usual, but leveraging Evergreen. That's it!\n\nTroubleshooting\n\nCertificate errors on execution of loader_app\n\nCertificate issues may occur on certain network environments when launching\n`loader_app` via SSH. In this case, try launching with a keyboard directly\nconnected to the device.\n\n\"Failed to load library at \" thrown on startup\n\nThe loader can't find the `libcobalt.so` file. Check that the path to\n`libcobalt.so` completely matches the one in Deployment instructions.\n\n\"fatal error: \"assert(sk_file)\"\" thrown on startup\n\nThe loader can't find the content/data folder or it is malformed. Check that the\npath to this folder completely matches the one in Deployment instructions.\n\n\"Check failed: address. Failed to retrieve the address\" thrown on startup\n\nEnsure that `libcobalt.so` being used is the correct version. For a rebuild, you\nmay need to remove the old .cobalt_storage directory on your device. \n\n ## Remove old storage directory\n $ rm -rf /home/pi/.cobalt_storage"]]