Skip to content

Instantly share code, notes, and snippets.

@jetm
jetm / find_esp2.c
Created June 10, 2024 23:34
Print ESP path(s)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <blkid/blkid.h>
#include <mntent.h>
int main() {
blkid_cache cache;
blkid_dev_iterate iter;
blkid_dev dev;
@jetm
jetm / rock-pi-4-rk3399-boot-output.log
Last active December 12, 2023 19:27
RockPi 4 booting output in OpenWrt with upstream Linux kernel 6.1
EFI stub: Booting Linux Kernel...
EFI stub: EFI_RNG_PROTOCOL unavailable
EFI stub: Using DTB from configuration table
EFI stub: Exiting boot services...
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 6.1.65 (tiamarin@jetm-rog-x670e-gene) (aarch64-openwrt-linux-musl-gcc (OpenWrt GCC 12.3.0 r24628-
a0effdcb01) 12.3.0, GNU ld (GNU Binutils) 2.40.0) #0 SMP PREEMPT Tue Dec 12 01:39:32 2023
[ 0.000000] Machine model: Radxa ROCK Pi 4A
[ 0.000000] efi: EFI v2.100 by Das U-Boot
[ 0.000000] efi: ESRT=0xf0ed0040 RTPROP=0xf0ed2040 SMBIOS=0xf0ece000 MEMRESERVE=0xf0e94040
@jetm
jetm / gist:1074153
Created July 10, 2011 01:52
Generate random integer number
random=$(dd if=/dev/urandom count=1 2> /dev/null | cksum | cut -f1 -d" " )