summaryrefslogblamecommitdiffstats
path: root/remote/modules/busybox/module.build
blob: 73936e49d69c0264232ea6d45a50345b4782ca9a (plain) (tree)
1
2
3
4
5
6
7
8

                
                                                                                                                     
                                              
                                                                         


                                                                                                                           


                                                                                                                              
















                                                                                                                 

fetch_source() {
	git clone --depth 1 "${REQUIRED_GIT}" --branch "$REQUIRED_BRANCH" src || perror "Could not clone busybox git"
	cd src || perror "Could not cd to src"
	# Patch image centering and background filling if not patched yet
	if ! grep -q "bcenter_image" "miscutils/fbsplash.c"; then
		git apply "../fbsplash-center.patch" || perror "Could not apply busybox patch for fbsplash image centering"
	fi
	if ! grep -q "bfill_background" "miscutils/fbsplash.c"; then
		git apply "../fbsplash-fillbg.patch" || perror "Could not apply busybox patch for fbsplash background filling"
	fi
	cd .. || perror "cd .. failed"
}

build() {
	cp "openslx-busybox-config" "src/.config"
	cd src || perror "Could not cd to src"
	pinfo "Running make (if this hangs, check for unset options, ie. when you increased the REQUIRED_BRANCH)"
	make || perror "failed."
	pinfo "Running make install"
	make CONFIG_PREFIX="$MODULE_BUILD_DIR" install || perror "failed"
	rm "$MODULE_BUILD_DIR/bin/mount" "$MODULE_BUILD_DIR/bin/umount" "$MODULE_BUILD_DIR/bin/bash"
	cd - &> /dev/null
}

post_copy() {
	:
}