diff --git a/LICENSES/MIT.txt b/LICENSES/MIT.txt new file mode 100644 index 0000000..2071b23 --- /dev/null +++ b/LICENSES/MIT.txt @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/cli b/cli index 0982d09..c024e89 100755 --- a/cli +++ b/cli @@ -222,6 +222,10 @@ inspect_args() { # :command.user_lib # src/lib/extract.sh +# SPDX-FileCopyrightText: 2024 3mdeb Sp. z o. o. +# +# SPDX-License-Identifier: MIT + is_ifd_rom() { filetype=$(file -b $1) @@ -262,7 +266,7 @@ rom_extract() { fi if is_fmap_rom $rom_file; then echo "ROM contains a coreboot FMAP" - regions=$(cbfstool novacustom_v56x_mtl_v0.9.0.rom layout -w \ + regions=$(cbfstool $rom_file layout -w \ | grep \' \ | cut -d \' -f 2 \ | grep -v -e "SI_ALL" -e "SI_BIOS" -e "RW_SECTION_A" -e "RW_SECTION_B" -e "RW_MISC" -e "UNIFIED_MRC_CACHE" -e "RW_SHARED" -e "WP_RO" -e "RO_SECTION" @@ -293,6 +297,10 @@ rom_extract() { # :command.function cli_extract_command() { # src/extract_command.sh + # SPDX-FileCopyrightText: 2024 3mdeb Sp. z o. o. + # + # SPDX-License-Identifier: MIT + ROM_FILE=$(realpath "${args[rom]}") OUTPUT_DIR="${args[output]}" @@ -303,6 +311,10 @@ cli_extract_command() { # :command.function cli_compare_command() { # src/compare_command.sh + # SPDX-FileCopyrightText: 2024 3mdeb Sp. z o. o. + # + # SPDX-License-Identifier: MIT + ROM1_FILE=$(realpath "${args[rom1]}") ROM2_FILE=$(realpath "${args[rom2]}") OUTPUT_DIR="${args[output]}" diff --git a/src/bashly.yml b/src/bashly.yml index 95d7e89..85aa329 100644 --- a/src/bashly.yml +++ b/src/bashly.yml @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 3mdeb Sp. z o. o. +# +# SPDX-License-Identifier: MIT + name: cli help: Sample application version: 0.1.0 diff --git a/src/compare_command.sh b/src/compare_command.sh index 205e5a6..ef5a24b 100644 --- a/src/compare_command.sh +++ b/src/compare_command.sh @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 3mdeb Sp. z o. o. +# +# SPDX-License-Identifier: MIT + ROM1_FILE=$(realpath "${args[rom1]}") ROM2_FILE=$(realpath "${args[rom2]}") OUTPUT_DIR="${args[output]}" diff --git a/src/extract_command.sh b/src/extract_command.sh index aac5eb6..334861f 100644 --- a/src/extract_command.sh +++ b/src/extract_command.sh @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 3mdeb Sp. z o. o. +# +# SPDX-License-Identifier: MIT + ROM_FILE=$(realpath "${args[rom]}") OUTPUT_DIR="${args[output]}" diff --git a/src/lib/extract.sh b/src/lib/extract.sh index 612a514..5f6a078 100644 --- a/src/lib/extract.sh +++ b/src/lib/extract.sh @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2024 3mdeb Sp. z o. o. +# +# SPDX-License-Identifier: MIT + ## Add any function here that is needed in more than one parts of your ## application, or that you otherwise wish to extract from the main function ## scripts.