BRANCH=master # or 'rocko'
xargs -n 1 git clone -b $BRANCH <<'__EOF__'
git://git.yoctoproject.org/poky
git://git.openembedded.org/meta-openembedded
git://github.com/agherzan/meta-raspberrypi
git://github.com/webplatformforembedded/meta-wpe
__EOF__
In rocko
, fix building of mesa-gl
in meta-raspberrypi
for ARMv6 (source):
cat <<'__EOF__' >> meta-raspberrypi/recipes-graphics/mesa/mesa-gl_%.bbappend
CFLAGS_append_armv6 = " -DMISSING_64BIT_ATOMICS"
__EOF__
Build dependencies (install user or system wide once):
- chrpath: https://chrpath.alioth.debian.org/
- diffstats: http://invisible-island.net/diffstat/
Create build directory and add layers:
source poky/oe-init-build-env
xargs -n 1 bitbake-layers add-layer <<'__EOF__'
../meta-openembedded/meta-oe
../meta-openembedded/meta-python
../meta-openembedded/meta-multimedia
../meta-openembedded/meta-networking
../meta-raspberrypi
../meta-wpe
__EOF__
Configure the build:
cat <<'__EOF__' >> conf/local.conf
# configuration
MACHINE = "raspberrypi0-wifi"
SERIAL_CONSOLE = ""
DISABLE_RPI_BOOT_LOGO = "1"
DISABLE_OVERSCAN = "1"
DISABLE_SPLASH = "1"
BOOT_DELAY = "0"
GPU_MEM_256 = "128"
GPU_MEM_512 = "196"
GPU_MEM_1024 = "396"
DISTRO_FEATURES_remove = "x11"
DISTRO_FEATURES_append = " opengl"
PACKAGE_CLASSES = "package_ipk"
IMAGE_INSTALL_append = " chrony"
IMAGE_INSTALL_append = " linux-firmware-bcm43430 wpa-supplicant"
IMAGE_FSTYPES = "tar.bz2 ext4 rpi-sdimg"
SDIMG_ROOTFS_TYPE = "ext4"
__EOF__
For basic Bluetooth support:
cat <<'__EOF__' >> conf/local.conf
IMAGE_INSTALL_append = " bluez5 udev-rules-rpi"
__EOF__
Build the image:
bitbake wpe-westeros-image
Remove wayland
and set the WPE backend and platform to rpi
:
cat <<'__EOF__' >> conf/local.conf
WPE_BACKEND = "rpi"
WPE_PLATFORM = "rpi"
DISTRO_FEATURES_remove = "wayland"
__EOF__
Build the image:
bitbake wpe-eglfs-image
- Set
wlan0
toauto
in/etc/network/interfaces
. - Remove
auto
frometh0
in/etc/network/interfaces
. - Edit
/etc/wpa_supplicant.conf
to add your wireless networks configuration.
You need to attach the firmware to the HCI:
/usr/bin/hciattach /dev/serial1 bcm43xx 921600 noflow -
Hi @ammmir, I didn't notice there was a comment in this gist as I mainly use it for personal records :).
Regarding your question, no, that doesn't work because this is a Yocto build and there is no support for this headless configuration like in Raspbian. I also want this and I'm thinking on adding this functionality in another layer of my application on top of meta-wpe, however I haven't done it yet.
What you can do in the meantime is to modify the recipe of wpa-supplicant to provide a custom wpa_supplicant config file during building and then it will be integrated to the image automatically. The WPE image also already includes ssh so that part is sorted out as well. Check this: http://www.lynxbee.com/how-to-enable-wifi-with-yocto-raspberry-pi3/
Good Luck!