setup raspberry pi build environment [debian 64bit]

if you are searching a simple raspberrypi emulator better try:
https://fredfire1.wordpress.com/2015/11/23/emulate-raspbian-in-qemu-debian/

based on:
https://lionfacelemonface.wordpress.com/2015/04/18/raspberry-pi-build-environment-in-no-time-at-all/

THE RESULT OF MY INSTRUCTION WAS NOT THAT GOOD FOR ME!
SO MY INSTRUCTION IS NOT READY FOR PRODUCTION (ALPHA)

install software:
sudo apt-get install kpartx proot qemu

download latest raspbian lite image:
cd ~
wget http://downloads.raspberrypi.org/raspbian_lite_latest -O raspbian_lite_latest.zip
unzip raspbian_lite_latest.zip

start the environment:
sudo kpartx -a -v 2016-05-10-raspbian-jessie-lite.img
mkdir -p raspbian-boot raspbian-root
echo "waiting 5 seconds" && sleep 5
sudo mount /dev/mapper/loop0p1 raspbian-boot
sudo mount /dev/mapper/loop0p2 raspbian-root
sudo proot -q qemu-arm -S raspbian-root -b raspbian-boot:/boot /bin/bash

use the environment:
free -m
apt update && apt install apcalc
calc 1+1

(installing nginx like explained on “based on” worked, but i was not able to run it. something must have failed.)

exit the environment:
exit
sudo umount raspbian-boot raspbian-root
sudo kpartx -d -v 2016-05-10-raspbian-jessie-lite.img
ls /dev/mapper
#to check if the device mapping is deleted
or
sudo reboot

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s