Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@r7vme
r7vme / 01-README.md
Last active July 24, 2023 23:54
Flash Jetson Xavier AGX from docker (sdkmanager)

TESTED for Jetpack 4.5.1

Official docker image had few utilities missed, which caused flashing to fail with Jetson AGX Xavier. To fix that I added them to docker image.

  1. Get NVIDIA official docker image.

  2. Rebuild docker image

mkdir sdkmanager; cd sdkmanager
# create dockefile from below gist
TEST_CASE("if more than one core then return true", "[is_multicore_system]")
{
// always reset globally-defined fff objects
// This is a limitation of pure-C fff, that it uses global objects.
RESET_FAKE(__wrap_get_nprocs_conf);
// if get_nprocs_conf will return 2
__wrap_get_nprocs_conf_fake.return_val = 2;
// then return true
FAKE_VALUE_FUNC(int, __wrap_get_nprocs_conf);
#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do
// this in one cpp file
#include <catch2/catch.hpp>
#include <fff/fff.h>
DEFINE_FFF_GLOBALS;
#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do
// this in one cpp file
#include <catch2/catch.hpp>
#include <fff/fff.h>
DEFINE_FFF_GLOBALS;
extern "C" {
// include our library header
#include "lib.h"
#include <sys/sysinfo.h>
#include <stdio.h>
#include <stdbool.h>
bool is_multicore_system(void) {
return (get_nprocs_conf() > 1) ? true : false;
}
// wrapper emulates single processor system
int __wrap_get_nprocs_conf() { return 1; }
bool is_multicore_system(void) {
return (get_nprocs_conf() > 1) ? true : false;
}
info: reading kernel config from /proc/config.gz ...
Generally Necessary:
- cgroup hierarchy: properly mounted [/sys/fs/cgroup]
- CONFIG_NAMESPACES: enabled
- CONFIG_NET_NS: enabled
- CONFIG_PID_NS: enabled
- CONFIG_IPC_NS: enabled
- CONFIG_UTS_NS: enabled
- CONFIG_CGROUPS: enabled
@r7vme
r7vme / gist:4f738d03f64f2657d6f7b397df6dec08
Created October 7, 2019 22:50
ros2 dashing Dockerfile
FROM ubuntu:18.04
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
ENV ROS_DISTRO dashing
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -q -y \
curl \
gnupg2 \
lsb-release \
&& rm -rf /var/lib/apt/lists/*
Device 0: "NVIDIA Tegra X1"
CUDA Driver Version / Runtime Version 10.0 / 10.0
CUDA Capability Major/Minor version number: 5.3
Total amount of global memory: 3965 MBytes (4157145088 bytes)
( 1) Multiprocessors, (128) CUDA Cores/MP: 128 CUDA Cores
GPU Max Clock rate: 922 MHz (0.92 GHz)
Memory Clock rate: 13 Mhz
Memory Bus Width: 64-bit
L2 Cache Size: 262144 bytes
Maximum Texture Dimension Size (x,y,z) 1D=(65536), 2D=(65536, 65536), 3D=(4096, 4096, 4096)