Go Down

Topic: Desktop IDE running on Chromebook via chroot (Read 1 time) previous topic - next topic

Jun 24, 2018, 09:13 pm Last Edit: Jun 24, 2018, 10:14 pm by vap0rtranz Reason: another link
I wanted to share how relatively simple it is to get the Desktop IDE running on ChromeOS, even an ARM based Chromebook.  :)

First off, I want to explain why someone would do this:
1) there isn't Desktop IDE release that's built for ChromeOS
2) alternatives to the Desktop IDE have limitations that some of us have bumped into. (see Reviews of ChromeDuino, the Web Editor, etc.)
3) there are misconceptions that Chromebook/ARM isn't possible / terribly complicated  :o (https://forum.arduino.cc/index.php?topic=403419.0)

So now to the steps.  Basically you'll be using chroot to allow installation of a confined Linux distribution that can run the Desktop IDE Linux builds.  If your aren't familiar with the power and genius of chroot or jails in BSD, see this old school explanation its origin in FreeBSD: https://docs.freebsd.org/44doc/papers/jail/jail-1.html.  In the new ChromeOS world, chroot is most easily done via the ChRomium Os Universal chrooT envirONment, or crouton.  

Here is how I got the Desktop IDE working on my Chromebook.

1. Enable Developer Mode*
There are several guides already but you only need to get to crosh, used in next step. https://www.chromium.org/chromium-os/poking-around-your-chrome-os-device
2. Launch ChromeOS developer shell (crosh) -
press [CRTL][ALT][T]
3. Launch terminal shell -
Code: [Select]
$ crosh> shell
4. Download & verify the chroot install wrapper (crouton) -
See https://github.com/dnschneid/crouton
Code: [Select]
$ sudo sh ~/Downloads/crouton -t list
5a. Determine your Chromebook's architecture for selecting the right chroot architecture (the -a option in next step).  Intel based Chromebook's can probably skip this step.
Code: [Select]
$ uname -m
5b. Install chroot of Ubuntu with target of LXDE GUI based on architecture, if needed.  I had to use 32-bit ARM** architecture:
Code: [Select]
$ sudo sh ~/Downloads/crouton -t lxde -a armhf -n lxde-arm32-chroot
7. Start the LXDE chroot:
Code: [Select]
$ sudo startlxde -n lxde-arm32-chroot
8. Inside the chroot, download & install the architecture specific release of Desktop IDE as usual
9. Test the Blink sketch, and TADA!


* contrary to FUD out there, Dev Mode doesn't void your warranty with Google. (https://productforums.google.com/forum/#!topic/chromebook-central/9iWV_3jU8uA)  Google itself created Dev Mode.  If you need Google Support, you revert out of Dev Mode.  The misconceptions probably arose from people (ab)using Dev Mode to remove/replace ChromeOS itself or modify the bootloader.  If you do that, then you're SOL.  Replacing/removing ChromeOS or the bootloader isn't required for my process here, but just use of crosh shell that Dev Mode enables.

** Most folks can use the autodetected architecture of your host in step (5a) because many Chromebooks are Intel and the Desktop IDE has both 32bit and 64bit releases.  My Chromebook, however, is a 64bit ARM but the ARM release of Desktop IDE is embedded with 32bit Java.  There is a Github Issue tracking a 64bit release of ARM but my steps above, (5a) and (5b), work around this blocker: https://github.com/arduino/Arduino/issues/7302
BTW, crouton can install 4 architectures of chroots.  See https://github.com/dnschneid/crouton/blob/master/installer/ubuntu/defaults

Robin2

Thanks for sharing.

I wonder should this be moved to the Exhibition / Gallery section?

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

sterretje

Great; thanks for sharing.

Can't judge if it works as I don't have a chromebook.
If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

Go Up