Merge branch 'kolipka-kernel_standalone'
This commit is contained in:
		
						commit
						fba39c8fa3
					
				
					 2 changed files with 1 additions and 12 deletions
				
			
		| 
						 | 
				
			
			@ -40,6 +40,7 @@ KCARGOFLAGS=--target $(KTARGET) --release -- -C soft-float
 | 
			
		|||
# Userspace variables
 | 
			
		||||
export TARGET=$(ARCH)-unknown-redox
 | 
			
		||||
BUILD=build/userspace
 | 
			
		||||
export INITFS_FOLDER=$(ROOT)/initfs
 | 
			
		||||
RUSTC=./rustc.sh
 | 
			
		||||
RUSTDOC=./rustdoc.sh
 | 
			
		||||
CARGO=RUSTC="$(RUSTC)" RUSTDOC="$(RUSTDOC)" CARGO_INCREMENTAL=1 cargo
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										12
									
								
								mk/initfs.mk
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								mk/initfs.mk
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -8,18 +8,6 @@ $(BUILD)/initfs.rs: \
 | 
			
		|||
		initfs/bin/redoxfs \
 | 
			
		||||
		initfs/bin/vesad \
 | 
			
		||||
		initfs/etc/**
 | 
			
		||||
	echo 'use collections::BTreeMap;' > $@
 | 
			
		||||
	echo 'pub fn gen() -> BTreeMap<&'"'"'static [u8], (&'"'"'static [u8], bool)> {' >> $@
 | 
			
		||||
	echo '    let mut files: BTreeMap<&'"'"'static [u8], (&'"'"'static [u8], bool)> = BTreeMap::new();' >> $@
 | 
			
		||||
	for folder in `find initfs -type d | sort`; do \
 | 
			
		||||
		name=$$(echo $$folder | sed 's/initfs//' | cut -d '/' -f2-) ; \
 | 
			
		||||
		$(ECHO) -n '    files.insert(b"'$$name'", (b"' >> $@ ; \
 | 
			
		||||
		ls -1 $$folder | sort | awk 'NR > 1 {printf("\\n")} {printf("%s", $$0)}' >> $@ ; \
 | 
			
		||||
		echo '", true));' >> $@ ; \
 | 
			
		||||
	done
 | 
			
		||||
	find initfs -type f -o -type l | cut -d '/' -f2- | sort | awk '{printf("    files.insert(b\"%s\", (include_bytes!(\"../../initfs/%s\"), false));\n", $$0, $$0)}' >> $@
 | 
			
		||||
	echo '    files' >> $@
 | 
			
		||||
	echo '}' >> $@
 | 
			
		||||
 | 
			
		||||
initfs/bin/%: programs/%/Cargo.toml programs/%/src/** $(BUILD)/libstd.rlib
 | 
			
		||||
	mkdir -p initfs/bin
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue