~aleteoryx/muditaos

ref: 5d1b9bbb0de99de7f24d8bbd2fb5fab55050be8f muditaos/config/common.sh -rw-r--r-- 583 bytes
5d1b9bbb — Dawid Wojtas [BH-1615] Crash after entering alarm settings 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash -e
# Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
# For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

check_any_arch() {
    local path="${1}"
    local product="${2}"
    local arch="${3}"
    [ -d ${path} ] || ( echo "no such directory: ${path}" > /dev/stderr ; exit 1)
    file ${path}/${product}.elf | grep "$arch" -q || ( echo "Bad file: ${path}/${product}.elf for selected architecture!" ; exit 1 )
}

check_target_rt1051() {
    check_any_arch "${@}" 'ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked'
}