1
0

- some bugs corrected

This commit is contained in:
Daniel Tartavel 2018-07-17 11:18:06 +02:00
parent 2741c53da1
commit e053cb0837

View File

@ -114,6 +114,7 @@ function clean()
else else
warning "$IMAGE does not exists" warning "$IMAGE does not exists"
fi fi
if [ -d "$BOOT" ];then if [ -d "$BOOT" ];then
info "Removing $BOOT" info "Removing $BOOT"
/bin/rmdir $BOOT /bin/rmdir $BOOT
@ -481,7 +482,7 @@ brcmfmac
bcm2835-nrg" >> "$BUILD_PATH"/etc/modules bcm2835-nrg" >> "$BUILD_PATH"/etc/modules
info "copying modprobe.conf" info "copying modprobe.conf"
/bin/cp -a $SOURCE_PATH/modprobe.conf $BUILD_PATH/etc/ /bin/cp -a $SOURCE_PATH/$CONFIG_PATH/modprobe.conf $BUILD_PATH/etc/
chown root:root $BUILD_PATH/etc/modprobe.conf chown root:root $BUILD_PATH/etc/modprobe.conf
info "making /boot/cmdline.txt" info "making /boot/cmdline.txt"
@ -494,7 +495,7 @@ bcm2835-nrg" >> "$BUILD_PATH"/etc/modules
info "copying wifi firmware file missing in Mageia" info "copying wifi firmware file missing in Mageia"
/bin/mkdir -p "$ROOT/usr/lib/firmware/brcm/" /bin/mkdir -p "$ROOT/usr/lib/firmware/brcm/"
cp "$SOURCE_PATH/brcmfmac43430-sdio.txt" "$ROOT/usr/lib/firmware/brcm/" cp "$SOURCE_PATH/$CONFIG_PATH/brcmfmac43430-sdio.txt" "$ROOT/usr/lib/firmware/brcm/"
if [ $? -ne 0 ];then if [ $? -ne 0 ];then
error "line $LINENO error copying wifi firmware in $ROOTP/usr/lib/firmware/brcm/ : exiting" error "line $LINENO error copying wifi firmware in $ROOTP/usr/lib/firmware/brcm/ : exiting"
exit 1 exit 1
@ -502,9 +503,10 @@ bcm2835-nrg" >> "$BUILD_PATH"/etc/modules
;; ;;
xu3-4) xu3-4)
;; ;;
esac esac
/bin/umount "$BOOT" "$ROOT" /usr/bin/sync
/usr/bin/umount "$BOOT" "$ROOT"
if [ $? -eq 0 ];then if [ $? -eq 0 ];then
/bin/rmdir "$BOOT" "$ROOT" /bin/rmdir "$BOOT" "$ROOT"
else else
@ -512,7 +514,7 @@ bcm2835-nrg" >> "$BUILD_PATH"/etc/modules
exit 1 exit 1
fi fi
/sbin/partx -d "$DEVICE" /usr/sbin/partx -d "$DEVICE"
if [ $? -ne 0 ];then if [ $? -ne 0 ];then
error "line $LINENO warning : error unmounting $DEVICE " error "line $LINENO warning : error unmounting $DEVICE "
exit 1 exit 1
@ -621,24 +623,6 @@ ROOT="/mnt/root"
BUILD_PATH="$INSTALL_PATH/build" BUILD_PATH="$INSTALL_PATH/build"
ARM_VERSION="armv7hl" ARM_VERSION="armv7hl"
# assign TARGET ( rpi or xu3-4 )
case $TARGET in
xu3 | xu4)
CREATEIMG="createxu3-4image"
;;
rpi)
CREATEIMG="createrpiimage"
FIRMWARE_PATH="$SOURCE_PATH/.."
FIRMWARE_DOWNLOAD_URL="https://github.com/raspberrypi/firmware/archive/stable.zip"
FIRMWARE_DIR="firmware-stable"
;;
*)
CREATEIMG="createxu3-4image"
TARGET="xu4"
;;
esac
# path of config file # path of config file
if [ -z $SOURCE_PATH/$CONFIG_PATH ];then if [ -z $SOURCE_PATH/$CONFIG_PATH ];then
info " Config path do not exists, defaulting to ./$TARGET" info " Config path do not exists, defaulting to ./$TARGET"
@ -669,6 +653,24 @@ else
exit exit
fi fi
fi fi
# assign TARGET ( rpi or xu3-4 )
case $TARGET in
xu3 | xu4)
CREATEIMG="createxu3image"
;;
rpi)
CREATEIMG="createrpiimage"
FIRMWARE_PATH="$SOURCE_PATH/.."
FIRMWARE_DOWNLOAD_URL="https://github.com/raspberrypi/firmware/archive/stable.zip"
FIRMWARE_DIR="firmware-stable"
;;
*)
error "No Target : $TARGET"
exit 1
;;
esac
info "target : $TARGET" info "target : $TARGET"
info "source path: $SOURCE_PATH" info "source path: $SOURCE_PATH"
info "Install path: $INSTALL_PATH" info "Install path: $INSTALL_PATH"