summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikael Magnusson <mikma@users.sourceforge.net>2018-02-26 13:13:51 +0100
committerMikael Magnusson <mikma@users.sourceforge.net>2018-02-26 13:13:51 +0100
commitd74341418722aa09293c7b266bc5f07fcbe2d0d7 (patch)
treef53da64d867a2811f4d337c2ccfdf24a93aa0672
parent1d5d65105205685dc06ec2c59d44ac3e0f0683aa (diff)
Install packages
-rwxr-xr-xbuild_rootfs.sh15
1 files changed, 15 insertions, 0 deletions
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