Fixes, many fixes
This commit is contained in:
		
							parent
							
								
									68fe2959b7
								
							
						
					
					
						commit
						fe6963e1bd
					
				
					 5 changed files with 27 additions and 39 deletions
				
			
		
							
								
								
									
										2
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							|  | @ -3,5 +3,5 @@ build/ | |||
| docker_move_tar_load | ||||
| docker_delete_abyss | ||||
| token | ||||
| 
 | ||||
| builds | ||||
| 
 | ||||
|  |  | |||
|  | @ -27,3 +27,4 @@ sudo umount root/proc/ | |||
| sudo umount root/sys/ | ||||
| sudo mount --make-rprivate root/dev/ | ||||
| sudo umount -l root/dev/ | ||||
| 
 | ||||
|  |  | |||
|  | @ -2,6 +2,8 @@ | |||
| 
 | ||||
| if [ "$#" -ne 1 ]; then | ||||
|     echo "You must enter exactly the container id of the docker in which the compilation took place. (the client not the volunteers)" | ||||
|     echo "This can be false, then the builds fodler will be used." | ||||
|     echo "The builds folder is a folder where llvm, musl, musl-dev, bmake can reside which will can be used instead of the automatic docker cp mechanism." | ||||
|     exit -1 | ||||
| fi | ||||
| 
 | ||||
|  | @ -38,6 +40,8 @@ docker cp $1:/iglunix/pkgs/musl/out/musl-dev.1.2.2.tar.xz  ./root/musl-dev.tar.x | |||
| docker cp $1:/iglunix/pkgs/musl/out/musl.1.2.2.tar.xz      ./root/musl.tar.xz | ||||
| docker cp $1:/iglunix/pkgs/bmake/out/bmake.20210110.tar.xz ./root/bmake.tar.xz | ||||
| 
 | ||||
| cp ./builds/* ./root/ | ||||
| 
 | ||||
| cd    ./root | ||||
| ROOT=$(pwd) | ||||
| 
 | ||||
|  | @ -47,10 +51,12 @@ tar -xf llvm.tar.xz      -C ./ | |||
| tar -xf bmake.tar.xz     -C ./ | ||||
| 
 | ||||
| #--- | ||||
| rm ./busybox-x86_64 | ||||
| wget -nc -q https://busybox.net/downloads/binaries/1.31.0-defconfig-multiarch-musl/busybox-x86_64 | ||||
| chmod +x ./busybox-x86_64 | ||||
| mv busybox-x86_64 ./bin/busybox | ||||
| 
 | ||||
| rm ./toybox-x86_64 | ||||
| wget -nc -q http://landley.net/toybox/bin/toybox-x86_64 | ||||
| chmod +x ./toybox-x86_64 | ||||
| mv toybox-x86_64 ./bin/toybox | ||||
|  |  | |||
|  | @ -9,8 +9,8 @@ compile_packages (){ | |||
| 		echo "Going to build: $pkg" | ||||
| 	 | ||||
| 		cd /iglunix/pkgs/${pkg}/ | ||||
| 		../../iglupkg.sh | ||||
| 		tar -xf out/${pkg}.*.tar.xz -C / | ||||
| 		../../iglupkg.sh || exit 1 | ||||
| 		tar -xf out/${pkg}.*.tar.xz -C / || exit 1 | ||||
| 		tar -xf out/${pkg}-dev.*.tar.xz -C / 2> /dev/null | ||||
| 		tar -xf out/${pkg}-doc.*.tar.xz -C / 2> /dev/null | ||||
| 	done | ||||
|  | @ -43,8 +43,6 @@ echo "root:x:0:root" > /etc/group | |||
| #--------- | ||||
| # Stage 1 | ||||
| #--------- | ||||
| #Apply the only headers patch for linux, we can't build it yet... | ||||
| patch /iglunix/pkgs/linux/build.sh /linux_header_only_patch | ||||
| #Stub lex | ||||
| printf "#!/bin/sh\necho lex go brr\n" > /usr/bin/lex | ||||
| chmod +x /usr/bin/lex | ||||
|  | @ -63,7 +61,7 @@ compile_packages | |||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| #Samurai | ||||
| #Samurai|| exit 1 | ||||
| cd /iglunix/pkgs/samurai | ||||
| cd src/samurai-*/ | ||||
| clang *.c -o samu | ||||
|  | @ -74,42 +72,42 @@ cd /iglunix/pkgs/samurai | |||
| rm /usr/bin/samu | ||||
| tar -xf out/samurai.*.tar.xz -C / | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| packages="rsync linux" | ||||
| compile_packages | ||||
| 
 | ||||
