Skip to content

Instantly share code, notes, and snippets.

View TobidieTopfpflanze's full-sized avatar
😅
Hey, Tobi here!

Tobi TobidieTopfpflanze

😅
Hey, Tobi here!
  • @home
View GitHub Profile
@TobidieTopfpflanze
TobidieTopfpflanze / GUI.md
Created April 21, 2022 13:13
Enable/Disable GUI Jetson

Enable/Disable GUI Jetson

Disable

sudo systemctl set-default multi-user.target

Enable

sudo systemctl set-default graphical.target

@TobidieTopfpflanze
TobidieTopfpflanze / IMX219_stream.md
Created February 25, 2022 10:13
IMX219 Gstreamer pipeline jetson

IMX219 stream

The parameter sensor-id= describes the camera target. This id can be found by using ls /dev/. If the camera correctly plugged in then there should be a devices called /dev/videoX, where X is the camera id.

test@test-desktop:~$ gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12, framerate=(fraction)30/1' ! nvvidconv ! queue ! xvimagesink
@TobidieTopfpflanze
TobidieTopfpflanze / soc_temp.md
Created February 25, 2022 08:54
Watch SOC temp Jetson
@TobidieTopfpflanze
TobidieTopfpflanze / decompile_dtb.sh
Last active November 7, 2024 06:08
Decompile DTB
# Decompile
dtc -I dtb -O dts -o devicetree.dts /boot/dtb/<your_devicetree_file_name>.dtb
# Compile
dtc -I dts -O dtb devicetree.dts -o <your_devicetree_file_name>.dtb
# Merge with DTBO
fdtoverlay -i modified-base.dtb -o modified-full.dtb /boot/tegra194-p3668-all-p3509-0000-user-custom.dtbo
# DTS from fs

Available tach settings

cat /sys/class/hwmon/hwmon2/pwm_rpm_table

Enable tach

echo 1 &gt; /sys/devices/pwm-fan/tach_enable
@TobidieTopfpflanze
TobidieTopfpflanze / mkfilesystem.sh
Created January 14, 2022 11:25
Create and copy bootable filesystem L4T (template)
sudo parted /dev/sdb mklabel gpt
sudo parted /dev/sdb mkpart APP 0GB 32GB
sudo mkfs.ext4 /dev/sdb1
Put the Jetson device into recovery mode (middle button ~4 seconds… then combo left button ~4 seconds… then release both)
Connect USB-C from host to Jetson (port next to power light)
sudo BOOTDEV=sda1 ./flash.sh --no-flash jetson-agx-xavier-devkit sda1
sudo mount /dev/sdb1 /mnt
sudo mkdir tmp_system
sudo mount bootloader/system.img.raw ./tmp_system
sudo rsync -axHAWX --numeric-ids --info=progress2 --exclude=/proc ./tmp_system/ /mnt
@TobidieTopfpflanze
TobidieTopfpflanze / i2c.md
Last active February 28, 2024 12:13
Basic camera streaming and i2c bash usage

List i2c devices on a specific bus:

Syntax: i2cdetect [options] <busNr>

test@test-desktop:~$ i2cdetect -y -r 8
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
@TobidieTopfpflanze
TobidieTopfpflanze / drive.md
Created December 14, 2021 10:42
USB investigation (ubuntu 18.04)

Important commands:

# Get related infos for flashing (sector size, start and end addresses)
sudo fdisk -l /dev/sdc

# Alternative for better regex actions:
sudo sfdisk -d /dev/sdc

# Copy image to storage
@TobidieTopfpflanze
TobidieTopfpflanze / Type-on-literal.ts
Created September 24, 2021 07:37
TypeScript: depend type on given literal
export type SelectorType = "option1" | "option2";
export type SelectType<S extends SelectorType> = S extends "option1"
? Type1
: S extends "option2"
? Type2
: never;
export function generateUUID(): string {
let dt = Date.now()
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
const r = Math.trunc((dt + Math.random() * 16) % 16)
dt = Math.floor(dt / 16)
// eslint-disable-next-line no-bitwise
return (c === 'x' ? r : (r & 0x3) | 0x8).toString(16)
})
}