Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reland "fix up supported devices page" #213

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ node_modules
.DS_Store

# Will be initilized on run/build time
src/docs/firmware/supported-devices.md
src/.vuepress/public/supported-devices.js
src/.vuepress/public/devices.json

# old ignored stuff
Expand Down
155 changes: 155 additions & 0 deletions src/.vuepress/public/supported-devices.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
function generateHTML(devicesJson) {
let html = `
<table style="font-size: 14px !important;">
<tbody>`;
let first = true;
for (const generation in devicesJson) {
let devices = devicesJson[generation];
if (devices.isExperimental === true && !window.hasOwnProperty("showExperimental")) continue;
devices.devices.forEach((device) => {
//set defaults
if (device.windows === undefined)
device.windows = devices.default_windows;
if (device.linux === undefined) device.linux = devices.default_linux;
if (device.mac === undefined) device.mac = devices.default_mac;
if (device.wpMethod === undefined)
device.wpMethod = devices.default_wpmethod;
if (device.fullrom === undefined)
device.fullrom = devices.default_fullrom;
if (device.rwLegacy === undefined)
device.rwLegacy = devices.default_rwLegacy;
});
if (first) {
first = false;
} else {
html += `
<tr>
<td colspan="8"></td>
</tr>`;
}
html += `
<tr>
<th colspan="8" style="text-align:left;"> <i>${generation}</i></th>
</tr>
<tr>
<th scope="col"> Device Name</th>
<th scope="col"> Board Name</th>
<th scope="col"> RW_LEGACY <br> Firmware</th>
<th scope="col"> UEFI Firmware <br>(Full ROM)</th>
<th scope="col"> WP Method</th>
<th scope="col"> Windows Notes</th>
<th scope="col"> Linux Notes</th>
<th scope="col"> MacOS Notes</th>
</tr>`;

let windows;
let linux;
let mac;

devices.devices.forEach((device, index) => {
let devicename = device.device.join("<br>");
let rw_legacy = "";
if (device.rwLegacy === null) {
rw_legacy = '<span style="color:#ff0000"><b>EOL</b></span>';
} else if (device.rwLegacy === true) {
rw_legacy = "✅";
}
let full_rom = device.fullrom ? "✅" : "";

let win_out = "";
let linux_out = "";
let mac_out = "";
if (windows !== device.windows) {
let length = 0;
windows = device.windows;
for (let i = index; i < devices.devices.length; i++) {
if (devices.devices[i].windows === windows) length++;
else break;
}
win_out = `\n <td rowspan="${length}" style=\"text-align:center;\">${windows}</td>`;
}
if (linux !== device.linux) {
let length = 0;
linux = device.linux;
for (let i = index; i < devices.devices.length; i++) {
if (devices.devices[i].linux === linux) length++;
else break;
}
if (!linux) linux = devices.default_linux;
linux_out = `\n <td rowspan="${length}" style=\"text-align:center;\">${linux}</td>`;
}
if (mac !== device.mac) {
let length = 0;
mac = device.mac;
for (let i = index; i < devices.devices.length; i++) {
if (devices.devices[i].mac === mac) length++;
else break;
}
if (!mac) mac = devices.default_mac;
mac_out = `\n <td rowspan="${length}" style=\"text-align:center;\">${mac}</td>`;
}

html += `
<tr>
<td>${devicename}</td>
<td style="text-align:center;"> ${device.boardname}</td>
<td style="text-align:center;"> ${rw_legacy}</td>
<td style="text-align:center;"> ${full_rom}</td>
<td style="text-align:center;"> ${device.wpMethod}</td>
${win_out}${linux_out}${mac_out}
</tr>`;
});
}
html += `
</tbody>
</table>`;
return html;
}