| 
 | ||||
| #--------- | ||||
| # Stage 3 | ||||
| #--------- | ||||
| # Libre ssl, a slight problem | ||||
| # lible ssl needs cmake, but cmake needs libre ssl. :( | ||||
| # and rsync needs cmake | ||||
| cd /iglunix/pkgs/libressl | ||||
| cd src/libressl-*/ | ||||
| ./configure --prefix=/usr && make -j12 && make install | ||||
| cd ../.. | ||||
| 
 | ||||
| packages="rsync" | ||||
| compile_packages | ||||
| 
 | ||||
| # Build the headers of linux. | ||||
| # No other solutions don't work well/at all. | ||||
| cd /iglunix/pkgs/linux | ||||
| cd src/linux-*/ | ||||
| gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ LEX=lex YACC=yacc LLVM_IAS=1 | ||||
| gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 INSTALL_HDR_PATH=/usr headers_install | ||||
| 
 | ||||
| 
 | ||||
| cd /iglunix/pkgs/cmake | ||||
| cd src/cmake-*/ | ||||
| ./bootstrap \ | ||||
|         --prefix=/usr \ | ||||
|         --mandir=/usr/share/man \ | ||||
|         --datadir=/usr/share/$pkgname \ | ||||
|         --docdir=/usr/share/doc/$pkgname \ | ||||
|         --datadir=/usr/share/cmake \ | ||||
|         --docdir=/usr/share/doc/cmake \ | ||||
|         --generator=Ninja \ | ||||
|         --no-system-libs | ||||
| 
 | ||||
| cd ../.. | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| #NOTE: we recompile mksh, because now we have curl and it can download the man page! | ||||
| #We remove the linux headers only patch | ||||
| patch -R /iglunix/pkgs/linux/build.sh /linux_header_only_patch | ||||
| packages="cmake libressl busybox toybox libffi python ca-certificates curl zlib expat kati gettext-tiny git netbsd-curses kakoune mksh linux iglunix llvm musl tiny-linux-bootloader" | ||||
| packages="cmake libressl busybox toybox libffi python ca-certificates curl zlib expat kati gettext-tiny git netbsd-curses kakoune mksh linux iglunix llvm musl nasm tiny-linux-bootloader" | ||||
| compile_packages | ||||
| 
 | ||||
| 
 | ||||
| echo "finished" | ||||
| exit | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,17 +0,0 @@ | |||
| --- build.sh | ||||
| +++ build.sh | ||||
| @@ -16,10 +16,10 @@ | ||||
|  build() { | ||||
|  	cd $pkgname-$pkgver | ||||
|  	#gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ YACC=yacc LLVM_IAS=1 defconfig | ||||
| -	gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ LEX=lex YACC=yacc LLVM_IAS=1 oldconfig | ||||
| -	gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ LEX=lex YACC=yacc LLVM_IAS=1 menuconfig | ||||
| -	cp .config ../../x86_64.config.new | ||||
| -	gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ LEX=lex YACC=yacc LLVM_IAS=1 | ||||
| +	#gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ LEX=lex YACC=yacc LLVM_IAS=1 oldconfig | ||||
| +	#gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ LEX=lex YACC=yacc LLVM_IAS=1 menuconfig | ||||
| +	#cp .config ../../x86_64.config.new | ||||
| +	#gmake CC=cc CXX=c++ HOSTCC=cc HOSTCXX=c++ LEX=lex YACC=yacc LLVM_IAS=1 | ||||
|  } | ||||
|   | ||||
|  package() { | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue