1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-05-17 03:06:12 +02:00
build/pkg/initrd/build
David Oberhollenzer d2432c1d1e Use pkg for managing binaries and their dependencies
- rewrite the rootfs_files.txt listings to the format used by pkg
 - create package files from each package
 - use "pkg install" to manage installation of packages and dependencies
   into the rootfs and initrd staging dirs

Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-03 17:47:02 +01:00

38 lines
671 B
Plaintext
Executable file

DEPENDS="bbstatic"
build() {
return
}
deploy() {
local INPUT="$1"
local DEPLOY="$2"
cp "$SCRIPTDIR/pkg/initrd/initrd.skel" "$DEPLOY/init"
chmod +x "$DEPLOY/init"
mkdir -p $DEPLOY/{dev,lib,bin,sys,proc,newroot,images}
cat > "$DEPLOY/initrd.list" <<_EOF
dir /dev 0755 0 0
dir /lib 0775 0 0
dir /bin 0775 0 0
dir /sys 0775 0 0
dir /proc 0775 0 0
dir /newroot 0775 0 0
dir /images 0775 0 0
slink /sbin /bin 0777 0 0
nod /dev/console 600 0 0 c 5 1
file /init $DEPLOY/init 0775 0 0
_EOF
pkg install -om -R "$REPODIR" -r "$DEPLOY" $DEPENDS
pkg install -R "$REPODIR" -r "$DEPLOY" -l \
-F initrd $DEPENDS >> "$DEPLOY/initrd.list"
}
check_update() {
return
}