doc/build_arm_image.md
2016-11-04 11:25:42 +01:00

4.1 KiB
Raw Blame History

Build ARM image

This tutorial's goal is to build a plug-and-play image for YunoHost for ARM boards.

It could be used on many ARM board (Rasberry Pi, Olimex, Cubieboard…).

This tutorial is based on Yunocubian.

You could find ARM image builder from Debian Jessie.

All these steps can be executed with variations of this script.

Download minimal Debian Jessie

Download a Debian Jessie image compatible with the hardware without desktop environnement installed:

Copy image and install YunoHost

Copy image to the SD card

Plug & boot

  • Connect via SSH: pi@exemple.tld/ip_address with the password raspberry (or any variations for other distros than Raspbian).
  • Set a root password :
sudo passwd

and login as root:

su
  • You should be root for next operations.

Manually install YunoHost on a Raspberry Pi

If you encounter problems during installation check out this installation guide for the Raspberry Pi, based on suggestion from this thread.

Do not proceed to **post-installation**.

Clean image

  • Update image:
apt-get update && apt-get dist-upgrade && apt-get autoremove
  • Change hostname:
sed -i "s/$(hostname)/YunoHost/g" /etc/hosts
sed -i "s/$(hostname)/YunoHost/g" /etc/hostname
  • Allow SSH connection as root:
sed -i '0,/without-password/s/without-password/yes/g' /etc/ssh/sshd_config
  • Delete the pi user (this step must be perform directly as root, not logged in as pi and then login as root):
deluser remove-all-files pi
  • Set the first boot script:
wget https://raw.githubusercontent.com/likeitneverwentaway/rpi_buildbot/master/yunohost-firstboot -P /etc/init.d/

# Give executable right
chmod a+x /etc/init.d/yunohost-firstboot

# Make it execute at next boot
insserv /etc/init.d/yunohost-firstboot
  • Set the boot promtp script:
wget https://raw.githubusercontent.com/likeitneverwentaway/rpi_buildbot/master/boot_prompt.service -P /etc/systemd/system/
wget https://raw.githubusercontent.com/likeitneverwentaway/rpi_buildbot/master/boot_prompt.sh -P /usr/bin/
chmod a+x /usr/bin/boot_prompt.sh
systemctl enable boot_prompt.service
  • Tell the boot_prompt script that the next boot is the first boot:
touch /etc/yunohost/firstboot
  • Turn off your board:
shutdown

Don't forget to reset wpa-supplicant.conf if you changed it. You could also delete the command history with

history -c

or by editing /root/.bash_history.

Copy image

Plug your SD card on your desktop computer and copy it:

Be carefull to not erase your data.
sudo dd bs=1M if=/dev/sdd of=~/yunohost-jessie-board-year-month-day.img

You can also use the Read function of Win32 Disk Imager.

Verify image

Copy image to the SD card

Plug & boot

Post-install

If everything is alright, you could publish your image.

Publish image

  • Reduce size by zipping the image:
zip yunohost-jessie-board-year-month-day.img.zip yunohost-jessie-board-year-month-day.img
  • Publish: you could post your image on the forum.