~aleteoryx/muditaos

muditaos/config/common.sh -rw-r--r-- 595 bytes
a405cad6Aleteoryx trim readme 5 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash -e
# Copyright (c) 2017-2024, Mudita Sp. z.o.o. All rights reserved.
# For licensing, see https://github.com/mudita/MuditaOS/blob/master/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'
}