export CC="/usr/bin/arm-none-eabi-gcc"
export CXX="/usr/bin/arm-none-eabi-g++"
export AS="/usr/bin/arm-none-eabi-as"
export LD="/usr/bin/arm-none-eabi-ld"
export AR="/usr/bin/arm-none-eabi-ar"
export NM="/usr/bin/arm-none-eabi-nm"
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
#!/usr/bin/env bash | |
declare -A COLOR | |
COLOR['END']='\033[0m' | |
COLOR['RED']='\033[0;31m' | |
COLOR['GREEN']='\033[0;32m' | |
COLOR['YELLOW']='\033[0;33m' | |
COLOR['BLUE']='\033[0;34m' | |
COLOR['WHITE']='\033[0;37m' |
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
#!/usr/bin/env bash | |
set -e | |
gpiodetect > /dev/null 2>&1 | |
if [ $? -ne 0 ]; then | |
echo "Debian package gpiod not installed..." | |
apt-get update | |
apt-get install gpiod | |
fi |
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
#!/usr/bin/env bash | |
declare -A COLOR | |
COLOR['END']='\033[0m' | |
COLOR['RED']='\033[0;31m' | |
if [ "$#" -ne 1 ]; then | |
echo -e "${COLOR['RED']}[ERROR] You must provide one and only one argument:${COLOR['END']}" >&2 | |
echo -e "${COLOR['RED']}1. The path to the job.yaml file\n${COLOR['END']}" >&2 | |
exit 1 |
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
#!/bin/bash | |
set -e | |
help() { | |
echo -e "${COLOR['RED']}Usage: sudo $(basename "$0") <go version> <arch> ${COLOR['END']}" | |
echo -e "${COLOR['RED']}Options: ${COLOR['END']}" | |
echo -e "${COLOR['RED']} <go version>, The version of GO in format: MAJOR.MINOR.PATCH.${COLOR['END']}" | |
echo -e "${COLOR['RED']} example: sudo $(basename "$0") 1.20.6 ${COLOR['END']}" | |
echo -e "${COLOR['RED']} <arch>, The CPU arch (default amd64) ${COLOR['END']}" |
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
#!/bin/bash | |
## This is a simple script to update | |
## all packages of a server and | |
## install docker all in one shot. | |
## Enjoy! :D | |
sudo apt-get update && sudo apt-get upgrade -y | |
for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done |
BOOT MODE: NAND
ddr init
U-Boot 2013.04 (Oct 11 2016 - 11:22:42)
CPU: Cortex-A9 400 MHz
AHB: 100 MHz
APB: 50 MHz
You need to install ARMv5 gcc cross compiler: apt-get install gcc-arm-linux-gnueabi
You have to define a directory (via --prefix) where all of your binaries will be installed (copied). In the guide I use the following: /home/user/vpn_compile
- Download the source:
wget https://www.openssl.org/source/openssl-1.0.2j.tar.gz
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
cmake_minimum_required(VERSION 3.22) | |
SET(CMAKE_C_STANDARD 11) | |
SET(CMAKE_CXX_STANDARD 20) | |
project(template) | |
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-unused-variable -Werror -Wfatal-errors ") | |
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-unused-variable -Werror -Wfatal-errors") |
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
# CMake toolchain file for building ARM software on OI environment | |
# Processor | |
SET(CMAKE_SYSTEM_PROCESSOR arm) | |
# this one is important | |
SET(CMAKE_SYSTEM_NAME Linux) | |
#this one not so much | |
SET(CMAKE_SYSTEM_VERSION 1) | |
# (OPTIONAL) specify some CPU flags |
NewerOlder