- For your Raspberry-based "product" recipe, you'll need:
- a custom GNU/Linux image (baking time: ~4h).
- a custom extention board topping (flavor of your choice).
Price: ★☆☆ Taste: ★★★ Difficulty: ★★☆
Build a custom GNU/Linux image
Yocto  is now a common solution for creating automated build of custom GNU/Linux images for embedded products.
There are already build layers for the Raspberry Pi and build scripts for most of the libraries and tools.
This tutorial  shows how to build your own Raspberry Pi image step-by-step. Once started, the Yocto build framework first compiles a cross-compiler (gcc). It takes many hours if your computer is a bit old. The network connection might also slow down the process as many gigabytes of data are downloaded.
Another build solution is to use a cloud service. I tested the A4 instance of Microsoft Azure .
Azure cloud service was extremely slow and I had to give up after more than 10 hours (running on 8 cores).
I also tested the C2S instance of Scaleway .
The actual CPU of the 4-core option is:
from cpuinfo - model name : Intel(R) Atom(TM) CPU C2550 @ 2.40GHz - cache size : 1024 KB
The Atom C2550  is the little brother of the 8-core C2750 in the Avoton family.
~/rpi/build$ rm -rf cache/ sstate-cache/ tmp/ ~/rpi/build$ time bitbake console-image [...] real 250m23.875s user 810m38.560s sys 58m33.650s
Building the image and its corresponding SDK took 4 hours and 10 minutes.
Note: the downloads/ folder was not deleted, hence download time is not taken into account in the build time measurment.
Design a Raspberry Pi HAT
The Raspberry Pi can easily be extended through its 2 x 20 GPIO pins header , which is mostly compatible over the Raspberry Pi 1+, 2 and 3 family. Those extention boards are called HATs (for "Hardware Attached on Top") .
My RaspIP looks like this:
It features a STM32 microcontroller (ST datasheet , KiCAD footprint ) connected to the SPI and I2C communication lines of the Raspberry Pi. Standard HATs are supposed to connect an EEPROM  to the I2C pins in order to provide the official operating system of the Raspberry Pi (Raspbian) with information about each HAT so as to load the relevant Linux driver as well as setting the GPIO to the right mode.
My design is meant to support this auto-configuration feature by emulating the EEPROM from the STM32 microcontroller.
The SPI channel will be used to send the current IP address to the extention board. This address is simply shown using the LEDs. SWD (single wire debug) is there for flashing the microcontroller, and UART for debugging output if needed.
You may notice that every single pin of the 32-pin quad-flat package is used. A lucky accident ;)
|||The Yocto project, https://www.yoctoproject.org|
|||Jumpnow Technologies, "Building Raspberry Pi Systems with Yocto", http://www.jumpnowtek.com/rpi/Raspberry-Pi-Systems-with-Yocto.html|
|||Microsoft Azure cloud service, https://azure.microsoft.com|
|||Scaleway cloud service, https://www.scaleway.com|
|||Intel ARK for "Atom C2550", http://ark.intel.com/products/77982|
|||Interactive pinout, http://pinout.xyz|
|||Raspberry Pi 3, mechanical drawing, https://www.raspberrypi.org/documentation/hardware/raspberrypi/mechanical/RPI-3B-V1_2.pdf|
|||TME, STM32F030K6T6, http://www.tme.eu/gb/details/stm32f030k6t6/st-microcontrollers/st-microelectronics/|
|||KiCAD foot print for STM32F030K6T6, https://github.com/joeferner/kicad-library/blob/master/libs/STM32-32PIN.lib|
|||24LC512 EEPROM, http://www.tme.eu/gb/details/24lc512-i_sm/serial-eeprom-memories-integ-circ/microchip-technology/|