pax_global_header 0000666 0000000 0000000 00000000064 14621413137 0014514 g ustar 00root root 0000000 0000000 52 comment=da3cd53f056a7868fdffaa631e4e426847aec309
mfgtools-uuu_1.5.182/ 0000775 0000000 0000000 00000000000 14621413137 0014422 5 ustar 00root root 0000000 0000000 mfgtools-uuu_1.5.182/.github/ 0000775 0000000 0000000 00000000000 14621413137 0015762 5 ustar 00root root 0000000 0000000 mfgtools-uuu_1.5.182/.github/workflows/ 0000775 0000000 0000000 00000000000 14621413137 0020017 5 ustar 00root root 0000000 0000000 mfgtools-uuu_1.5.182/.github/workflows/build.yaml 0000664 0000000 0000000 00000003013 14621413137 0021777 0 ustar 00root root 0000000 0000000 name: Build for x64 ubuntu
on:
push:
branches:
- master
tags:
- uuu*
pull_request:
types:
- opened
- synchronize
jobs:
build:
name: Build for x64 ubuntu
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up environment
run: sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install libusb-1.0-0-dev libbz2-dev libzstd-dev libtinyxml2-dev
- name: Build
run: |
git fetch --tags --force # Retrieve annotated tags. #issue 290
if [ "${{ matrix.os }}" == "ubuntu-20.04" ]; then git submodule update --init tinyxml2; cd tinyxml2; cmake .; make; cd ..; fi;
if [ "${{ matrix.os }}" == "ubuntu-20.04" ]; then cmake -D 'STATIC=1' -D 'FORCE_OLD=on' . ; else cmake .; fi;
make
- name: Upload Build Artifacts
if: matrix.os == 'ubuntu-20.04'
uses: actions/upload-artifact@v3
with:
name: uuu
path: ./uuu/uuu
- name: Create or Update Release
if: matrix.os == 'ubuntu-20.04' && github.ref_type == 'tag'
uses: ncipollo/release-action@v1
with:
name: Release ${{ github.ref_name }}
tag: ${{ github.ref_name }}
commit: ${{ github.sha }}
allowUpdates: true
prerelease: true
artifacts: "./uuu/uuu"
mfgtools-uuu_1.5.182/.github/workflows/build_arm.yaml 0000664 0000000 0000000 00000005263 14621413137 0022647 0 ustar 00root root 0000000 0000000 name: Build for arm ubuntu
on:
push:
branches:
- master
tags:
- uuu*
pull_request:
types:
- opened
- synchronize
jobs:
build_job:
# The host should always be linux
runs-on: ubuntu-latest
name: Build on ${{ matrix.distro }} ${{ matrix.arch }}
# Run steps on a matrix of 4 arch/distro combinations
strategy:
matrix:
include:
- arch: aarch64
distro: ubuntu20.04
- arch: armv7
distro: ubuntu20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: uraimo/run-on-arch-action@v2
name: Build artifact
id: build
with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.distro }}
# Not required, but speeds up builds
githubToken: ${{ github.token }}
# Mount the artifacts directory as /artifacts in the container
dockerRunArgs: |
--volume "${PWD}:/mfgtools"
# Pass some environment variables to the container
env: | # YAML, but pipe character is necessary
artifact_name: git-${{ matrix.distro }}_${{ matrix.arch }}
# The shell to run commands with in the container
shell: /bin/sh
# Install some dependencies in the container. This speeds up builds if
# you are also using githubToken. Any dependencies installed here will
# be part of the container image that gets cached, so subsequent
# builds don't have to re-install them. The image layer is cached
# publicly in your project's package repository, so it is vital that
# no secrets are present in the container state or logs.
install: apt-get update -q -y; apt-get install -q -y libusb-1.0-0-dev libbz2-dev libzstd-dev pkg-config cmake libssl-dev g++ zlib1g-dev git libtinyxml2-dev
# Produce a binary artifact and place it in the mounted volume
run: |
git config --global --add safe.directory /mfgtools
cd /mfgtools
cmake -D 'STATIC=1' .
make
- name: Rename
run: cp uuu/uuu uuu_${{ matrix.arch }}
- name: Upload Build Artifacts
uses: actions/upload-artifact@v3
with:
name: uuu_${{ matrix.arch }}
path: uuu_${{ matrix.arch }}
- name: Create or Update Release
if: github.ref_type == 'tag'
uses: ncipollo/release-action@v1
with:
name: Release ${{ github.ref_name }}
tag: ${{ github.ref_name }}
commit: ${{ github.sha }}
allowUpdates: true
prerelease: true
artifacts: "uuu_${{ matrix.arch }}"
mfgtools-uuu_1.5.182/.github/workflows/doc.yaml 0000664 0000000 0000000 00000002752 14621413137 0021456 0 ustar 00root root 0000000 0000000 name: Build pdf document
on:
push:
branches:
- master
tags:
- uuu*
pull_request:
types:
- opened
- synchronize
jobs:
build:
name: Build for pdf
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
repository: nxp-imx/mfgtools.wiki.git
path: wiki
ref: master
- name: Set up environment
run: |
sudo apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install asciidoc rename
- name: Build
run: |
cd wiki
rename -f 's/\.asciidoc$//' *
echo "" > UUU-docinfo.xml
git log -n25 --reverse --format="format:%h%cd%an%s" >> UUU-docinfo.xml
echo "" >> UUU-docinfo.xml
a2x -L -a docinfo UUU
- name: Upload Build Artifacts
uses: actions/upload-artifact@v3
with:
name: UUU.pdf
path: wiki/UUU.pdf
- name: Create or Update Release
if: github.ref_type == 'tag'
uses: ncipollo/release-action@v1
with:
name: Release ${{ github.ref_name }}
tag: ${{ github.ref_name }}
commit: ${{ github.sha }}
allowUpdates: true
prerelease: true
artifacts: "wiki/UUU.pdf"
mfgtools-uuu_1.5.182/.github/workflows/macOS.yaml 0000664 0000000 0000000 00000003257 14621413137 0021714 0 ustar 00root root 0000000 0000000 name: macOS Build
on:
push:
branches:
- master
tags:
- uuu*
pull_request:
types:
- opened
- synchronize
jobs:
build:
name: macOS Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- macos-14
- macos-12
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up environment
run: brew install libusb pkg-config zstd tinyxml2
- name: Build
run: |
git fetch --tags --force # Retrieve annotated tags. #issue 290
export PATH="/usr/local/Cellar/pkg-config/0.29.2_3/bin:${PATH}"; pkg-config --list-all; cmake -DOPENSSL_ROOT_DIR=$(brew --prefix)/opt/openssl . ; make
- name: Rename_x86
if: matrix.os == 'macos-12'
run: cp uuu/uuu uuu_mac_x86
- name: Rename_arm
if: matrix.os == 'macos-14'
run: cp uuu/uuu uuu_mac_arm
- name: Upload Build Artifacts
if: matrix.os == 'macos-12'
uses: actions/upload-artifact@v3
with:
name: uuu_mac_x86
path: uuu_mac_x86
- name: Upload Build Artifacts
if: matrix.os == 'macos-14'
uses: actions/upload-artifact@v3
with:
name: uuu_mac_arm
path: uuu_mac_arm
- name: Create or Update Release
if: github.ref_type == 'tag'
uses: ncipollo/release-action@v1
with:
name: Release ${{ github.ref_name }}
tag: ${{ github.ref_name }}
commit: ${{ github.sha }}
allowUpdates: true
prerelease: true
artifacts: "uuu_mac_*"
mfgtools-uuu_1.5.182/.github/workflows/tar.yaml 0000664 0000000 0000000 00000003404 14621413137 0021472 0 ustar 00root root 0000000 0000000 name: Create source package
on:
push:
branches:
- master
tags:
- uuu*
pull_request:
types:
- opened
- synchronize
jobs:
build:
name: Create source package
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- name: Build
run: |
git archive --prefix "uuu-${{ github.ref_name }}/" -o "uuu_source-${{ github.ref_name }}.tar" HEAD ;
git submodule foreach --recursive "git archive --prefix=uuu-${{ github.ref_name }}/\$path/ --output=\$sha1.tar HEAD && tar --concatenate --file=$(pwd)/uuu_source-${{ github.ref_name }}.tar \$sha1.tar && rm \$sha1.tar"
mkdir uuu-${{ github.ref_name }}; git describe --tags --long >uuu-${{ github.ref_name }}/.tarball-version
tar -r uuu-${{ github.ref_name }}/.tarball-version -f uuu_source-${{ github.ref_name }}.tar
gzip uuu_source-${{ github.ref_name }}.tar
tar xzf uuu_source-${{ github.ref_name }}.tar.gz && zip uuu_source-${{ github.ref_name }}.zip $(tar tf uuu_source-${{ github.ref_name }}.tar.gz)
- name: Upload Build Artifacts
uses: actions/upload-artifact@v3
with:
name: uuu_source-${{ github.ref_name }}.tar.gz
path: uuu_source-${{ github.ref_name }}.tar.gz
- name: Create or Update Release
if: github.ref_type == 'tag'
uses: ncipollo/release-action@v1
with:
name: Release ${{ github.ref_name }}
tag: ${{ github.ref_name }}
commit: ${{ github.sha }}
allowUpdates: true
prerelease: true
artifacts: "uuu_source-${{ github.ref_name }}.tar.gz, uuu_source-${{ github.ref_name }}.zip"
mfgtools-uuu_1.5.182/.github/workflows/win.yaml 0000664 0000000 0000000 00000003041 14621413137 0021476 0 ustar 00root root 0000000 0000000 name: Build with VS Studio
on:
push:
branches:
- master
tags:
- uuu*
pull_request:
types:
- opened
- synchronize
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
configuration: ['Debug', 'Release']
platform: ['x86', 'x64']
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- name: Set up Visual Studio
uses: microsoft/setup-msbuild@v1.1
- name: Build static solution
run: |
git fetch --tags --force # Retrieve annotated tags. #issue 290
msbuild /p:Configuration=${{ matrix.configuration }} /p:PlatformToolset=v143 /p:Platform=${{ matrix.platform }} msvc/uuu-static-link.sln
- name: Upload Build Artifacts
if: matrix.configuration == 'Release' && matrix.platform == 'x64'
uses: actions/upload-artifact@v3
with:
name: uuu.exe
path: msvc/x64/Release/uuu.exe
- name: Create or Update Release
if: matrix.configuration == 'Release' && matrix.platform == 'x64' && github.ref_type == 'tag'
uses: ncipollo/release-action@v1
with:
name: Release ${{ github.ref_name }}
tag: ${{ github.ref_name }}
commit: ${{ github.sha }}
allowUpdates: true
prerelease: true
artifacts: msvc/x64/Release/uuu.exe
- name: Build dynamic solution
run: msbuild /p:Configuration=${{ matrix.configuration }} /p:PlatformToolset=v143 /p:Platform=${{ matrix.platform }} msvc/uuu.sln
mfgtools-uuu_1.5.182/.gitignore 0000664 0000000 0000000 00000000210 14621413137 0016403 0 ustar 00root root 0000000 0000000 Debug
Release
gitversion.h
*.user
.vs
CMakeFiles
*.cmake
*.swp
*.a
*.so
uuu/uuu
Makefile
CMakeCache.txt
*.clst
*.snap
node_modules
build mfgtools-uuu_1.5.182/.gitmodules 0000664 0000000 0000000 00000000636 14621413137 0016604 0 ustar 00root root 0000000 0000000 [submodule "libusb"]
path = libusb
url = https://github.com/libusb/libusb.git
[submodule "zlib"]
path = zlib
url = https://github.com/madler/zlib.git
[submodule "bzip2"]
path = bzip2
url = git://sourceware.org/git/bzip2.git
[submodule "zstd"]
path = zstd
url = https://github.com/facebook/zstd.git
[submodule "tinyxml2"]
path = tinyxml2
url = https://github.com/leethomason/tinyxml2.git
branch = master
mfgtools-uuu_1.5.182/.travis.yml 0000664 0000000 0000000 00000001311 14621413137 0016527 0 ustar 00root root 0000000 0000000 language: c++
matrix:
include:
- os: osx
osx_image: xcode9.4
compiler: clang
- os: osx
osx_image: xcode9.4
compiler: gcc
- os: osx
osx_image: xcode10.1
compiler: clang
- os: osx
osx_image: xcode10.1
compiler: gcc
- os: osx
osx_image: xcode11.6
compiler: clang
- os: osx
osx_image: xcode11.6
compiler: gcc
addons:
homebrew:
update: true
packages:
- cmake
- libusb
- openssl
- pkg-config
script:
- cmake -DOPENSSL_ROOT_DIR=$(brew --prefix)/opt/openssl . && make
mfgtools-uuu_1.5.182/CMakeLists.txt 0000664 0000000 0000000 00000002020 14621413137 0017154 0 ustar 00root root 0000000 0000000 cmake_minimum_required(VERSION 3.4)
project(uuu)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_SKIP_RPATH ON)
option(BUILD_DOC "Build documentation" OFF)
add_subdirectory(libuuu)
add_subdirectory(uuu)
if (BUILD_DOC)
# check if Doxygen is installed
find_package(Doxygen)
if (DOXYGEN_FOUND)
# set input and output files
set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in)
set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
# request to configure the file
configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
message("Doxygen build started")
# note the option ALL which allows to build the docs together with the application
add_custom_target( doc_doxygen ALL
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating documentation with Doxygen"
VERBATIM )
else (DOXYGEN_FOUND)
message("Doxygen need to be installed to generate the doxygen documentation")
endif (DOXYGEN_FOUND)
endif (BUILD_DOC)
mfgtools-uuu_1.5.182/Doxyfile.in 0000664 0000000 0000000 00000001034 14621413137 0016533 0 ustar 00root root 0000000 0000000 PROJECT_NAME = "uuu"
PROJECT_BRIEF = "uuu (Universal Update Utility), mfgtools 3.0"
DOXYFILE_ENCODING = UTF-8
OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@/docs/
INPUT = @CMAKE_CURRENT_SOURCE_DIR@/uuu/ @CMAKE_CURRENT_SOURCE_DIR@/libuuu/
RECURSIVE = YES
EXTRACT_ALL = YES
EXTRACT_PRIVATE = YES
EXTRACT_PACKAGE = YES
EXTRACT_STATIC = YES
EXTRACT_LOCAL_CLASSES = YES
EXTRACT_LOCAL_METHODS = YES
CALL_GRAPH = YES
CALLER_GRAPH = YES
mfgtools-uuu_1.5.182/LICENSE 0000664 0000000 0000000 00000002676 14621413137 0015442 0 ustar 00root root 0000000 0000000 Copyright 2018 NXP.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
Neither the name of the Freescale Semiconductor nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
mfgtools-uuu_1.5.182/README.md 0000664 0000000 0000000 00000011414 14621413137 0015702 0 ustar 00root root 0000000 0000000 # uuu (Universal Update Utility), mfgtools 3.0
[](https://github.com/nxp-imx/mfgtools/actions/workflows/macOS.yaml)
[](https://github.com/nxp-imx/mfgtools/actions/workflows/win.yaml)
[](https://github.com/nxp-imx/mfgtools/actions/workflows/build.yaml)

[](https://snapcraft.io/universal-update-utility)
Freescale/NXP I.MX Chip image deploy tools.
**original linux version uses "linux" branch, windows version uses "windows" branch**
uuu (universal update utility) for nxp imx chips -- libuuu-1.0.1-gffd9837
Succeded:0 Failed:3 Wait for Known USB Devices to Appear...
1:11 5/5 [ ] SDP: jump -f u-boot-dtb.imx -ivtinitramf....
2:1 1/5 [===> ] SDP: boot -f u-boot-imx7dsabresd_sd.imx ....
# Key features
- The real cross platform. Linux, Windows, MacOS(not test yet)
- Multi devices program support
- Daemon mode support
- Few dependencies (only libusb, zlibc, libbz2)
- Firmware (uboot/kernel) uses WCID to auto load the winusb driver on the Windows side. Windows7 users need to install the winusb driver from https://zadig.akeo.ie/ Windows10 will install the driver automatically.
# Examples:
```
uuu u-boot.imx Download u-boot.imx via HID device
uuu list.uu Run all the commands in list.uu
uuu -s Enter shell mode. Input command.
uuu -v u-boot.imx verbose mode
uuu -d u-boot.imx Once it detects the attachment of a known device, download boot.imx.
u-boot.imx can be replaced, new file will be download once board reset.
Do not unplug the SD card, write to the SD card, nor plug in a SD card when debugging uboot.
uuu -b emmc u-boot.imx write u-boot.imx to emmc boot partition. u-boot.imx need enable fastboot
uuu -b emmc_all wic.zst decompress wic.zst file and download the whole image into emmc
```
# Prebuilt Image and pdf document
The prebuilt image and document are here:
- https://github.com/nxp-imx/mfgtools/releases
- **ubuntu 22.04, 'apt-get install uuu'**
- UUU.pdf is snapshot of [wiki](https://github.com/nxp-imx/mfgtools/wiki)
# How to Build:
## Windows
- `git clone --recurse-submodules https://github.com/nxp-imx/mfgtools.git`
- `cd mfgtools`
- `open msvs/uuu.sln with Visual Studio 2017`
Visual Studio
Note that, since uuu is an OSI compliant Open Source project, you are entitled to download and use the freely available Visual Studio Community Edition to build, run or develop for uuu. As per the Visual Studio Community Edition license this applies regardless of whether you are an individual or a corporate user.
## Linux
- `git clone https://github.com/nxp-imx/mfgtools.git`
- `cd mfgtools`
- `sudo apt-get install libusb-1.0-0-dev libbz2-dev libzstd-dev pkg-config cmake libssl-dev g++ zlib1g-dev libtinyxml2-dev`
- `cmake . && make`
The above commands build mfgtools in source. To build it out of source
(requires cmake 3.13 or newer):
- `cmake -S . -B build`
- `cmake --build build --target all`
For cmake prior 3.13:
- `mkdir build && cd build`
- `cmake .. && make`
## macOS
- `git clone https://github.com/nxp-imx/mfgtools.git`
- `cd mfgtools`
- `brew install cmake libusb openssl pkg-config tinyxml2`
- `cmake -DOPENSSL_ROOT_DIR=$(brew --prefix)/opt/openssl . && make`
Note that we assume [brew](https://brew.sh) is installed and can be used to resolve dependencies as shown above. The remaining dependency `libbz2` can be resolved via the XCode supplied libraries.
Note if you meet "can't detach kernel driver" try to check libusb version.
```
brew info libusb
==> libusb: stable 1.0.26 (bottled), HEAD
```
# Run environment
- Windows 10 64 bit
- Linux (Ubuntu) 64 bit
- macOS (Catalina)
- 32 bit systems will have problems with big files.
# License
uuu is licensed under the BSD license. See LICENSE.
The BSD licensed prebuilt Windows binary version of uuu is statically linked with the LGPL libusb library, which remains LGPL.
- bzip2 (BSD license) is from https://github.com/enthought/bzip2-1.0.6
- zlib (zlib license) is from https://github.com/madler/zlib.git
- libusb (LGPL-2.1) is from https://github.com/libusb/libusb.git
- zstd (Dual BSD\GPLv2 Licenses) is from https://github.com/facebook/zstd
- tinyxml (zlib license) is from https://github.com/leethomason/tinyxml2
mfgtools-uuu_1.5.182/SCR-mfgtools.txt 0000664 0000000 0000000 00000003114 14621413137 0017441 0 ustar 00root root 0000000 0000000
Package: mfgtools.git
Version: 3
Outgoing License: BSD-3-Clause
License File: LICENSE
Type of Content: source
Description and comments: NXP I.MX Chip image deploy tools. Use uuu.
Release Location: https://github.com/NXPmicro/mfgtools -b master
Origin: NXP (BSD-3-clause)
zlib (zlib) - https://github.com/madler/zlib
libusb (LGPL-2.1) - https://github.com/libusb/libusb.git
Android Open Source Project (Apache-2.0) [sparse_format.h] - https://developer.android.com/
Generated Binary: uuu, uuu.exe, uuu_mac
Outgoing License: BSD-3-Clause
Description and comments: NXP I.MX Chip image deploy tools
Release Location: https://github.com/NXPmicro/mfgtools/releases
Origin: NXP (BSD-3-clause)
bzip2 (BSD-4-Clause) - https://github.com/enthought/bzip2-1.0.6
zlib (zlib) - https://github.com/madler/zlib
zstd (BSD-3-clause) - https://github.com/facebook/zstd
libusb (LGPL-2.1) - https://github.com/libusb/libusb.git
Android Open Source Project (Apache-2.0) [sparse_format.h] - https://developer.android.com/
snapcraft.yaml allows uuu to be built by snap (MIT) - https://snapcraft.io/
create-react-app (MIT) - https://github.com/facebook/create-react-app/
mfgtools-uuu_1.5.182/appveyor.yml 0000664 0000000 0000000 00000013320 14621413137 0017011 0 ustar 00root root 0000000 0000000 version: 1.5.{build}
image:
- Visual Studio 2019
- Visual Studio 2022
- Ubuntu1804
- macOS
configuration:
- Debug
- Release
platform:
- x86
- x64
init:
- sh: if [ "${CONFIGURATION}" = "Debug" ] ; then exit 0; fi
- sh: if [ "${PLATFORM}" = "x86" ]; then exit 0; fi
skip_tags: true
install:
- cmd: echo %APPVEYOR_BUILD_FOLDER%
- cmd: git submodule update --init
- cmd: cd %APPVEYOR_BUILD_FOLDER%\libusb
- cmd: cd ..
- sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" = "macOS" ]; then brew install libusb pkg-config zstd; fi
- sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" != "macOS" ]; then sudo apt-get update; fi
- sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" != "macOS" ]; then sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install libusb-1.0-0-dev libbz2-dev libzstd-dev asciidoc rename; fi
build_script:
# below powershell actions equals to retarget projects to newest SDK and tool v142 in visual studio 2019
- cmd: if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2019" (set PLATFORMTOOLSET=v142)
- cmd: if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2022" (set PLATFORMTOOLSET=v143)
- cmd: if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2019" (msbuild %APPVEYOR_BUILD_FOLDER%/msvc/uuu.sln /p:PlatformToolset=%PLATFORMTOOLSET% /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll")
#coverity tool is only available to visual studio 2017 imagine in appveyor
#- cmd: if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2017" (cov-build --dir cov-int msbuild %APPVEYOR_BUILD_FOLDER%/msvc/uuu.sln /p:PlatformToolset=%PLATFORMTOOLSET% /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll")
#- cmd: if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2017" (7z a -tzip mfg.zip cov-int)
#- cmd: if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2017" (curl --form token=%coverity_token% --form email=frank.li@nxp.com --form file=@mfg.zip --form version="automation test" --form description="testing coverity automation" https://scan.coverity.com/builds?project=NXPmicro%2Fmfgtools)
- cmd: git clean -dxf .
- cmd: msbuild %APPVEYOR_BUILD_FOLDER%/msvc/uuu-static-link.sln /p:PlatformToolset=%PLATFORMTOOLSET% /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
- cmd: if exist %APPVEYOR_BUILD_FOLDER%\msvc\x64\release\uuu.exe cp %APPVEYOR_BUILD_FOLDER%\msvc\x64\release\uuu.exe %APPVEYOR_BUILD_FOLDER%\uuu.exe
- sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" = "macOS" ]; then export PATH="/usr/local/Cellar/pkg-config/0.29.2_3/bin:${PATH}"; pkg-config --list-all; cmake -DOPENSSL_ROOT_DIR=$(brew --prefix)/opt/openssl; else cmake -D 'STATIC=1' .; fi
- sh: make
- sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" = "macOS" ]; then ls uuu; mv uuu/uuu uuu/uuu_mac; fi
- sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" != "macOS" ]; then git submodule init; fi
- sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" != "macOS" ]; then git submodule update; fi
- sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" != "macOS" ]; then git archive --prefix "uuu-${APPVEYOR_BUILD_VERSION}/" -o "uuu_source-${APPVEYOR_BUILD_VERSION}.tar" HEAD ; fi
- sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" != "macOS" ]; then git submodule foreach --recursive "git archive --prefix=uuu-${APPVEYOR_BUILD_VERSION}/\$path/ --output=\$sha1.tar HEAD && tar --concatenate --file=$(pwd)/uuu_source-${APPVEYOR_BUILD_VERSION}.tar \$sha1.tar && rm \$sha1.tar" ; fi
- sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" != "macOS" ]; then mkdir uuu-${APPVEYOR_BUILD_VERSION}; git describe --tags --long >uuu-${APPVEYOR_BUILD_VERSION}/.tarball-version ; fi
- sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" != "macOS" ]; then tar -r uuu-${APPVEYOR_BUILD_VERSION}/.tarball-version -f uuu_source-${APPVEYOR_BUILD_VERSION}.tar ; fi
- sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" != "macOS" ]; then gzip uuu_source-${APPVEYOR_BUILD_VERSION}.tar; fi
- sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" != "macOS" ]; then tar xzf uuu_source-${APPVEYOR_BUILD_VERSION}.tar.gz && zip uuu_source-${APPVEYOR_BUILD_VERSION}.zip $(tar tf uuu_source-${APPVEYOR_BUILD_VERSION}.tar.gz); fi
- sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" != "macOS" ]; then git clone https://github.com/NXPmicro/mfgtools.wiki.git; fi
- sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" != "macOS" ]; then cd mfgtools.wiki; fi
- sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" != "macOS" ]; then rename -f 's/\.asciidoc$//' *; fi
- sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" != "macOS" ]; then echo "" > UUU-docinfo.xml; fi
- sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" != "macOS" ]; then git log -n25 --reverse --format="format:%h%cd%an%s" >> UUU-docinfo.xml; fi
- sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" != "macOS" ]; then echo "" >> UUU-docinfo.xml; fi
- sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" != "macOS" ]; then a2x -L -a docinfo UUU; fi
- sh: if [ "${APPVEYOR_BUILD_WORKER_IMAGE}" = "macOS" ]; then pkg-config --cflags libzstd; fi
artifacts:
- path: uuu.exe
- path: uuu/uuu
- path: uuu/uuu_mac
- path: mfgtools.wiki/UUU.pdf
- path: uuu_source-${APPVEYOR_BUILD_VERSION}.tar.gz
- path: uuu_source-${APPVEYOR_BUILD_VERSION}.zip
before_deploy:
- cmd: ''
#deploy:
#- provider: GitHub
# description: prebuild for $(APPVEYOR_REPO_COMMIT) \n\n $(APPVEYOR_REPO_COMMIT_MESSAGE)
# auth_token:
# secure: SWWVkwSfPyVIaPChBBl+uAA3Fau9Rl5iNPQ9VRL8yyggXvc6wPcr/O9iXBMVM7Ju
# artifact: uuu.exe; uuu/uuu; uuu/uuu_mac; mfgtools.wiki/UUU.pdf; uuu_source-${APPVEYOR_BUILD_VERSION}.tar.gz; uuu_source-${APPVEYOR_BUILD_VERSION}.zip
# draft: true
environment:
coverity_token:
secure: 5VvyV4fYfI6xPsqaeDHvBamkUmmVNjZj0J5pLLQ6NCw=
mfgtools-uuu_1.5.182/bzip2/ 0000775 0000000 0000000 00000000000 14621413137 0015450 5 ustar 00root root 0000000 0000000 mfgtools-uuu_1.5.182/libusb/ 0000775 0000000 0000000 00000000000 14621413137 0015702 5 ustar 00root root 0000000 0000000 mfgtools-uuu_1.5.182/libuuu/ 0000775 0000000 0000000 00000000000 14621413137 0015727 5 ustar 00root root 0000000 0000000 mfgtools-uuu_1.5.182/libuuu/CMakeLists.txt 0000664 0000000 0000000 00000003141 14621413137 0020466 0 ustar 00root root 0000000 0000000 cmake_minimum_required(VERSION 3.4)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_SKIP_RPATH ON)
find_package(BZip2 REQUIRED)
find_package(PkgConfig REQUIRED)
pkg_check_modules(LIBUSB REQUIRED libusb-1.0>=1.0.16)
pkg_check_modules(LIBZSTD REQUIRED libzstd)
find_package(Threads)
pkg_check_modules(TINYXML2 REQUIRED tinyxml2)
if (STATIC)
set(OPENSSL_USE_STATIC_LIBS TRUE)
endif()
find_package(OpenSSL)
if(OPENSSL_FOUND)
set(UUUSSL "-DUUUSSL")
set(UUUOPENSLL_INCLUDE_DIR ${OPENSSL_INCLUDE_DIR})
endif()
include_directories(${LIBUSB_INCLUDE_DIRS} ${LIBZSTD_INCLUDE_DIRS} ${UUUOPENSLL_INCLUDE_DIR} ${TINYXML2_INCLUDE_DIRS} include)
if (FORCE_OLD)
set(FORCE_OLDLIBUSB "-DFORCE_OLDLIBUSB")
endif()
set(CMAKE_CXX_FLAGS_DEBUG "-g -Wall -Wstrict-aliasing -Wextra ${UUUSSL} ${FORCE_OLDLIBUSB}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${UUUSSL} ${FORCE_OLDLIBUSB}")
set(SOURCES
error.cpp
buffer.cpp
cmd.cpp
config.cpp
notify.cpp
sdps.cpp
trans.cpp
usbhotplug.cpp
version.cpp
sdp.cpp
gitversion.h
fastboot.cpp
zip.cpp
fat.cpp
tar.cpp
rominfo.cpp
http.cpp
hidreport.cpp
sparse.cpp
bmap.cpp
)
set(generated_files_dir "${CMAKE_BINARY_DIR}/libuuu/gen")
set(gitversion_h "${generated_files_dir}/gitversion.h")
add_custom_command(
OUTPUT gitversion.h
PRE_BUILD
COMMAND mkdir -p ${generated_files_dir}
COMMAND sh -c 'cd ${CMAKE_CURRENT_SOURCE_DIR} && rm -f ${gitversion_h} && ./gen_ver.sh "${gitversion_h}.tmp" && mv -f "${gitversion_h}.tmp" "${gitversion_h}"'
)
include_directories(${generated_files_dir})
#add_library( uuc SHARED ${SOURCES} ))
add_library( uuc_s STATIC ${SOURCES} )
mfgtools-uuu_1.5.182/libuuu/backfile.h 0000664 0000000 0000000 00000003243 14621413137 0017642 0 ustar 00root root 0000000 0000000 /*
* Copyright 2020 NXP.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* Neither the name of the NXP Semiconductor nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#pragma once
#include
class Backfile
{
public:
const std::string& get_filename() const noexcept { return m_filename; }
protected:
std::string m_filename;
};
mfgtools-uuu_1.5.182/libuuu/bmap.cpp 0000664 0000000 0000000 00000007266 14621413137 0017365 0 ustar 00root root 0000000 0000000 #include