mirror of
https://github.com/pygos/build.git
synced 2024-11-22 11:09:46 +01:00
Merge rootfs packages
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
parent
ffacb26218
commit
0932c5ae0b
7 changed files with 11 additions and 49 deletions
|
@ -1,5 +1,6 @@
|
||||||
TARGET="i686-linux-musl"
|
TARGET="i686-linux-musl"
|
||||||
GCC_CPU="i686"
|
GCC_CPU="i686"
|
||||||
|
MUSL_CPU="i386"
|
||||||
|
|
||||||
GCC_EXTRACFG="--disable-libmpx --disable-libssp"
|
GCC_EXTRACFG="--disable-libmpx --disable-libssp"
|
||||||
|
|
||||||
|
|
1
cfg/rpi3/LDPATH
Normal file
1
cfg/rpi3/LDPATH
Normal file
|
@ -0,0 +1 @@
|
||||||
|
/opt/vc/lib
|
|
@ -1,5 +1,6 @@
|
||||||
TARGET="arm-linux-musleabihf"
|
TARGET="arm-linux-musleabihf"
|
||||||
GCC_CPU="armv6"
|
GCC_CPU="armv6"
|
||||||
|
MUSL_CPU="arm"
|
||||||
|
|
||||||
GCC_EXTRACFG="--with-float=hard --with-fpu=neon-vfpv3"
|
GCC_EXTRACFG="--with-float=hard --with-fpu=neon-vfpv3"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
DEPENDS="rootfs-alix linux"
|
DEPENDS="rootfs linux"
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
local SOURCE="$1"
|
local SOURCE="$1"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
DEPENDS="rootfs-rpi3 linux-rpi3 boot-rpi3"
|
DEPENDS="rootfs linux-rpi3 boot-rpi3"
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
local SOURCE="$1"
|
local SOURCE="$1"
|
||||||
|
|
|
@ -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
|
|
||||||
}
|
|
|
@ -10,10 +10,14 @@ build() {
|
||||||
mkdir -pv ${BUILD}/{boot,usr,srv,mnt,opt}
|
mkdir -pv ${BUILD}/{boot,usr,srv,mnt,opt}
|
||||||
mkdir -pv ${BUILD}/cfg/{preserve,overlay}
|
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
|
# 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"
|
echo "toolchain" >> "$BUILD/etc/packages"
|
||||||
|
|
||||||
while read pkgname; do
|
while read pkgname; do
|
Loading…
Reference in a new issue