armbian-install: use consistent logfile name and align the according /usr/lib folder name (#5340)
* armbian-install: The log file should be named identical to the originally called install script
- the log file should be named as:
- /var/log/armbian-install.log if script armbian-install was originally called
- /var/log/nand-sata-install.log
- same for directory /usr/lib/nand-sata-install:
- rename this directory to /usr/lib/armbian-install
- create a symbolic link nand-sata-install to this folder for backward compatibility
in a subsequent commit
- abort script armbian-install with an error message:
- if file ${EX_LIST} does not exist
- if dir ${BOOTLOADER} does not exist
- remove the "beta" from the version title of armbian-install
* Add symlink /usr/lib/nand-sata-install to /usr/lib/armbian-install
This commit is contained in:
parent
b4adb07ced
commit
5072966b44
@ -1,10 +1,10 @@
|
||||
[system]
|
||||
start_os_name = linux
|
||||
timeout = -1
|
||||
display_device= -1
|
||||
display_mode = 0
|
||||
erase_flash = 1
|
||||
|
||||
|
||||
[linux]
|
||||
|
||||
[system]
|
||||
start_os_name = linux
|
||||
timeout = -1
|
||||
display_device= -1
|
||||
display_mode = 0
|
||||
erase_flash = 1
|
||||
|
||||
|
||||
[linux]
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
[segment]
|
||||
img_name = c:\u-boot.bin
|
||||
img_size = 0x80000
|
||||
img_base = 0x4A000000
|
||||
|
||||
[script_info]
|
||||
script_base = 0x43000000
|
||||
script_size = 0x10000
|
||||
[segment]
|
||||
img_name = c:\u-boot.bin
|
||||
img_size = 0x80000
|
||||
img_base = 0x4A000000
|
||||
|
||||
[script_info]
|
||||
script_base = 0x43000000
|
||||
script_size = 0x10000
|
||||
@ -1,5 +1,5 @@
|
||||
[system]
|
||||
start_os_name = linux
|
||||
timeout = -1
|
||||
display_device= 0
|
||||
display_mode = 0
|
||||
[system]
|
||||
start_os_name = linux
|
||||
timeout = -1
|
||||
display_device= 0
|
||||
display_mode = 0
|
||||
@ -1,8 +1,8 @@
|
||||
[segment]
|
||||
img_name = c:\linux\u-boot.bin
|
||||
img_size = 0x80000
|
||||
img_base = 0x4A000000
|
||||
|
||||
[script_info]
|
||||
script_base = 0x43000000
|
||||
script_size = 0x10000
|
||||
[segment]
|
||||
img_name = c:\linux\u-boot.bin
|
||||
img_size = 0x80000
|
||||
img_base = 0x4A000000
|
||||
|
||||
[script_info]
|
||||
script_base = 0x43000000
|
||||
script_size = 0x10000
|
||||
@ -1,5 +1,5 @@
|
||||
[system]
|
||||
start_os_name = linux
|
||||
timeout = -1
|
||||
display_device= 0
|
||||
display_mode = 0
|
||||
[system]
|
||||
start_os_name = linux
|
||||
timeout = -1
|
||||
display_device= 0
|
||||
display_mode = 0
|
||||
@ -1,8 +1,8 @@
|
||||
[segment]
|
||||
img_name = c:\linux\u-boot.bin
|
||||
img_size = 0x80000
|
||||
img_base = 0x4A000000
|
||||
|
||||
[script_info]
|
||||
script_base = 0x43000000
|
||||
script_size = 0x10000
|
||||
[segment]
|
||||
img_name = c:\linux\u-boot.bin
|
||||
img_size = 0x80000
|
||||
img_base = 0x4A000000
|
||||
|
||||
[script_info]
|
||||
script_base = 0x43000000
|
||||
script_size = 0x10000
|
||||
1
packages/bsp/common/usr/lib/nand-sata-install
Symbolic link
1
packages/bsp/common/usr/lib/nand-sata-install
Symbolic link
@ -0,0 +1 @@
|
||||
armbian-install
|
||||
@ -22,22 +22,26 @@
|
||||
|
||||
[[ -f /usr/lib/u-boot/platform_install.sh ]] && source /usr/lib/u-boot/platform_install.sh
|
||||
|
||||
# script configuration
|
||||
CWD="/usr/lib/nand-sata-install"
|
||||
# ORIGINAL_SCRIPT_NAME: Must be either armbian-install or nand-sata-install
|
||||
ORIGINAL_SCRIPT_NAME=$(basename $0)
|
||||
# script configuration - derive from ORIGINAL_SCRIPT_NAME
|
||||
CWD="/usr/lib/${ORIGINAL_SCRIPT_NAME}"
|
||||
EX_LIST="${CWD}/exclude.txt"
|
||||
[ ! -f ${EX_LIST} ] && echo -e "### Board installation issue: File ${EX_LIST} does not exist or is not accessible!\n" && exit 1
|
||||
[ -f /etc/default/openmediavault ] && echo '/srv/*' >> "${EX_LIST}"
|
||||
logfile="/var/log/nand-sata-install.log"
|
||||
logfile="/var/log/${ORIGINAL_SCRIPT_NAME}.log"
|
||||
|
||||
# read in board info
|
||||
[[ -f /etc/armbian-release ]] && source /etc/armbian-release
|
||||
backtitle="Armbian for $BOARD_NAME install script, https://www.armbian.com"
|
||||
title="Armbian installer beta v${VERSION}"
|
||||
title="Armbian installer v${VERSION}"
|
||||
|
||||
# exceptions
|
||||
if grep -q 'sun4i' /proc/cpuinfo; then DEVICE_TYPE="a10";
|
||||
elif grep -q 'sun5i' /proc/cpuinfo; then DEVICE_TYPE="a13";
|
||||
else DEVICE_TYPE="a20"; fi
|
||||
BOOTLOADER="${CWD}/${DEVICE_TYPE}/bootloader"
|
||||
[ ! -d ${BOOTLOADER} ] && echo -e "### Board installation issue: Directory ${BOOTLOADER} does not exist or is not accessible!\n" && exit 1
|
||||
FIRSTSECTOR=32768
|
||||
|
||||
#recognize_root
|
||||
|
||||
Loading…
Reference in New Issue
Block a user