Appunti microSD per schede Acme

Salva la configurazione di Linux

make ARCH=arm savedefconfig 
cp defconfig arch/arm/configs/acme-arietta_defconfig

Salva la configurazione di Buildroot

make savedefconfig 
cp defconfig arch/arm/configs/acme-arietta_defconfig

Create a branch of your Linux Kernel sources

$ git init
$ git add .
$ git commit -m "Vanilla"
$ git branch acme
$ git checkout acme

Create a patch of your branch:

$ git checkout acme
$ git diff master > acme.patch

Apply a patch:

$ patch -p1 < filename.patch

Revert a patch

patch -p1 -R < ../patch-

Pulizia prima di pubblicare

root@arietta:~# apt-get clean
root@arietta:~# cat /dev/null > /var/log/lastlog
root@arietta:~# cat /dev/null > .bash_history

Montefusco's Tricks

git config --global http.sslVerify false

Creare una patch

$ git checkout acme
$ git diff master > acme.patch

Buildroot: Salva la configurazione di buidroot attuale in board

make savedefconfig

Buildroot: Salva la configurazione del kernel Linux in board

make linux-update-defconfig


make busybox-menuconfig

Preparazione microSD Acqua

#per far funzionare la wifi
apt-get install wireless-tools

#Firmware del modulo WiFi
apt-get install firmware-ralink

#Per collegarsi in WiFi
apt-get install wpasupplicant

#Per far funzionare killall
apt-get install psmisc

apt-get install gcc

apt-get install evtest

#Per X
apt-get install xorg

Per calibrare il touch va scaricato il package xinput-calibrator dal repository sid:

# wget
# dpkg -i xinput-calibrator_0.7.5+git20140201-1_armhf.deb
# xinput_calibrator

Non sono sicuro che serva ma andrebbe indagato

apt-get install iw
General setup  --->
    -> Kernel .config support
    <*> Kernel .config support 
    [*]   Enable access to .config through /proc/config.gz 

General setup  --->
    Timers subsystem  --->  
        [*] High Resolution Timer Support 

[*] Networking support  ---> 
    -*-   Wireless  --->        
    [*]     cfg80211 wireless extensions compatibility   


auto wlan0
iface wlan0 inet dhcp
wpa-ssid Vodafone-23812521
wpa-psk acmesystemsrobertosergio
wireless-mode managed
wireless-essid any
wpa-driver wext
wpa-ap-scan 2
wpa-proto RSN
wpa-pairwise CCMP
wpa-group CCMP
wpa-key-mgmt WPA-PSK


SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"

Preparare la microSD per Arietta G25

Aggiornare l'index dei package

# apt-get update


# apt-get install usbutils
# apt-get install iw
# apt-get install firmware-ralink
# apt-get install wpasupplicant


auto lo
iface lo inet loopback

pre-up modprobe g_ether
auto usb0
iface usb0 inet static
metric 1000

auto wlan0
iface wlan0 inet dhcp
    wireless-essid any
    pre-up wpa_supplicant -i wlan0 -c /boot/wpa_supplicant.conf -B
    post-down killall -q wpa_supplicant



    proto=WPA RSN
    pairwise=CCMP TKIP
    group=CCMP TKIP

Installare Apache2 e PHP5

# apt-get install apache2 php5

Installare git

# apt-get install git

Aggiungere un utente di default

# adduser acme
Enter new UNIX password: acmesystems

Installa la pagina web di default

# cd /var/www
/var/www # git clone git://
/var/www # rm -Rf html
/var/www # mv arietta-www html

Installare gli esempi

# cd /home/acme
/home/acme # git clone git://
/home/acme # rm -R o+w arietta4click

Installare NTP

Installare Codiad

Installare Bonjour

# apt-get install libnss-mdns

Installare c e c++

# apt-get install gcc
# apt-get install g++

Installare python

# apt-get install python
# apt-get install python-serial
# apt-get install python-smbus

Installare sudo

# apt-get install sudo

e aggiungere l'utenza acme nel file /etc/sudoers

acme   ALL=(ALL:ALL) ALL

Installare sqLite3

# apt-get install sqlite3

Installare Tornado

# apt-get install python-tornado
# apt-get install sqlite3


Change PermitRootLogin without-password

in PermitRootLogin yes

Configurazione lighttpd

server.modules = (
#       "mod_rewrite",

server.document-root        = "/var/www"
server.upload-dirs          = ("/var/cache/lighttpd/uploads")
#server.errorlog             = "/var/log/lighttpd/error.log"             = "/var/run/"
server.username             = "www-data"
server.groupname            = "www-data"
server.port                 = 80

index-file.names            = ( "index.php", "index.html", "index.lighttpd.html" )
url.access-deny             = ( "~", ".inc" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

compress.cache-dir          = "/var/cache/lighttpd/compress/"
compress.filetype           = ( "application/javascript", "text/css", "text/html", "text/plain" )

# default listening port for IPv6 falls back to the IPv4 port
include_shell "/usr/share/lighttpd/ " + server.port
include_shell "/usr/share/lighttpd/"
include_shell "/usr/share/lighttpd/"

fastcgi.server = ( 
    ".php" => ((
         "bin-path" => "/usr/bin/php-cgi",
         "socket" => "/tmp/php.socket"

proxy.server = ( 
    "/shell" => 
    ( ( 
        "host" => "",
        "port" => 4200
    ) )

Script per salvataggio e rispristino microSD

tar -cvjSf boot.tar.bz2 -C /media/$USER/boot .
sudo tar -cvjSf rootfs.tar.bz2 -C /media/$USER/rootfs .

tar -xvjpSf boot.tar.bz2 -C /media/$USER/boot 
sudo tar -xvjpSf rootfs.tar.bz2 -C /media/$USER/rootfs