13 Dec 2024 |
| bunbun joined the room. | 09:08:35 |
bunbun | hello all, i was wondering if anyone knows of a way to use ccache for kernel builds? currently my build takes almost 3 hours for one tiny patch and it's kind of a problem. i've done some looking and tried some different things i found but none of them worked | 09:12:51 |
K900 | ccache doesn't really work well with Nix | 09:13:40 |
K900 | What is your patch for? | 09:13:43 |
bunbun | a very stupid thing | 09:13:56 |
bunbun | diff --git a/drivers/firmware/dmi-id.c b/drivers/firmware/dmi-id.c
index d19c78a78ae3..8c87d66bd4b6 100644
--- a/drivers/firmware/dmi-id.c
+++ b/drivers/firmware/dmi-id.c
@@ -19,6 +19,17 @@ struct dmi_device_attribute{
#define to_dmi_dev_attr(_dev_attr) \
container_of(_dev_attr, struct dmi_device_attribute, dev_attr)
+void apply_twinkpad_replacement(char* str)
+{
+ static const char thinkpadstr[] = "thinkpad";
+ while (*str) {
+ if (!strncasecmp(str, thinkpadstr, sizeof(thinkpadstr) - 1)) {
+ str[1] ^= 'H' ^ 'W';
+ }
+ ++str;
+ }
+}
+
static ssize_t sys_dmi_field_show(struct device *dev,
struct device_attribute *attr,
char *page)
@@ -26,6 +37,7 @@ static ssize_t sys_dmi_field_show(struct device *dev,
int field = to_dmi_dev_attr(attr)->field;
ssize_t len;
len = scnprintf(page, PAGE_SIZE, "%s\n", dmi_get_system_info(field));
+ apply_twinkpad_replacement(page);
page[len-1] = '\n';
return len;
}
| 09:14:20 |
K900 | I assume "have you considered not doing that" isn't useful then, is it | 09:16:05 |
bunbun | i think it's worth it, but that's just me | 09:16:54 |
K900 | You could also try changing the string that's actually reported by the firmware | 09:20:17 |
K900 | Using e.g. https://www.ami.com/bios-uefi-utilities/ | 09:20:21 |
bunbun | oh interesting, that's not something i've seen before | 09:21:12 |
| Christian Theune joined the room. | 12:52:26 |
| Ben Sparks joined the room. | 13:32:22 |
ElvishJerricco | I used this a long time ago. There's a couple of settings that are important there. https://gist.github.com/ElvishJerricco/152c4e7dbffabe7cee2e3a421ccf47ef | 14:17:26 |
ElvishJerricco | IIRC some of the env variables are necessary for cache hits | 14:17:51 |
ElvishJerricco | otherwise it barely helps | 14:17:56 |
14 Dec 2024 |
| Mateusz NowotyĆski joined the room. | 02:03:55 |
| mixis joined the room. | 10:18:15 |
| @domagojding:matrix.org left the room. | 10:29:49 |
16 Dec 2024 |
| bropal joined the room. | 09:36:10 |
17 Dec 2024 |
| @arclightmat:matrix.org left the room. | 00:26:20 |
18 Dec 2024 |
| tim126 joined the room. | 15:50:17 |
| @dmiskovic:matrix.org joined the room. | 19:36:29 |
19 Dec 2024 |
adamcstephens | What kind of sicko makes a trailing comma required in a list? | 03:25:16 |
adamcstephens | The people at grafana apparently | 03:25:22 |
adamcstephens | it's a syntax error in the alloy config language to not have a comma after the last element | 03:25:47 |
hexa | json | 03:32:34 |
hexa | * json is the most popular offender here | 03:32:48 |
adamcstephens | right but it's the opposite. json requires it to be missing | 04:04:22 |
hexa | oh, lol | 04:05:12 |