mirror of
				https://github.com/edera-dev/krata.git
				synced 2025-11-04 07:39:39 +00:00 
			
		
		
		
	krata: rework cross-compilation
This commit is contained in:
		@ -6,7 +6,9 @@ cd "$(dirname "${REAL_SCRIPT}")/../.."
 | 
			
		||||
KRATA_DIR="${PWD}"
 | 
			
		||||
cd "${KRATA_DIR}"
 | 
			
		||||
 | 
			
		||||
export RUST_LIBC="musl"
 | 
			
		||||
TARGET_ARCH="$(./hack/build/arch.sh)"
 | 
			
		||||
 | 
			
		||||
export TARGET_LIBC="musl"
 | 
			
		||||
RUST_TARGET="$(./hack/build/target.sh)"
 | 
			
		||||
export RUSTFLAGS="-Ctarget-feature=+crt-static"
 | 
			
		||||
 | 
			
		||||
@ -16,5 +18,5 @@ cp "target/${RUST_TARGET}/release/krataguest" "${INITRD_DIR}/init"
 | 
			
		||||
chmod +x "${INITRD_DIR}/init"
 | 
			
		||||
cd "${INITRD_DIR}"
 | 
			
		||||
mkdir -p "${KRATA_DIR}/target/initrd"
 | 
			
		||||
find . | cpio -R 0:0 --ignore-devno --renumber-inodes -o -H newc --quiet > "${KRATA_DIR}/target/initrd/initrd"
 | 
			
		||||
find . | cpio -R 0:0 --ignore-devno --renumber-inodes -o -H newc --quiet > "${KRATA_DIR}/target/initrd/initrd-${TARGET_ARCH}"
 | 
			
		||||
rm -rf "${INITRD_DIR}"
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user