- some bugs corrected
This commit is contained in:
parent
2741c53da1
commit
e053cb0837
@ -114,6 +114,7 @@ function clean()
|
||||
else
|
||||
warning "$IMAGE does not exists"
|
||||
fi
|
||||
|
||||
if [ -d "$BOOT" ];then
|
||||
info "Removing $BOOT"
|
||||
/bin/rmdir $BOOT
|
||||
@ -481,7 +482,7 @@ brcmfmac
|
||||
bcm2835-nrg" >> "$BUILD_PATH"/etc/modules
|
||||
|
||||
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
|
||||
|
||||
info "making /boot/cmdline.txt"
|
||||
@ -494,7 +495,7 @@ bcm2835-nrg" >> "$BUILD_PATH"/etc/modules
|
||||
|
||||
info "copying wifi firmware file missing in Mageia"
|
||||
/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
|
||||
error "line $LINENO error copying wifi firmware in $ROOTP/usr/lib/firmware/brcm/ : exiting"
|
||||
exit 1
|
||||
@ -504,7 +505,8 @@ bcm2835-nrg" >> "$BUILD_PATH"/etc/modules
|
||||
;;
|
||||
esac
|
||||
|
||||
/bin/umount "$BOOT" "$ROOT"
|
||||
/usr/bin/sync
|
||||
/usr/bin/umount "$BOOT" "$ROOT"
|
||||
if [ $? -eq 0 ];then
|
||||
/bin/rmdir "$BOOT" "$ROOT"
|
||||
else
|
||||
@ -512,7 +514,7 @@ bcm2835-nrg" >> "$BUILD_PATH"/etc/modules
|
||||
exit 1
|
||||
fi
|
||||
|
||||
/sbin/partx -d "$DEVICE"
|
||||
/usr/sbin/partx -d "$DEVICE"
|
||||
if [ $? -ne 0 ];then
|
||||
error "line $LINENO warning : error unmounting $DEVICE "
|
||||
exit 1
|
||||
@ -621,24 +623,6 @@ ROOT="/mnt/root"
|
||||
BUILD_PATH="$INSTALL_PATH/build"
|
||||
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
|
||||
if [ -z $SOURCE_PATH/$CONFIG_PATH ];then
|
||||
info " Config path do not exists, defaulting to ./$TARGET"
|
||||
@ -669,6 +653,24 @@ else
|
||||
exit
|
||||
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 "source path: $SOURCE_PATH"
|
||||
info "Install path: $INSTALL_PATH"
|
||||
|
Reference in New Issue
Block a user