Update bash and fish demo with prebuilt busybox
Signed-off-by: Zheng, Qi <huaiqing.zq@antgroup.com>
This commit is contained in:
		
							parent
							
								
									d9845235d3
								
							
						
					
					
						commit
						774ea33d9a
					
				
							
								
								
									
										1
									
								
								demos/bash/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										1
									
								
								demos/bash/.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -1,3 +1,2 @@ | ||||
| bash_for_occlum/ | ||||
| occlum_instance/ | ||||
| busybox/ | ||||
|  | ||||
| @ -7,5 +7,5 @@ targets: | ||||
|     copy: | ||||
|       - files: | ||||
|         - /opt/occlum/toolchains/bash/musl/bash | ||||
|         - ../busybox/busybox | ||||
|         - /opt/occlum/toolchains/busybox/musl/busybox | ||||
|         - ../occlum_bash_test.sh | ||||
|  | ||||
| @ -7,5 +7,5 @@ targets: | ||||
|     copy: | ||||
|       - files: | ||||
|         - /opt/occlum/toolchains/bash/glibc/bash | ||||
|         - ../busybox/busybox | ||||
|         - /opt/occlum/toolchains/busybox/glibc/busybox | ||||
|         - ../occlum_bash_test.sh | ||||
|  | ||||
| @ -1,24 +0,0 @@ | ||||
| #! /bin/bash | ||||
| set -e | ||||
| 
 | ||||
| current=$(pwd) | ||||
| busybox_src="$current/busybox" | ||||
| busybox_config="$current/../fish/.config" | ||||
| 
 | ||||
| rm -rf $busybox_src | ||||
| git clone -b 1_31_1 --depth 1 https://github.com/mirror/busybox.git | ||||
| 
 | ||||
| pushd $busybox_src | ||||
| make clean | ||||
| make defconfig | ||||
| cp $busybox_config . | ||||
| 
 | ||||
| if [[ $1 == "musl" ]]; then | ||||
|     echo "Building musl-libc version of busybox" | ||||
|     sed -e 's/.*CONFIG_CROSS_COMPILER_PREFIX.*/CONFIG_CROSS_COMPILER_PREFIX="occlum-"/' -i .config | ||||
| else | ||||
|     echo "Building glibc version of busybox" | ||||
| fi | ||||
| 
 | ||||
| make -j | ||||
| popd | ||||
| @ -3,11 +3,9 @@ set -e | ||||
| 
 | ||||
| if [[ $1 == "musl" ]]; then | ||||
|     echo "*** Run musl-libc bash demo ***" | ||||
|     ./prepare_busybox.sh musl | ||||
|     bomfile="../bash-musl.yaml" | ||||
| else | ||||
|     echo "*** Run glibc bash demo ***" | ||||
|     ./prepare_busybox.sh | ||||
|     bomfile="../bash.yaml" | ||||
| fi | ||||
| 
 | ||||
|  | ||||
							
								
								
									
										1191
									
								
								demos/fish/.config
									
									
									
									
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										1191
									
								
								demos/fish/.config
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										1
									
								
								demos/fish/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										1
									
								
								demos/fish/.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -1,5 +1,4 @@ | ||||
| ncurses/ | ||||
| fish-shell/ | ||||
| busybox/ | ||||
| occlum-instance/ | ||||
| occlum-test/ | ||||
|  | ||||
| @ -1,6 +1,7 @@ | ||||
| #!/bin/bash | ||||
| set -e | ||||
| 
 | ||||
| rm -rf ncurses | ||||
| # download and install ncurses | ||||
| git clone -b v6.1 --depth 1 https://github.com/mirror/ncurses.git | ||||
| cd ncurses | ||||
| @ -25,10 +26,3 @@ cmake ../  -DCMAKE_BUILD_TYPE=Debug -DCURSES_LIBRARY=/opt/occlum/toolchains/gcc/ | ||||
| make -j$(nproc) | ||||
| cd ../../ | ||||
| 
 | ||||
| # download and build busybox | ||||
| git clone -b 1_31_1 --depth 1 https://github.com/mirror/busybox.git | ||||
| cd busybox | ||||
| CROSS_COMPILE=/opt/occlum/toolchains/gcc/bin/occlum- | ||||
| make CROSS_COMPILE="$CROSS_COMPILE" defconfig | ||||
| cp ../.config . | ||||
| make CROSS_COMPILE="$CROSS_COMPILE" -j$(nproc) | ||||
|  | ||||
| @ -7,7 +7,7 @@ targets: | ||||
|     copy: | ||||
|       - files: | ||||
|         - ../fish-shell/build/fish | ||||
|         - ../busybox/busybox | ||||
|         - /opt/occlum/toolchains/busybox/musl/busybox | ||||
|   - target: /bin | ||||
|     # copy script | ||||
|     copy: | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user