Added support for creating custom developer packages before they are pushed to the Firmware repository

This commit is contained in:
Ystinia Zalatova (from Futurae PC)
2025-09-12 19:08:54 +01:00
parent c67c86c08c
commit 528a399b3b
4 changed files with 55 additions and 0 deletions

View File

@@ -93,6 +93,21 @@ select_device() {
fi
}
copy_extra_packages() {
extra_package=${BUILDER_DIR}/package
firmware_package=${FIRMWARE_DIR}/general/package
cp -afv $extra_package/* $firmware_package
package_list_file=$firmware_package/Config.in
for f in "$extra_package"/*
do
package_name=$(basename $f)
if ! grep -Fq "$package_name" $package_list_file
then
printf 'source "$BR2_EXTERNAL_GENERAL_PATH/package/%s/Config.in"\n' $package_name >> $package_list_file
fi
done
}
echo_c 37 "Experimental system for building OpenIPC firmware for known devices"
echo_c 30 "https://openipc.org/"
echo_c 30 "Version: ${VERSION}"
@@ -120,6 +135,9 @@ else
# git pull --rebase
fi
echo_c 33 "\nCopying extra packages"
copy_extra_packages
echo_c 33 "\nCopying device files"
cp -afv ${BUILDER_DIR}/${ITEM}/* ${FIRMWARE_DIR}

View File

@@ -0,0 +1,7 @@
config BR2_PACKAGE_DEMO_OPENIPC
bool "demo-openipc"
default n
help
Demo package
https://openipc.org

View File

@@ -0,0 +1,23 @@
################################################################################
#
# demo-openipc | updated 2022.09.13
#
################################################################################
DEMO_OPENIPC_LICENSE = MIT
DEMO_OPENIPC_LICENSE_FILES = LICENSE
define DEMO_OPENIPC_EXTRACT_CMDS
cp -avr $(DEMO_OPENIPC_PKGDIR)/src/* $(@D)/
endef
define DEMO_OPENIPC_BUILD_CMDS
(cd $(@D); $(TARGET_CC) -s demo-openipc.c -o demo-openipc)
endef
define DEMO_OPENIPC_INSTALL_TARGET_CMDS
$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/bin
install -m 0755 -D $(@D)/demo-openipc $(TARGET_DIR)/usr/bin/demo-openipc
endef
$(eval $(generic-package))

View File

@@ -0,0 +1,7 @@
#include <stdio.h>
int main (void)
{
puts ("Welcome to OpenIPC !");
return 0;
}