Skip to content

Build images using yocto for the orange-pi zero and pc SBCs

Notifications You must be signed in to change notification settings

demontanaro/orange-pi-distro

 
 

Repository files navigation

orange-pi-distro

Build images using yocto for:

Orange Pi Zero

This will build a minimal console image

Runs the 4.13-rc6 mainline kernel

That work on XRADIO X819 WiFi driver for mainline kernel is also in the image as a kernel module and loaded at boot time (firmware binaries for this driver come from here)

The SPI NOR flash memory support is enbled in the kernel and bootloader configuration, so it could be used to run u-boot and boot from USB for example

Orange Pi Pc

Runs a 4.14 kernel, with HDMI support and Mali driver

The X11 server can be run on the opipc-minimal image

Build the images

Clone the external submodules :

git submodule update --init

Source the file source-me:

. source-me <machine>

With = "orange-pi-zero" or "orange-pi-pc"

And build the image:

bitbake <image>

With = "opiz-minimal" or "opipc-minimal"

Flash on a sdcard

The rootfs archive, bootloader and kernel images as well as an sdcard image with all needed partitions must have been created in:

build/tmp-glibc/deploy/images/<machine>/

Use dd to flash it on the sdcard (unmount all partitions before):

dd if=build/tmp-glibc/deploy/images/<machine>/<image>-<machine>.sunxi-sdimg of=/dev/??? bs=1M

To create a sdcard with root partition extended to all the device, use this script:

sudo ./flash-sdcard.sh -d /dev/???

Boot

The ethernet network interface is configured as a dhcp client. A sshd is running. Use root for login, no password.

For Orange Pi Zero, The wireless network interface uses wpa_supplicant for its configuration, edit /etc/wpa_supplicant/wpa_supplicant-wlan0.conf to setup the ssid and psk. Or run wpa_passphrase <SSID> <PASSPHRASE> >> /etc/wpa_supplicant/wpa_supplicant-wlan0.conf

Flash u-boot on the SPI NOR flash (Orange Pi Zero)

If your board has been produced with integrated SPI NOR flash memory, you should see its device file:

/dev/mtd0

The distribution provides mtd-utils. Copy the u-boot binary from the image folder on the device:

scp build/tmp-glibc/deploy/images/orange-pi-zero/u-boot-sunxi-with-spl.bin root@<ip>:

Then, on the device:

flash_erase /dev/mtd0 0 128

flashcp u-boot-sunxi-with-spl.bin /dev/mtd0

About

Build images using yocto for the orange-pi zero and pc SBCs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • BitBake 48.9%
  • Shell 30.2%
  • Assembly 12.2%
  • Batchfile 4.3%
  • BlitzBasic 2.7%
  • C++ 1.7%