View cross-compile-qt5.8-rpi3.sh
./configure -release -opengl es2 -device linux-rpi3-vc4-g++ -device-option CROSS_COMPILE=/opt/rpi3/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot /opt/rpi3/gentoo-sysroot/ -extprefix /opt/Qt/5.8/rpi3 -v -nomake examples -nomake tests -no-use-gold-linker -opensource -confirm-license -skip qtscript
gmake
sudo gmake install
View wget-1.19.ebuild
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="4"
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"
View boost-android-build.sh
#!/bin/bash
version=1.65.1
echo "Building boost $version..."
set -eu
toolchain=$PWD/toolchain
if [ ! -d "$toolchain" ]; then
echo "Building toolchain..."
View cross-compile-rpi3-kernel.sh
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
View gentoo-arm-chroot-cross-build.md

Install qemu in host

Add this to make.conf:

QEMU_SOFTMMU_TARGETS="arm"
QEMU_USER_TARGETS="arm"

Add this to package.use:

View install-peak-drivers-linux.md

Attenzione!

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

Il driver giusto è peak_usb:

modprobe peak_usb
View android-sdcard-cid.java
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) {
View core-dump.md

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 <alessandro.pezzato@gmail.com>
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