Type | Storage size | Value range |
---|---|---|
char | 1 byte | -128 to 127 or 0 to 255 |
unsigned char | 1 byte | 0 to 255 |
signed char | 1 byte | -128 to 127 |
int | 2 or 4 bytes | -32,768 to 32,767 or -2,147,483,648 to 2,147,483,647 |
unsigned int | 2 or 4 bytes | 0 to 65,535 or 0 to 4,294,967,295 |
short | 2 bytes | -32,768 to 32,767 |
This file contains 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
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) | |
}) | |
} |
This file contains 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
export type SelectorType = "option1" | "option2"; | |
export type SelectType<S extends SelectorType> = S extends "option1" | |
? Type1 | |
: S extends "option2" | |
? Type2 | |
: never; |
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
This file contains 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
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 |
This file contains 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
# 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 |
OlderNewer