(async () => {
const table = document.querySelector(".deviceTable");
const searchbox = document.querySelector(".deviceSearch");
let devices = [];
try {
devices = JSON.parse(await (await fetch("../../devices.json")).text());
} catch(e) {
console.warn(e);
searchbox.parentElement.remove();
return;
}

table.innerHTML = generateHTML(JSON.parse(JSON.stringify(devices)));

function search(keyword) {
let dv = JSON.parse(JSON.stringify(devices));
keyword = keyword.toLowerCase().trim();
if (keyword === "show hidden!") {
searchbox.value = "";
keyword = "";
window.showExperimental = true;
}
if (!keyword) {
table.innerHTML = generateHTML(dv);
return;
}
for (const k in dv) {
for (let i=0; i<dv[k].devices.length; i++) {
let hasTerm = dv[k].devices[i].device.filter(e => e.toLowerCase().includes(keyword)).length !== 0 || dv[k].devices[i].boardname.toLowerCase().includes(keyword);
if (!hasTerm) {
dv[k].devices.splice(i, 1);
i--;
}
}
if (dv[k].devices.length === 0) {
delete dv[k];
}
}
if (Object.keys(dv).length === 0) {
table.innerHTML = "";
table.innerText = "Device not found. Did you make a typo?";
return;
}
table.innerHTML = generateHTML(dv);
}
searchbox.addEventListener("keyup", (e) => search(e.target.value));
})();
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ prev: system-info
next: known-issues
---

<!--
NOTE - do not edit the supported-devices.md file, edit the template file in the supported-devices folder
-->

# Supported Devices and Platforms

Supported devices are listed in the table below, grouped by platform/family. If your device is not listed, it is not supported. Support is determined entirely and exclusively by the boardname. Use your Chromebook's boardname to see if it has support.
Expand All @@ -15,21 +11,19 @@ Supported devices are listed in the table below, grouped by platform/family. If

What's in a name? All ChromeOS devices have a board/device name, which determines which firmware, OS build, etc a device uses. The board name is listed at the bottom of both the Recovery Mode and Developer Mode screens, as part of the hardware ID (HWID).

The chart below provides a full list of all ChromeOS devices currently supported by MrChromebox's Firmware Utility Script, the firmware types available for each, the hardware write-protect method used, and notes for Windows, Linux, and macOS operating systems.

In most cases, all of the devices in a given platform/family are supported, but sometimes there are exceptions (especially with older or newer devices). The goal is to offer both RW_LEGACY and UEFI Full ROM firmware for all devices, so you may have the option of dual booting ChromeOS, or liberating your device completely :)
The chart below provides a full list of all ChromeOS devices currently supported by Chrultrabook, the firmware type available for each, and notes for Windows, Linux, and macOS operating systems.

Be aware that EOL (End Of Life) devices **DO NOT** have RW_Legacy avaliable
In most cases, all of the devices in a given platform/family are supported, but sometimes there are exceptions (especially with older or newer devices).

### OS Support

A device having firmware available (either RW_LEGACY or UEFI Full ROM) does not imply any level of functionality when running an OS other than ChromeOS. Some devices/platforms are better supported in some Linux distros vs others. Some devices/platforms are better supported under Windows than others.

## Supported Platforms

| Intel | AMD | ARM |
| ------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Intel platforms have good support for both Linux and Windows. Some have support for macOS. | Stoneyridge support in Windows is questionable, and installing a custom kernel is required to get working audio in Linux. Ryzen has support for both Linux and Windows. MacOS is **untested** on AMD platforms. | Currently unsupported by the Chrultrabook dev team. [PostmarketOS](https://wiki.postmarketos.org/wiki/Chrome_OS_devices) has support for a few ARM Chromebooks. |
| Intel | AMD | ARM |
| ------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| Intel platforms have good support for both Linux and Windows. Some have support for macOS. | Stoneyridge support in Windows is questionable, and installing a custom kernel is required to get working audio in Linux. Ryzen has support for both Linux and Windows. MacOS is **untested** on AMD platforms. | Currently unsupported (WIP). [PostmarketOS](https://wiki.postmarketos.org/wiki/Chrome_OS_devices) has support for a few ARM Chromebooks. |

## Firmware and OS Support

Expand All @@ -42,8 +36,7 @@ If you are on a smaller screen, scroll sideways to see whole table.
:::

<AddScript script-url="../../supported-devices.js"/>

<p>Search: <input type="text" class="deviceSearch"></p>

<div class="deviceTable">
${{TABLE}}
</div>
<div class="deviceTable">Loading...</div>
Loading
Loading