diff mbox series

Patch to add Librem 15 laptop to flashrom whitelist

Message ID 631298f2-5467-7849-b1ca-0b86e5e30ece@sdf.org
State New
Headers show
Series Patch to add Librem 15 laptop to flashrom whitelist | expand

Commit Message

Harry Prevor Nov. 16, 2017, 8:39 a.m. UTC
Attached is a patch to whitelist the Librem 15 laptop on flashrom, so that I don't have to write "force_I_want_a_brick" every time I use it. I also added the laptop's info to print.c so it shows up as a supported device. This is my first ever patch, so please let me know if there is anything missing or that I can do to improve it!

Added as per this PureOS bug: https://tracker.pureos.net/T170

P.S. Please CC me on any replies as I am not receiving messages from this list. Thanks!

Comments

Richard Hughes Nov. 17, 2017, 7:36 p.m. UTC | #1
On 16 November 2017 at 08:39, Harry Prevor <habs@sdf.org> wrote:
> so that I don't have to write "force_I_want_a_brick" every time I use it

When I tried to merge the fwupd plugin for flashrom seeing this flag
did cause the reviewer some distress... Merging this makes sense to
me.

Richard.
Nico Huber Nov. 19, 2017, 4:20 p.m. UTC | #2
Hi Harry,

On 16.11.2017 09:39, Harry Prevor wrote:
> Attached is a patch to whitelist the Librem 15 laptop on flashrom, so
> that I don't have to write "force_I_want_a_brick" every time I use it. I
> also added the laptop's info to print.c so it shows up as a supported
> device. This is my first ever patch, so please let me know if there is
> anything missing or that I can do to improve it!

thanks for your patch. As you seem to be using Git anyway, you can also
push (future versions of) this patch directly to our reviewing system
[1]. If you prefer email communication, please always send your patches
inline to make it easier to comment on them.

I'll leave some comments inline below. My major concern is that you
didn't mention a distinguished version of the Librem 15. AIUI, there
are at least two by now.

Regards,
Nico

[1] Repository here: https://review.coreboot.org/flashrom.git
     Workflow is the same as for coreboot: https://coreboot.org/Git

