mirror of
https://github.com/NixOS/nixos-hardware
synced 2024-11-26 21:09:42 +01:00
Add Toshiba swanky along with documentation
This commit is contained in:
parent
7b8ca6d868
commit
218ef7df3c
2 changed files with 93 additions and 0 deletions
63
toshiba/swanky/README.md
Normal file
63
toshiba/swanky/README.md
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
# Toshiba Chromebook (`swanky`)
|
||||||
|
|
||||||
|
There might be a way to install NixOS without hardware modifications (via
|
||||||
|
enabled developer mode and SeaBIOS boot on Ctrl+L), however I'd highly
|
||||||
|
recommend replacing Google's Coreboot payload with Tianocore: that allows for
|
||||||
|
proper virtualization, suspend, removes annoying developer mode screen, and
|
||||||
|
generally just works much better.
|
||||||
|
|
||||||
|
These instructions carry some risk of bricking your device, since you'll be
|
||||||
|
reflashing BIOS. Risk is rather low, but please for the love of god make a BIOS
|
||||||
|
backup and store it someplace safe. That's the only way to reinstall ChromeOS
|
||||||
|
back after this procedure (BIOS image has licensing info), and it's the easiest
|
||||||
|
way to unbrick (it's nice to be able to return to the last good state).
|
||||||
|
|
||||||
|
If you ever get unlucky, you can unbrick your device using a makeshift programmer
|
||||||
|
based on Raspberry Pi or BeagleBone Black, some cables and a SOIC clip, see:
|
||||||
|
http://sicarul.com/how-to-un-brick-your-toshiba-chromebook-2-gandof-without-invoking-any-demons/
|
||||||
|
|
||||||
|
## Enable developer mode
|
||||||
|
|
||||||
|
This will wipe all user data and settings from the laptop.
|
||||||
|
|
||||||
|
Power off, then hold ESC + Refresh (F3) and abruptly press power button. You
|
||||||
|
should see "Chrome OS is missing or damaged" message, press Ctrl+D. Press enter
|
||||||
|
at the next screen, then press Ctrl+D again. Wait until the laptop boots into
|
||||||
|
ChromeOS, then power it off.
|
||||||
|
|
||||||
|
## Disable hardware-backed BIOS write protection
|
||||||
|
|
||||||
|
Follow guide at: https://github.com/brendenyule/NativeToshibaCB2Guide/wiki/Remove-Write-Protect
|
||||||
|
|
||||||
|
Ignore 2.2, only follow the first part of the guide. I also placed some ductape
|
||||||
|
over #5 to make sure that metallic motherboard shield would not re-enable write
|
||||||
|
protection.
|
||||||
|
|
||||||
|
## Flash Coreboot + Tianocore BIOS
|
||||||
|
|
||||||
|
Go through installation dialogues until you have network access and are able to
|
||||||
|
log into Guest session. Open Chrome, press Ctrl+Alt+T to open `crosh`, type in
|
||||||
|
`shell` to get a real shell. Then, run:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ cd ~
|
||||||
|
$ curl -LO https://mrchromebox.tech/firmware-util.sh
|
||||||
|
$ sudo bash firmware-util.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
Choose option 3. Do not skip BIOS backup!
|
||||||
|
|
||||||
|
Documentation: https://mrchromebox.tech/#fwscript
|
||||||
|
|
||||||
|
## Enable hardware-backed BIOS write protection
|
||||||
|
|
||||||
|
This is a cool security feature, so after flashing Coreboot + Tianocore BIOS
|
||||||
|
and making sure new BIOS works, consider re-enabling BIOS protection. Just put
|
||||||
|
in the missing screw #5.
|
||||||
|
|
||||||
|
## Install NixOS
|
||||||
|
|
||||||
|
`dd` an image on a flash drive, partition the drive, etc. On some later models,
|
||||||
|
you can swap SSD with any other 2242 M.2 SATA SSD, but on `swanky`, you have
|
||||||
|
to live with what you have (16GB eMMC). I recommend `256MB` for EFI partition,
|
||||||
|
and the rest for `/`.
|
30
toshiba/swanky/default.nix
Normal file
30
toshiba/swanky/default.nix
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
with pkgs;
|
||||||
|
|
||||||
|
let
|
||||||
|
ucm = fetchzip {
|
||||||
|
url = "https://github.com/plbossart/UCM/archive/2050ca78a4d1a853d1ba050b591f42e6f97adfc0.tar.gz";
|
||||||
|
sha256 = "1rs4mpz3b965nmz0yhy6j4ga3fdz320qnpkd7d61nvpv9c3i6zwj";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../../common/cpu/intel
|
||||||
|
../../common/pc/laptop
|
||||||
|
];
|
||||||
|
|
||||||
|
# Sound only properly works out of the box on 4.18+ kernels.
|
||||||
|
boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
|
# Required for screen brightness control:
|
||||||
|
boot.kernelParams = [ "acpi_backlight=vendor" ];
|
||||||
|
|
||||||
|
# Sound requires a custom UCM config:
|
||||||
|
system.replaceRuntimeDependencies = [{
|
||||||
|
original = pkgs.alsaLib;
|
||||||
|
|
||||||
|
replacement = pkgs.alsaLib.overrideAttrs (super: {
|
||||||
|
postFixup = "cp -r ${ucm}/chtmax98090 $out/share/alsa/ucm";
|
||||||
|
});
|
||||||
|
}];
|
||||||
|
}
|
Loading…
Reference in a new issue