Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am agrajag9 on github.
  • I am agrajag9 (https://keybase.io/agrajag9) on keybase.
  • I have a public key ASDR4X0JPYC8NSxik77FqRfIJoGTwH-zHdQ3RIGzMCYnwQo

To claim this, I am signing this object:

#################
### Variables ###
#################
set $mod Mod1
set $term termite
font pango: Source Code Pro Medium 12
floating_modifier $mod
bindsym $mod+Return exec $term
/*
RSD PTR: OEM=Sony, ACPI_Rev=2.0x (2)
XSDT=0x00000000d2f1ce18, length=36, cksum=51
*/
/*
XSDT: Length=92, Revision=1, Checksum=153,
OEMID=Sony, OEM Table ID=VAIO, OEM Revision=0x20101006,
Creator ID=MSFT, Creator Revision=0x10013
Entries={ 0x00000000d2f15d98, 0x00000000d2f1bf18, 0x00000000d2f2fd18, 0x00000000d2f2fc98, 0x00000000d2f28a18, 0x00000000d2f16018, 0x00000000d2f15c18 }
*/
@agrajag9
agrajag9 / get_bst.c
Created September 14, 2019 20:12
Get ACPI battery BST data in FreeBSD
#include <err.h>
#include <fcntl.h>
#include <stdio.h>
#include <sys/ioctl.h>
#include <sysexits.h>
#include <unistd.h>
#include <dev/acpica/acpiio.h>
#include <contrib/dev/acpica/include/acpi.h>
@agrajag9
agrajag9 / acpiconf.c
Last active September 14, 2019 22:41
Patch acpiconf to attempt to use BST for battery status info
/*-
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD
*
* Copyright (c) 1999 Mitsuru IWASAKI <iwasaki@FreeBSD.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
@agrajag9
agrajag9 / console.out
Created May 18, 2020 14:23
lx2160acex7 UEFI boot to FreeBSD aarch64 install memstick img
NOTICE: BL2: v1.5(release):v1.5-270-gfc2fcdcc
NOTICE: BL2: Built : 20:31:57, May 16 2020
NOTICE: UDIMM HMA82GS6AFR8N-UH
NOTICE: DDR4 UDIMM with 2-rank 64-bit bus (x8)
NOTICE: 16 GB DDR4, 64-bit, CL=17, ECC off, CS0+CS1
NOTICE: BL2: Booting BL31
NOTICE: BL31: v1.5(release):v1.5-270-gfc2fcdcc
NOTICE: BL31: Built : 20:31:57, May 16 2020
NOTICE: Welcome to LX2160 BL31 Phase
@agrajag9
agrajag9 / console1.out
Last active May 18, 2020 15:39
lx2160acex7 UEFI boot to FreeBSD-12.1-RELEASE-arm64-aarch64-memstick.img on SD via USB card reader
>> FreeBSD EFI boot block
Loader path: /boot/loader.efi
Initializing modules: ZFS UFS
Load Path: \efi\boot\BOOTaa64.efi
Load Device: VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,000011030000000000)/U
SB(0x1,0x0)/USB(0x1,0x0)/HD(1,GPT,1086B3DF-FC60-11E9-90A5-0CC47AD8B808,0x3,0x640
)
BootCurrent: 0003
BootOrder: 0000 0001 0002 0003[*] 0004
OK lsdev
disk devices:
disk0: 62333952 X 512 blocks (removable)
disk1: 122142720 X 512 blocks (removable)
disk2: 31116288 X 512 blocks (removable)
disk2p1: EFI
disk2p2: FreeBSD
net devices:
OK configuration
NumberOfTableEntries=12
@agrajag9
agrajag9 / console.out
Last active May 18, 2020 22:23
Booting lx2160acex7 to aarch64 memstick installer img with kern.cfg.order=acpi
Type '?' for a list of commands, 'help' for more detailed help.
OK set kern.cfg.order=acpi
OK show
autoboot_delay=NO
bootenv_autolist=YES
bootfile=kernel
console=efi
currdev=disk2p2:
efi-version=2.70
efi_com_speed=115200
@agrajag9
agrajag9 / dmesg.boot
Created May 19, 2020 03:00
qSolidRun lx2160acex7, branch LSDK-19.09-sr-uefi, edk2-platforms on commit d33742f303bdf335c3bb0203d7c273f10af6923f, set kern.cfg.order=acpi
---<<BOOT>>---
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2020 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 13.0-CURRENT #16 6c77e060fdf8-c268706(master)-dirty: Mon May 18 21:59:18 MSK 2020
root@riverwood.lan:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC-NODEBUG arm64
clang version 10.0.0