Skip to content

Commit

Permalink
0.11-rc1
Browse files Browse the repository at this point in the history
  • Loading branch information
cinnamonwolfy committed Nov 13, 2023
1 parent a2d0b43 commit a572cad
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 47 deletions.
28 changes: 17 additions & 11 deletions pl-files/compile-modules/gcc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,21 +84,27 @@ def toolchainBuild globalVars
puts "Done."
end

if File.exist?("#{globalVars["sysroot"]}/lib/libpl32.so") == false
print "Building pl32lib-ng..."
compilePl32lib("pl32lib-ng", "compile", [ "--prefix=#{globalVars["sysroot"]} --target=#{globalVars["triple"]} CC=#{globalVars["tcprefix"]}/bin/#{globalVars["cross_cc"]} CFLAGS='-Os'", "build" ], globalVars)
puts "Done."
print "Installing pl32lib-ng..."
compilePl32lib("pl32lib-ng", "compile", "install", globalVars)
if File.exist?("#{globalVars["sysroot"]}/lib/libz.so") == false
print "Building zlib..."
Dir.chdir("#{globalVars["buildDir"]}/zlib-#{globalVars["zlib"]}")
if File.exist?("build") == false
Dir.mkdir("build")
end
Dir.chdir("build")
blockingSpawn({"CC" => "#{globalVars["tcprefix"]}/bin/#{globalVars["cross_cc"]}", "AR" => "#{globalVars["tcprefix"]}/bin/#{globalVars["triple"]}-ar"}, "../configure --prefix=#{globalVars["sysroot"]} 2>#{globalVars["baseDir"]}/logs/zlib-error.log 1>#{globalVars["baseDir"]}/logs/zlib.log");
blockingSpawn("make -j#{globalVars["threads"]} 2>#{globalVars["baseDir"]}/logs/zlib-error.log 1>#{globalVars["baseDir"]}/logs/zlib.log");
puts "Done."
print "Installing zlib..."
blockingSpawn("make install 2>#{globalVars["baseDir"]}/logs/zlib-error.log 1>#{globalVars["baseDir"]}/logs/zlib.log")
puts "Done."
end

if File.exist?("#{globalVars["sysroot"]}/lib/libplml.so") == false
print "Building libplml..."
compilePl32lib("libplml", "compile", [ "--prefix=#{globalVars["sysroot"]} --target=#{globalVars["triple"]} CC=#{globalVars["tcprefix"]}/bin/#{globalVars["cross_cc"]} CFLAGS='-Os'", "build" ], globalVars)
if File.exist?("#{globalVars["sysroot"]}/lib/libplrt.so") == false
print "Building pl-rt..."
compilePl32lib("pl-rt", "compile", [ "--prefix=#{globalVars["sysroot"]} --target=#{globalVars["triple"]} CC=#{globalVars["tcprefix"]}/bin/#{globalVars["cross_cc"]} CFLAGS='-Os'", "build" ], globalVars)
puts "Done."
print "Installing libplml..."
compilePl32lib("libplml", "compile", "install", globalVars)
print "Installing pl-rt..."
compilePl32lib("pl-rt", "compile", "install", globalVars)
puts "Done."
end
end
36 changes: 21 additions & 15 deletions pl-files/compile-modules/rootfs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,27 @@ def rootfsBuild globalVars
puts "Done."
end

if File.exist?("#{globalVars["outputDir"]}/rootfs/usr/lib/libz.so") == false
print "Building zlib..."
Dir.chdir("#{globalVars["buildDir"]}/zlib-#{globalVars["zlib"]}")
if File.exist?("build") == false
Dir.mkdir("build")
end
Dir.chdir("build")
blockingSpawn({"CC" => "#{globalVars["tcprefix"]}/bin/#{globalVars["cross_cc"]}", "AR" => "#{globalVars["tcprefix"]}/bin/#{globalVars["triple"]}-ar"}, "../configure --prefix=/usr --includedir=/opt/include 2>#{globalVars["baseDir"]}/logs/zlib-error.log 1>#{globalVars["baseDir"]}/logs/zlib.log");
blockingSpawn("make -j#{globalVars["threads"]} 2>#{globalVars["baseDir"]}/logs/zlib-error.log 1>#{globalVars["baseDir"]}/logs/zlib.log");
puts "Done."
print "Installing zlib..."
blockingSpawn("make install DESTDIR=#{globalVars["outputDir"]}/rootfs 2>#{globalVars["baseDir"]}/logs/zlib-error.log 1>#{globalVars["baseDir"]}/logs/zlib.log")
puts "Done."
end

