1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-22 02:59:47 +01:00

Merge rootfs packages

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
David Oberhollenzer 2018-01-24 13:41:45 +01:00
parent ffacb26218
commit 0932c5ae0b
7 changed files with 11 additions and 49 deletions

View file

@ -1,5 +1,6 @@
TARGET="i686-linux-musl"
GCC_CPU="i686"
MUSL_CPU="i386"
GCC_EXTRACFG="--disable-libmpx --disable-libssp"

1
cfg/rpi3/LDPATH Normal file
View file

@ -0,0 +1 @@
/opt/vc/lib

View file

@ -1,5 +1,6 @@
TARGET="arm-linux-musleabihf"
GCC_CPU="armv6"
MUSL_CPU="arm"
GCC_EXTRACFG="--with-float=hard --with-fpu=neon-vfpv3"

View file

@ -1,4 +1,4 @@
DEPENDS="rootfs-alix linux"
DEPENDS="rootfs linux"
build() {
local SOURCE="$1"

View file

@ -1,4 +1,4 @@
DEPENDS="rootfs-rpi3 linux-rpi3 boot-rpi3"
DEPENDS="rootfs linux-rpi3 boot-rpi3"
build() {
local SOURCE="$1"

View file

@ -1,45 +0,0 @@
DEPENDS=$(cat "$SCRIPTDIR/cfg/$CFG/ROOTFS")
build() {
local SOURCE="$1"
local BUILD="$2"
local DEPLOY="$3"
# setup skeleton
mkdir -pv ${BUILD}/{bin,lib,etc,dev,sys,proc,tmp,var,run}
mkdir -pv ${BUILD}/{boot,usr,srv,mnt,opt}
mkdir -pv ${BUILD}/cfg/{preserve,overlay}
echo "/lib" > "$BUILD/etc/ld-musl-arm.path"
echo "/opt/vc/lib" >> "$BUILD/etc/ld-musl-arm.path"
# install packages to rootfs
dependencies "rootfs-rpi3" "pkg" | grep -v "rootfs-rpi3" > "$BUILD/etc/packages"
echo "toolchain" >> "$BUILD/etc/packages"
while read pkgname; do
if [ ! -e "$PKGDEPLOYDIR/$pkgname" ]; then
continue
fi
cp -ru --remove-destination ${PKGDEPLOYDIR}/${pkgname}/* "$BUILD"
done < "$BUILD/etc/packages"
# move configuration to preserve directory
mv ${BUILD}/etc ${BUILD}/cfg/preserve
mkdir -p ${BUILD}/etc
mv ${BUILD}/var/lib ${BUILD}/cfg/preserve/var_lib
mv ${BUILD}/root ${BUILD}/cfg/preserve
mkdir -p ${BUILD}/root
chmod 750 ${BUILD}/root
}
deploy() {
local SOURCE="$1"
local BUILD="$2"
local DEPLOY="$3"
mksquashfs "$BUILD" "$DEPLOY/rootfs.img" -all-root -no-progress -no-xattrs
}

View file

@ -10,10 +10,14 @@ build() {
mkdir -pv ${BUILD}/{boot,usr,srv,mnt,opt}
mkdir -pv ${BUILD}/cfg/{preserve,overlay}
echo "/lib" > "$BUILD/etc/ld-musl-i386.path"
echo "/lib" > "$BUILD/etc/ld-musl-${MUSL_CPU}.path"
if [ -e "$SCRIPTDIR/cfg/$CFG/LDPATH" ]; then
cat "$SCRIPTDIR/cfg/$CFG/LDPATH" >> "$BUILD/etc/ld-musl-${MUSL_CPU}.path"
fi
# install packages to rootfs
dependencies "rootfs-alix" "pkg" | grep -v "rootfs-alix" > "$BUILD/etc/packages"
dependencies "rootfs" "pkg" | grep -v "rootfs" > "$BUILD/etc/packages"
echo "toolchain" >> "$BUILD/etc/packages"
while read pkgname; do