Skip to content

Instantly share code, notes, and snippets.

View yashi's full-sized avatar

Yasushi SHOJI yashi

View GitHub Profile
some inconsistency (DST file naming scheme)
- for KV260: `boards/amd/kv260_r5.dts` -> `zynqmp_rpu.dtsi` -> `zynqmp.dtsi` -> `armv7-r.dtis`
- for Versal2: `boards/amd/versal2_rpu.dts` -> `versal2_r52.dtsi` -> `versal2.dtsi` & `armv8-r.dtsi`
❯ cat s390x-linux-gnu.cmake
set(CMAKE_C_COMPILER s390x-linux-gnu-gcc)
set(CMAKE_C_COMPILER_ID GNU)
set(CMAKE_CXX_COMPILER s390x-linux-gnu-g++)
set(CMAKE_CXX_COMPILER_ID GNU)
set(ENV{PKG_CONFIG_LIBDIR} /usr/lib/s390x-linux-gnu/pkgconfig)
!: Bump version to v2.1
!: CHANGELOG: Add v2.1 section
arch: freertos: Add missing macro includes
arch: freertos: Add newline at EOF to non-source code
arch: posix: Don't check against errno after calling pthread functions
arch: posix: csp_queue: Remove `return`
arch: posix: pthread_queue: Fix pointer arithmetic on void pointer
arch: zephyr: add atomic operation for raspberrypi pico
build-system: Enable -Wpointer-arith on the build system
can: Separate input queues in support for...
@yashi
yashi / starship.toml
Last active April 11, 2025 08:01
Starship prompt configuration file
format = """
[╭─ ](cyan)\
$username\
$hostname\
$container\
$git_branch\
$git_status\
$git_commit\
$fill\
$cmd_duration\
@yashi
yashi / 50-aptcacherng
Created March 18, 2025 11:10
Disable Apt Cacher while on the go
#!/bin/sh
MY_CACHER=
IFACE=$1
STATUS=$2
THE_LINE="Acquire::http::Proxy \"http://$MY_CACHER:3142\";"
THE_FILE="/etc/apt/apt.conf.d/02proxy-ng"
if [ x"$STATUS" = x"up" ]; then
@yashi
yashi / settings.sh
Last active January 22, 2025 09:11
PetaLinux Tools `settings.sh` for Zsh
#
# Setup script for PetaLinux development environment.
#
# Copyright (c) 1995-2022 Xilinx, Inc. All rights reserved.
# Copyright (c) 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
#
SETTINGS_FILE='settings.sh'
# The right location will be replaced by the installer
XIL_SCRIPT_LOC="./"
@yashi
yashi / gist:31c0fbc9d56b44712a0ce5503715ad92
Created September 20, 2024 07:52
OpenCL Hello World with ROCm specific options
#include <stdio.h>
#include <stdlib.h>
#include <CL/cl.h>
#define VECTOR_SIZE 1024
// OpenCL kernel which is run for every work item created.
const char *saxpy_kernel =
"__kernel \n"
"void saxpy_kernel(float alpha, \n"
/*
* You need pty setup: socat -d -d pty,raw,echo=0,link=/tmp/pty1 pty,raw,echo=0,link=/tmp/pty2
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <pthread.h>
/*
* You need pty setup: socat -d -d pty,raw,echo=0,link=/tmp/pty1 pty,raw,echo=0,link=/tmp/pty2
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <pthread.h>
@yashi
yashi / CMakeLists.txt
Last active February 21, 2024 02:32
CMakeLists.txt for Python C Extension module
cmake_minimum_required(VERSION 3.20)
project(python_module)
find_package(Python3 COMPONENTS Development.Module)
#Python_add_library(hello MODULE hello.c)
add_library(hello SHARED hello.c)
target_include_directories(hello PRIVATE ${Python_INCLUDE_DIRS})
target_link_libraries(hello Python3::Module)
set_target_properties(hello PROPERTIES PREFIX "")