X-Git-Url: https://hackdaworld.org/gitweb/?p=outofuni%2Fdib.git;a=blobdiff_plain;f=build.sh;h=770d170b8e3a44ab9638333ae1a997366b3746b2;hp=34460874fd8be8c1eff9b022dc2e23fc42720cec;hb=0da9687f1fb6a9f383740c6c69ae971ed16fcce6;hpb=b0954d42425046f559118b2cba77b718f5be5295 diff --git a/build.sh b/build.sh index 3446087..770d170 100755 --- a/build.sh +++ b/build.sh @@ -54,9 +54,9 @@ function build_all { if [ "$validimg" = "no" ]; then dd if=/dev/zero of=./rootfs.img bs=1M count=$IMGSIZE fi - mkfs.${ROOTFS} -f -L rootfs ./rootfs.img - # mount + # make fs and mount umount_if_mounted rootfs.mnt + mkfs.${ROOTFS} -f -L rootfs ./rootfs.img rm -rf rootfs.mnt mkdir rootfs.mnt mount -o loop ./rootfs.img ./rootfs.mnt @@ -198,17 +198,17 @@ else . ./config.build fi -# check prerequisites -check_prereq - # debootstrap if [ -z $1 ]; then + check_prereq build_all > ./build.log 2>&1 elif [ "$1" = "chroot" ]; then build_in_chroot > ./build_in_chroot.log 2>&1 elif [ "$1" = "uboot" ]; then + check_prereq build_uboot > ./build_uboot.log 2>&1 elif [ "$1" = "kernel" ]; then + check_prereq build_kernel > ./build_kernel.log 2>&1 else echo "unknown option: '$1'"