Skip to content

Commit

Permalink
opendingux: enable top-level parallel build
Browse files Browse the repository at this point in the history
Signed-off-by: Gleb Mazovetskiy <[email protected]>
  • Loading branch information
glebm authored and pcercuei committed Oct 30, 2022
1 parent fbb6dfe commit 9bbc7cd
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 4 deletions.
1 change: 1 addition & 0 deletions board/opendingux/package/gmenu2x/gmenu2x.mk
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ GMENU2X_DEPENDENCIES += libxdgmime
endif

define GMENU2X_INSTALL_WRAPPER
mkdir -p $(TARGET_DIR)/usr/libexec
mv $(TARGET_DIR)/usr/bin/gmenu2x $(TARGET_DIR)/usr/libexec/gmenu2x
$(INSTALL) -D -m 0755 board/opendingux/package/gmenu2x/gmenu2x.sh $(TARGET_DIR)/usr/bin/gmenu2x
endef
Expand Down
2 changes: 2 additions & 0 deletions board/opendingux/package/wlan-scan/wlan-scan.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#
#############################################################

WLAN_SCAN_DEPENDENCIES = libnl

define WLAN_SCAN_BUILD_CMDS
mkdir -p $(@D)
$(TARGET_CC) $(TARGET_CFLAGS) -I $(STAGING_DIR)/usr/include/libnl3 \
Expand Down
11 changes: 7 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,19 @@ echo "Copy .config to target"
mkdir output/${CONFIG}/host && cp output/${CONFIG}/.config output/${CONFIG}/host/

if [ "${CONFIG}" = "installer" ] ; then
TARGET="all host-odbootd"
TARGETS="all host-odbootd"
else
TARGET=sdk
TARGETS=sdk
fi

# Perform the build.
echo "Starting build..."
nice make ${TARGET} BR2_SDK_PREFIX=${CONFIG}-toolchain O=output/${CONFIG}
PARALLELISM=$(getconf _NPROCESSORS_ONLN)
for target in $TARGETS; do
nice make "$target" BR2_SDK_PREFIX=${CONFIG}-toolchain O=output/${CONFIG} -j $PARALLELISM
done

if [ "${TARGET}" = sdk ] ; then
if [ "${TARGETS}" = sdk ] ; then
echo "Recompressing SDK to XZ..."
ARCHIVE_NAME=opendingux-${CONFIG}-toolchain.`date +'%Y-%m-%d'`
gzip -d -c output/${CONFIG}/images/${CONFIG}-toolchain.tar.gz | xz -T0 -9 > output/${CONFIG}/images/$ARCHIVE_NAME.tar.xz
Expand Down
1 change: 1 addition & 0 deletions configs/od_gcw0_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -229,3 +229,4 @@ BR2_PACKAGE_SPARROW3D=y
BR2_PACKAGE_UBIBOOT=y
BR2_PACKAGE_UBIBOOT_BOARDNAME="gcw0"
BR2_PACKAGE_UNLOCKVT=y
BR2_PER_PACKAGE_DIRECTORIES=y
1 change: 1 addition & 0 deletions configs/od_installer_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,4 @@ BR2_TARGET_ROOTFS_INITRAMFS=y
# BR2_TARGET_ROOTFS_TAR is not set
BR2_PACKAGE_HOST_MKPASSWD=y
BR2_PACKAGE_ODBOOTD=y
BR2_PER_PACKAGE_DIRECTORIES=y
1 change: 1 addition & 0 deletions configs/od_lepus_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,4 @@ BR2_PACKAGE_PYCLOCK=y
BR2_PACKAGE_SALSAD=y
BR2_PACKAGE_UBIBOOT=y
BR2_PACKAGE_UBIBOOT_BOARDNAME="lepus"
BR2_PER_PACKAGE_DIRECTORIES=y
1 change: 1 addition & 0 deletions configs/od_rs90_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,4 @@ BR2_PACKAGE_OD_PASSWD_CONFIG=y
BR2_PACKAGE_SALSAD=y
BR2_PACKAGE_UBIBOOT=y
BR2_PACKAGE_UBIBOOT_BOARDNAME="rs90"
BR2_PER_PACKAGE_DIRECTORIES=y

0 comments on commit 9bbc7cd

Please sign in to comment.