> From c404b38e7f78be5544089715e7e5ecd84e55e70f Mon Sep 17 00:00:00 2001
> From: Harry Prevor <habs@sdf.org>
> Date: Thu, 16 Nov 2017 03:24:48 -0500
> Subject: [PATCH] Added the Purism Librem 15 laptop to whitelist and print.c,
>  as per: https://tracker.pureos.net/T170
> 
> Change-Id: I9255f3e7e71ab84283feb5b3895191777510e893
> Signed-off-by: Harry Prevor <habs@sdf.org>
> ---
>  board_enable.c | 1 +
>  print.c        | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/board_enable.c b/board_enable.c
> index b6e17ef..435b272 100644
> --- a/board_enable.c
> +++ b/board_enable.c
> @@ -2458,6 +2458,7 @@ const struct board_match board_matches[] = {
>  	{0x10DE, 0x0360, 0x1462, 0x7250,  0x10DE, 0x0368, 0x1462, 0x7250, NULL,         NULL, NULL,           P3, "MSI",         "MS-7250 (K9N SLI)",     0,   OK, nvidia_mcp_gpio2_raise},
>  	{0x1011, 0x0019, 0xaa55, 0xaa55,  0x8086, 0x7190,      0,      0, NULL,         NULL, NULL,           P3, "Nokia",       "IP530",                 0,   OK, fdc37b787_gpio50_raise_3f0},
>  	{0x8086, 0x3B30, 0x1025, 0x0379,  0x8086, 0x3B09, 0x1025, 0x0379, "^EasyNote LM85$", NULL, NULL,      P2, "Packard Bell","EasyNote LM85",         0,   OK, p2_whitelist_laptop},
> +	{0x8086, 0x9d48, 0x8086, 0x9d48, 0x8086, 0x1904, 0x8086, 0x2015,  "^Librem 15", NULL, NULL,           P2, "Purism",      "Librem 15",             0,   OK, p2_whitelist_laptop},

The name given in the 14th column should reflect the specific model
(e.g. "Librem 15 v1" or "Librem 15 v2").

>  	{0x8086, 0x0154, 0x8086, 0x0154,  0x8086, 0x1e55, 0x8086, 0x1e55, "RV11$",      "Roda", "Lizard RV11", P2, "Roda",       "RV11",                  0,   OK, p2_whitelist_laptop},
>  	{0x8086, 0x24d3, 0x144d, 0xb025,  0x8086, 0x1050, 0x144d, 0xb025, NULL,         NULL, NULL,           P3, "Samsung",     "Polaris 32",            0,   OK, intel_ich_gpio21_raise},
>  	{0x1106, 0x3099,      0,      0,  0x1106, 0x3074,      0,      0, NULL,         "shuttle", "ak31",    P3, "Shuttle",     "AK31",                  0,   OK, w836xx_memw_enable_2e},
> diff --git a/print.c b/print.c
> index 08bad02..32bca59 100644
> --- a/print.c
> +++ b/print.c
> @@ -1173,6 +1173,7 @@ const struct board_info laptops_known[] = {
>  	B("IBM/Lenovo",	"3000 V100 TF05Cxx",	OK, "http://www5.pc.ibm.com/europe/products.nsf/products?openagent&brand=Lenovo3000Notebook&series=Lenovo+3000+V+Series#viewallmodelstop", NULL),
>  	//B("MSI",	"GT60-2OD",		OK, "http://www.msi.com/product/nb/GT60_2OD.html", NULL), requires layout patches
>  	B("Teclast",	"X98 Air 3G",		OK, NULL, NULL),
> +	B("Purism",     "Librem 15",            OK, "https://puri.sm/shop/librem-15/", "Flashrom is used by the manufacturers before shipping!"),

Again please list the specific model. Also, AFAIK, Purism doesn't care
about older models on their webpage. So this may link to the wrong
information soon. Instead you could let archive.org take a snapshot of
the current page and link there.

>  #endif
>  
>  	{0},
> -- 
> 2.15.0
diff mbox series

Patch

From c404b38e7f78be5544089715e7e5ecd84e55e70f Mon Sep 17 00:00:00 2001
From: Harry Prevor <habs@sdf.org>
Date: Thu, 16 Nov 2017 03:24:48 -0500
Subject: [PATCH] Added the Purism Librem 15 laptop to whitelist and print.c,
 as per: https://tracker.pureos.net/T170

Change-Id: I9255f3e7e71ab84283feb5b3895191777510e893
Signed-off-by: Harry Prevor <habs@sdf.org>
---
 board_enable.c | 1 +
 print.c        | 1 +
 2 files changed, 2 insertions(+)

diff --git a/board_enable.c b/board_enable.c
index b6e17ef..435b272 100644
--- a/board_enable.c
+++ b/board_enable.c
@@ -2458,6 +2458,7 @@  const struct board_match board_matches[] = {
 	{0x10DE, 0x0360, 0x1462, 0x7250,  0x10DE, 0x0368, 0x1462, 0x7250, NULL,         NULL, NULL,           P3, "MSI",         "MS-7250 (K9N SLI)",     0,   OK, nvidia_mcp_gpio2_raise},
 	{0x1011, 0x0019, 0xaa55, 0xaa55,  0x8086, 0x7190,      0,      0, NULL,         NULL, NULL,           P3, "Nokia",       "IP530",                 0,   OK, fdc37b787_gpio50_raise_3f0},
 	{0x8086, 0x3B30, 0x1025, 0x0379,  0x8086, 0x3B09, 0x1025, 0x0379, "^EasyNote LM85$", NULL, NULL,      P2, "Packard Bell","EasyNote LM85",         0,   OK, p2_whitelist_laptop},
+	{0x8086, 0x9d48, 0x8086, 0x9d48, 0x8086, 0x1904, 0x8086, 0x2015,  "^Librem 15", NULL, NULL,           P2, "Purism",      "Librem 15",             0,   OK, p2_whitelist_laptop},
 	{0x8086, 0x0154, 0x8086, 0x0154,  0x8086, 0x1e55, 0x8086, 0x1e55, "RV11$",      "Roda", "Lizard RV11", P2, "Roda",       "RV11",                  0,   OK, p2_whitelist_laptop},
 	{0x8086, 0x24d3, 0x144d, 0xb025,  0x8086, 0x1050, 0x144d, 0xb025, NULL,         NULL, NULL,           P3, "Samsung",     "Polaris 32",            0,   OK, intel_ich_gpio21_raise},
 	{0x1106, 0x3099,      0,      0,  0x1106, 0x3074,      0,      0, NULL,         "shuttle", "ak31",    P3, "Shuttle",     "AK31",                  0,   OK, w836xx_memw_enable_2e},
diff --git a/print.c b/print.c
index 08bad02..32bca59 100644
--- a/print.c
+++ b/print.c
@@ -1173,6 +1173,7 @@  const struct board_info laptops_known[] = {
 	B("IBM/Lenovo",	"3000 V100 TF05Cxx",	OK, "http://www5.pc.ibm.com/europe/products.nsf/products?openagent&brand=Lenovo3000Notebook&series=Lenovo+3000+V+Series#viewallmodelstop", NULL),
 	//B("MSI",	"GT60-2OD",		OK, "http://www.msi.com/product/nb/GT60_2OD.html", NULL), requires layout patches
 	B("Teclast",	"X98 Air 3G",		OK, NULL, NULL),
+	B("Purism",     "Librem 15",            OK, "https://puri.sm/shop/librem-15/", "Flashrom is used by the manufacturers before shipping!"),
 #endif
 
 	{0},
-- 
2.15.0