This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x512f0011] | |
[ 0.000000] Linux version 6.17.0-rc5-7-qcom-laptops (linux-qcom-laptops@archlinux) (aarch64-linux-gnu-gcc (GCC) 15.1.0, GNU ld (GNU Binutils) 2.44) #1 SMP PREEMPT Sun, 21 Sep 2025 11:22:04 +0000 | |
[ 0.000000] KASLR enabled | |
[ 0.000000] Machine model: ASUS Vivobook S 15 | |
[ 0.000000] efi: EFI v2.9 by INSYDE Corp. | |
[ 0.000000] efi: SMBIOS=0xd4462000 SMBIOS 3.0=0xd445f000 TPMFinalLog=0xd46e0000 ACPI 2.0=0xd47d3018 MEMATTR=0xd0a00018 ESRT=0xceb47d18 RNG=0xd47d3998 TPMEventLog=0xd4778018 INITRD=0xc484bd18 MEMRESERVE=0xc484b498 | |
[ 0.000000] random: crng init done | |
[ 0.000000] esrt: Reserving ESRT space from 0x00000000ceb47d18 to 0x00000000ceb47dc8. | |
[ 0.000000] Reserved memory: created CMA memory pool at 0x0000000ff8000000, size 128 MiB | |
[ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: GPL-2.0-only | |
/* | |
* HID driver for ASUS Vivobook S15 S5507 Keyboard | |
* | |
* Copyright (c) 2024 Elliot Huang (keep.it.sns@gmail.com) | |
* | |
* This driver handles special function keys for keyboard backlight control, | |
* Fn-Lock, and re-maps certain vendor-specific keys to standard consumer | |
* control usages (e.g., display brightness). It also handles suspend and | |
* resume by turning off the backlight on suspend and restoring the full |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//! This program splits a kernel image file that has Device Tree Blobs (DTBs) appended to it. | |
//! It extracts the main kernel part and each DTB into separate files. | |
//! The kernel is saved as "kernel". DTBs are saved as "dtbdump_1.dtb", "dtbdump_2.dtb", etc. | |
const std = @import("std"); | |
const fs = std.fs; | |
const mem = std.mem; | |
const heap = std.heap; | |
const fmt = std.fmt; | |
const process = std.process; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const max_output_bytes = 4096; | |
pub fn main() !void { | |
var arena_state = std.heap.ArenaAllocator.init(std.heap.smp_allocator); | |
defer arena_state.deinit(); | |
const arena = arena_state.allocator(); | |
var file = try std.fs.openFileAbsolute("/dev/smd7", .{ .mode = .read_write }); | |
defer file.close(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
const mem = std.mem; | |
const linux = std.os.linux; | |
const posix = std.posix; | |
const assert = std.debug.assert; | |
const testing = std.testing; | |
const AttrDataType = enum(u14) { | |
unspec, | |
u8, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Allocation-free event loop inspired by uloop: fixed arrays, no heap allocations. | |
const std = @import("std"); | |
const mem = std.mem; | |
const posix = std.posix; | |
const linux = std.os.linux; | |
const testing = std.testing; | |
const log = std.log.scoped(.event_loop); | |
pub const MAX_EVENTS = 64; | |
pub const MAX_HANDLERS = 128; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
pub fn main() !void { | |
// Use the debug allocator. | |
var gpa_state: std.heap.DebugAllocator(.{}) = .init; | |
defer _ = gpa_state.deinit(); | |
const gpa = gpa_state.allocator(); | |
// Expect two arguments: <elf_file> and <prefix> | |
const args = try std.process.argsAlloc(gpa); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const file_version = &[_]u8{ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00 }; | |
pub fn main() !void { | |
var gpa_state: std.heap.GeneralPurposeAllocator(.{}) = .init; | |
defer _ = gpa_state.deinit(); | |
const gpa = gpa_state.allocator(); | |
var raw = std.ArrayList(u8).init(gpa); | |
defer raw.deinit(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
const testing = std.testing; | |
const assert = std.debug.assert; | |
const IMEI = struct { | |
raw: [26]u8, | |
pub fn parse(imei_str: []const u8) !IMEI { | |
var imei: IMEI = undefined; | |
assert(imei_str.len == 15); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
const mem = std.mem; | |
const hdlc = @This(); | |
const escape_char = '\x7d'; | |
const trailer_char = '\x7e'; | |
const Crc16Ccitt = std.hash.crc.Crc(u16, .{ | |
.polynomial = 0x11021, | |
.initial = 0x0000, |
NewerOlder