mirror of
https://github.com/pygos/build.git
synced 2024-11-05 03:27:10 +01:00
4039cd1c81
Add rootfs-<cfg> packages that create the skeleton system, copy the files and create the squashfs images. Old "SQUASHFS" package list is depends file of rootfs-<cfg> package. This removes some of the special case code. Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
40 lines
826 B
Text
Executable file
40 lines
826 B
Text
Executable file
prepare() {
|
|
return
|
|
}
|
|
|
|
build() {
|
|
local SOURCE="$1"
|
|
local BUILD="$2"
|
|
local DEPLOY="$3"
|
|
|
|
# setup skeleton
|
|
mkdir -pv ${BUILD}/{bin,etc,dev,sys,proc,tmp,var,run}
|
|
|
|
echo "/lib" > "$BUILD/etc/ld-musl-arm.path"
|
|
echo "/opt/vc/lib" >> "$BUILD/etc/ld-musl-arm.path"
|
|
|
|
# install packages to rootfs
|
|
cat "$SCRIPTDIR/pkg/rootfs-rpi3/depends" | sort -u > "$BUILD/rawpkg"
|
|
|
|
dependencies "$BUILD/rawpkg" "$BUILD/etc/packages" "pkg"
|
|
echo "toolchain" >> "$BUILD/etc/packages"
|
|
rm -f "$BUILD/rawpkg"
|
|
|
|
while read pkgname; do
|
|
if [ ! -e "$PKGDEPLOYDIR/$pkgname" ]; then
|
|
continue
|
|
fi
|
|
|
|
cp -ru --remove-destination ${PKGDEPLOYDIR}/${pkgname}/* "$BUILD"
|
|
done < "$BUILD/etc/packages"
|
|
}
|
|
|
|
deploy() {
|
|
local SOURCE="$1"
|
|
local BUILD="$2"
|
|
local DEPLOY="$3"
|
|
|
|
rm -f "$SQFS"
|
|
|
|
mksquashfs "$BUILD" "$SQFS" -all-root -no-progress -no-xattrs
|
|
}
|