Browse Source

new feature extra dir

- you can now overwrite your target root dir files with either
 - creating a directory extra/ and put a complet file hierarchy into it
 - creating a directory anywhere and using make extra=/path/to/dir

both methods will copy the file hierarchy over root dir and then will
create images and tar balls.

useful for overwriten default configuration or adding non packaged
software like java runtime environment.

suggested by Joerg S.
Waldemar Brodkorb 14 years ago
parent
commit
7a126246d2
2 changed files with 8 additions and 1 deletions
  1. 1 0
      .gitignore
  2. 7 1
      mk/image.mk

+ 1 - 0
.gitignore

@@ -24,3 +24,4 @@ make.log
 dl/
 package/*/info.mk
 tools_build/
+extra/

+ 7 - 1
mk/image.mk

@@ -1,7 +1,13 @@
 # This file is part of the OpenADK project. OpenADK is copyrighted
 # material, please see the LICENCE file in the top-level directory.
 
-imageprepare: kernel-install image-prepare-post
+imageprepare: kernel-install image-prepare-post extra-install
+
+# if an extra directory exist in TOPDIR, copy all content over the 
+# root directory, do the same if make extra=/dir/to/extra is used
+extra-install:
+	if [ -d $(TOPDIR)/extra ];then $(CP) $(TOPDIR)/extra/* ${TARGET_DIR};fi
+	if [ ! -z $(extra) ];then $(CP) $(extra)/* ${TARGET_DIR};fi
 
 image-prepare-post:
 	rng=/dev/arandom; test -e $$rng || rng=/dev/urandom; \