From d74341418722aa09293c7b266bc5f07fcbe2d0d7 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Mon, 26 Feb 2018 13:13:51 +0100 Subject: Install packages --- build_rootfs.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/build_rootfs.sh b/build_rootfs.sh index ff5a6a6..4727524 100755 --- a/build_rootfs.sh +++ b/build_rootfs.sh @@ -15,6 +15,8 @@ base=`basename $src_tar` dir=/tmp/build.$$ files_dir=files/ instroot=$dir/rootfs + +OPKG=sdk/staging_dir/host/bin/opkg export IPKG_INSTROOT=$instroot unpack() { @@ -63,9 +65,22 @@ add_files() { done } +add_package() { + local ipkg=$1 + $OPKG -o $instroot install $ipkg +} + +add_packages() { + local dir=$1 + for f in $dir/*.ipk; do + add_package $f + done +} + unpack add_files $files_dir $instroot add_file $metadata $metadata_dir $dir add_files templates/ $dir/templates/ +add_packages bin/packages/ pack #pack_squashfs -- cgit v1.2.3