Skip to content

Commit

Permalink
final 0.10.x commit :3
Browse files Browse the repository at this point in the history
  • Loading branch information
cinnamonwolfy committed Jun 10, 2023
1 parent 62bb7ed commit 71d50c0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pl-files/compile-modules/clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ _pl_clean(){
cd "$build/$i"
make -s clean >/dev/null 2>&1
make -s distclean >/dev/null 2>&1
elif [ -r "$build/$i/compile" ] && [ -r "$build/$i/configure.ac" ]; then
elif [ -r "$build/$i/compile" ] && [ ! -r "$build/$i/configure.ac" ]; then
cd "$build/$i"
./compile clean >/dev/null
fi
Expand Down
12 changes: 8 additions & 4 deletions pl-files/compile-modules/rootfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ compile_rootfs(){
main_comp="$included_comp --disable-multilib"
_get_pkg_names

if [ "$LLVM" != "" ]; then
cross_cflags="$cross_cflags -march=i486"
fi

printf "Creating rootfs structure..."
for i in dev sys proc opt usr/bin usr/lib root mnt home tmp var/pl-srv; do
mkdir -p "$output_rootfs/$i"
Expand Down Expand Up @@ -56,7 +60,7 @@ compile_rootfs(){
script -qeac "make defconfig 2>&1" "$logfile" >/dev/null
printf "CONFIG_SH=y\nCONFIG_DD=y\nCONFIG_EXPR=y\nCONFIG_GETTY=y\nCONFIG_MDEV=y\n" >> .config
echo "Done."
_exec "Compiling Toybox" "make CC='$cross_cc' CFLAGS='$cross_cflags $cross_ldflags -march=$arch' -j$threads"
_exec "Compiling Toybox" "make CC='$cross_cc' CFLAGS='$cross_cflags $cross_ldflags' -j$threads"
printf "Installing Toybox..."
mv *box "$output_rootfs/usr/bin"
ln -s "/usr/bin/toybox" "$output_rootfs/usr/bin/sh" 2>/dev/null || true
Expand All @@ -66,23 +70,23 @@ compile_rootfs(){
if [ ! -r "$output_rootfs/usr/lib/libpl32.so" ]; then
cd "$pl32lib_dir"

_exec "Configuring pl32lib" "./configure --prefix='$output_rootfs/usr' CC='$cross_cc' CFLAGS='$cross_cflags -march=$arch -Os' LDFLAGS='$cross_ldflags'"
_exec "Configuring pl32lib" "./configure --prefix='$output_rootfs/usr' CC='$cross_cc' CFLAGS='$cross_cflags -Os' LDFLAGS='$cross_ldflags'"
_exec "Compiling pl32lib" "./compile build"
_exec "Installing pl32lib" "./compile install"
fi

if [ ! -r "$output_rootfs/usr/lib/libplml.so" ]; then
cd "$libplml_dir"

_exec "Configuring libplml" "./configure --prefix='$output_rootfs/usr' CC='$cross_cc' CFLAGS='$cross_cflags -march=$arch -Os' LDFLAGS='$cross_ldflags'"
_exec "Configuring libplml" "./configure --prefix='$output_rootfs/usr' CC='$cross_cc' CFLAGS='$cross_cflags -Os' LDFLAGS='$cross_ldflags'"
_exec "Compiling libplml" "./compile build"
_exec "Installing libplml" "./compile install"
fi

if [ ! -r "$output_rootfs/usr/bin/pl-srv" ]; then
cd "$plsrv_dir"

_exec "Configuring pl-srv" "./configure --prefix='$output_rootfs/usr' CC='$cross_cc' CFLAGS='$cross_cflags -march=$arch -Os' LDFLAGS='$cross_ldflags'"
_exec "Configuring pl-srv" "./configure --prefix='$output_rootfs/usr' CC='$cross_cc' CFLAGS='$cross_cflags -Os' LDFLAGS='$cross_ldflags'"
_exec "Compiling pl-srv" "./compile build"
_exec "Installing pl-srv" "./compile install"
ln -s ./usr/bin/pl-init $output_rootfs/init
Expand Down

0 comments on commit 71d50c0

Please sign in to comment.