volumio / Build

Buildscripts for Volumio System
GNU General Public License v2.0
113 stars 102 forks source link

Make supporting board families easier #430

Closed ashthespy closed 3 years ago

ashthespy commented 3 years ago

Handle board/device families easier. Until the platform-xxx repos have a uniform naming scheme, we need to provide more flexibility..

Handle cases like the Khadas kvim1|2|3 devices that all share a common vims kernel/uboot tarball.

# File vim3
### Device information
DEVICENAME="Khadas Vim3"
# This is useful for multiple devices sharing the same/similar kernel
DEVICEFAMILY="khadas"
# tarball from DEVICEFAMILY repo to use
DEVICEBASE="vims" # Defaults to ${DEVICE} if unset
DEVICEREPO="https://github.com/volumio/platform-${DEVICEFAMILY}"

Also allow for other cases where the tarball has a different name than the [device](https://github.com/volumio/Build/blob/master/build.sh#L3430.

# File nanopineo2.sh
### Device information
DEVICENAME="NanoPi Neo2"
# This is useful for multiple devices sharing the same/similar kernel
DEVICEFAMILY="nanopi"
# tarball from DEVICEFAMILY repo to use
DEVICEBASE="nanopi-neo2" # Defaults to ${DEVICE} if unset
DEVICEREPO="https://github.com/volumio/platform-${DEVICEFAMILY}"
volumio commented 3 years ago

Before merging, we shall check that the hw in os-release is consistent with current naming scheme. @ashthespy @gkkpch can you please check?

ashthespy commented 3 years ago

With the modular system, I just went from <device>image.sh -> <device>.sh This avoids the switch case in build.sh, and instead directly uses <device>.sh

VOLUMIO_HARDWARE defaults to the name of the device as passed in using the -d flag (<device.sh>), but alignment of names can be done using the VOL_DEVICE_ID variable in the template, when <device>.sh doesn't correspond directly what is required in VOLUMIO_HARDWARE.