View wget-1.19.ebuild
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
PYTHON_COMPAT=( python{3_3,3_4} )
inherit flag-o-matic python-any-r1 toolchain-funcs eutils
DESCRIPTION="Network utility to retrieve files from the WWW"
echo "Building boost $version..."
set -eu
if [ ! -d "$toolchain" ]; then
echo "Building toolchain..."
make ARCH=arm CROSS_COMPILE=armv7a-hardfloat-linux-gnueabi- bcm2709_defconfig
make ARCH=arm CROSS_COMPILE=armv7a-hardfloat-linux-gnueabi- menuconfig
make ARCH=arm CROSS_COMPILE=armv7a-hardfloat-linux-gnueabi- -j9 zImage modules dtbs
cp arch/arm/boot/zImage /mnt/raspberrypiroot/boot/ ; cp arch/arm/boot/dts/*.dtb /mnt/raspberrypiroot/boot/ ; cp arch/arm/boot/dts/overlays/*.dtb* /mnt/raspberrypiroot/boot/overlays/ ;
sudo make ARCH=arm CROSS_COMPILE=armv7a-hardfloat-linux-gnueabi- INSTALL_MOD_PATH=/mnt/raspberrypiroot modules_install

Install qemu in host

Add this to make.conf:


Add this to package.use:



Non installare i driver scaricabili dal sito peak, ma usare quelli nel kernel vanilla.

Il driver giusto è peak_usb:

modprobe peak_usb
try {
BufferedReader input = new BufferedReader(new FileReader("/sys/block/mmcblk1/device/cid"));
String sd_cid = input.readLine();
Log.i(TAG, "cid:");
Log.i(TAG, sd_cid);
} catch (Exception e) {
Log.e(TAG, "Can not read SD-card cid");
View volatile-1.cpp
* Example 1: exits on SIGINT
#include <iostream>
#include <signal.h>
#include <unistd.h>
bool continueRunning = true;
void sighandler(int signum) {

Sistema per salvare lo stato dell'applicazione al momento del crash, per poter debuggare anche dopo il crash.

Possiamo anche usare gdb da x86 per debuggare un'applicazione che girava su arm.

Dal sistema in cui gira applicazione:

Per mettere al massimo il limite della dimensione disponibile per i core dump:

ulimit -c unlimited
View 0001-fix-missing-boost-array.patch
From 10328d6d369a2218832315162741bd04d35fe85d Mon Sep 17 00:00:00 2001
From: Alessandro Pezzato <>
Date: Wed, 31 May 2017 09:06:03 +0200
Subject: [PATCH] fix missing boost::array
include/crow/websocket.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/crow/websocket.h b/include/crow/websocket.h
View beep.cpp
#include <AL/alut.h> // OpenAl
#include <cmath>
#include <iostream>
#include <thread>
using namespace std;
void init_al() {
const char* defname = alcGetString(NULL, ALC_DEFAULT_DEVICE_SPECIFIER);
ALCdevice* dev = alcOpenDevice(defname);