if File.exist?("#{globalVars["outputDir"]}/rootfs/usr/bin/toybox") == false
print "Building Toybox..."
Dir.chdir("#{globalVars["buildDir"]}/toybox-#{globalVars["toybox"]}")
system("make defconfig 2>#{globalVars["baseDir"]}/logs/toybox-error.log >#{globalVars["baseDir"]}/logs/toybox.log")
configFile = File.open(".config", "a")
configFile.write("CONFIG_SH=y\nCONFIG_DD=y\nCONFIG_EXPR=y\nCONFIG_GETTY=y\nCONFIG_MDEV=y\n")
configFile.write("CONFIG_SH=y\nCONFIG_DD=y\nCONFIG_EXPR=y\nCONFIG_GETTY=y\nCONFIG_MDEV=y\nCONFIG_TOYBOX_LIBZ=y\n")
configFile.close()
system("make -j#{globalVars["threads"]} CC=#{globalVars["tcprefix"]}/bin/#{globalVars["cross_cc"]} CFLAGS=#{globalVars["cross_cflags"]} 2>>#{globalVars["baseDir"]}/logs/toybox-error.log >>#{globalVars["baseDir"]}/logs/toybox.log")
puts "Done"
Expand All @@ -41,21 +56,12 @@ def rootfsBuild globalVars
puts "Done."
end

if File.exist?("#{globalVars["outputDir"]}/rootfs/usr/lib/libpl32.so") == false
print "Building pl32lib-ng..."
compilePl32lib("pl32lib-ng", "compile", [ "--prefix=#{globalVars["outputDir"]}/rootfs/usr --includedir=#{globalVars["outputDir"]}/rootfs/opt/include --target=#{globalVars["triple"]} CC=#{globalVars["tcprefix"]}/bin/#{globalVars["cross_cc"]} CFLAGS='-Os'", "build" ], globalVars)
puts "Done."
print "Installing pl32lib-ng..."
compilePl32lib("pl32lib-ng", "compile", "install", globalVars)
puts "Done."
end

if File.exist?("#{globalVars["outputDir"]}/rootfs/usr/lib/libplml.so") == false
print "Building libplml..."
compilePl32lib("libplml", "compile", [ "--prefix=#{globalVars["outputDir"]}/rootfs/usr --includedir=#{globalVars["outputDir"]}/rootfs/opt/include --target=#{globalVars["triple"]} CC=#{globalVars["tcprefix"]}/bin/#{globalVars["cross_cc"]} CFLAGS='-Os'", "build" ], globalVars)
if File.exist?("#{globalVars["outputDir"]}/rootfs/usr/lib/libplrt.so") == false
print "Building pl-rt..."
compilePl32lib("pl-rt", "compile", [ "--prefix=#{globalVars["outputDir"]}/rootfs/usr --includedir=#{globalVars["outputDir"]}/rootfs/opt/include --target=#{globalVars["triple"]} CC=#{globalVars["tcprefix"]}/bin/#{globalVars["cross_cc"]} CFLAGS='-Os'", "build" ], globalVars)
puts "Done."
print "Installing libplml..."
compilePl32lib("libplml", "compile", "install", globalVars)
print "Installing pl-rt..."
compilePl32lib("pl-rt", "compile", "install", globalVars)
puts "Done."
end

Expand Down
2 changes: 1 addition & 1 deletion pl-files/configure-files/gcc.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
toolchain: "gcc"
pkgList: [ "linux", "binutils", "gcc", "gmp", "mpc", "mpfr", "toybox", "musl", "pl32lib-ng", "libplml", "pl-srv" ]
pkgList: [ "linux", "binutils", "gcc", "gmp", "mpc", "mpfr", "toybox", "musl", "pl-rt", "pl-srv", "zlib" ]
supportedArch: [ "i486", "i586", "i686", "x86_64", "armv5", "armv6", "armv6k", "armv7", "aarch64", "riscv64" ]
4 changes: 0 additions & 4 deletions pl-files/configure-files/pkg/libplml.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions pl-files/configure-files/pkg/pl-rt.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "pl-rt"
version: "0.06"
version: "0.06.1"
github: true
tag: "v0.06"
tag: "v0.06.1"
url: "portalinux-project/pl-rt"
5 changes: 0 additions & 5 deletions pl-files/configure-files/pkg/pl-srv-git.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions pl-files/configure-files/pkg/pl-srv.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "pl-srv"
version: "0.03"
tag: "v0.03"
version: "0.04.1"
tag: "v0.04.1"
github: true
url: "portalinux-project/pl-srv"
5 changes: 0 additions & 5 deletions pl-files/configure-files/pkg/pl32lib-ng.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions pl-files/pl-rootfs/usr-bin/init-script
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ if [ "$1" = "tb" ]; then

cmdList="$(toybox)"
for i in $cmdList; do
if [ "$i" != "sh" ]; then
toybox ln -s /usr/bin/toybox /usr/bin/$i
if [ "$i" != "sh" ] || [ "$i" != "ls" ]; then
toybox ln -s /usr/bin/toybox /usr/bin/$i 2>/dev/null
printf "* Creating link: $i \\r"
fi
done
Expand Down

0 comments on commit a572cad

Please sign in to comment.