├── wrapper
├── requirements.txt
├── requirements_dev.txt
├── triplets
│ └── x64-windows-sd.cmake
├── MANIFEST.in
├── tests
│ └── __init__.py
├── vcpkg.json
├── vcpkg-configuration.json
├── libuuu
│ └── __init__.py
├── CMakePresets.json
├── LICENSE
├── .gitignore
├── README.md
├── build_backend.py
├── CMakeLists.txt
└── pyproject.toml
├── snap
├── hooks
│ ├── post-refresh
│ └── configure
├── gui
│ └── universal-update-utility.png
├── local
│ ├── screenshots
│ │ └── carbon-help.png
│ ├── bash-completion
│ │ └── universal-update-utility
│ ├── LICENSE
│ └── launchers
│ │ └── universal-update-utility-launch
└── snapcraft.yaml
├── webusb
├── public
│ ├── robots.txt
│ ├── manifest.json
│ └── index.html
├── src
│ ├── images
│ │ └── imx8qxp_mek_bootmode.png
│ ├── setupTests.js
│ ├── App.test.js
│ ├── index.css
│ ├── reportWebVitals.js
│ ├── components
│ │ ├── Combined.css
│ │ ├── ProgressBar.js
│ │ └── Combined.js
│ ├── index.js
│ ├── App.css
│ ├── logic
│ │ ├── usePopup.js
│ │ ├── usePopupContent.js
│ │ └── useHIDBoot.js
│ ├── helper
│ │ ├── functions.js
│ │ └── sparse.js
│ └── App.js
├── package.json
└── README.md
├── uuu
├── gen_txt_include.sh
├── fat_write.lst
├── spl_boot.lst
├── sd_burn_loader.lst
├── emmc_burn_loader.lst
├── nvme_burn_all.lst
├── fspinand_burn_loader.lst
├── sd_burn_all.lst
├── nand_burn_loader.lst
├── emmc_burn_all.lst
├── qspi_burn_loader.lst
├── CMakeLists.txt
├── buildincmd.h
└── uuu.lst
├── .gitignore
├── libusb.prop
├── msvc
├── createversion.bat
├── tinyxml2.vcxproj.filters
├── libuuu.filters
├── uuu.vcxproj.filters
├── bzip2.vcxproj.filters
├── zlib.vcxproj.filters
└── libuuu.vcxproj.filters
├── .gitmodules
├── Doxyfile.in
├── libuuu
├── gen_ver.sh
├── bmap.h
├── liberror.h
├── backfile.h
├── CMakeLists.txt
├── sparse.h
├── sdps.h
├── http.h
├── config.h
├── sparse_format.h
├── tar.h
├── version.cpp
├── error.cpp
├── notify.cpp
├── hidreport.h
├── rominfo.h
├── fat.h
├── hidreport.cpp
├── trans.h
├── tar.cpp
├── bmap.cpp
├── ffu_format.h
├── libcomm.h
└── zip.h
├── .travis.yml
├── .github
├── scripts
│ ├── common_functions.sh
│ ├── build_macos.sh
│ ├── build_linux.sh
│ └── build_windows.bat
└── workflows
│ ├── doc.yaml
│ ├── build.yaml
│ ├── build_old_ubuntu.yaml
│ ├── win.yaml
│ ├── tar.yaml
│ ├── macOS.yaml
│ └── build_arm.yaml
├── CMakeLists.txt
├── LICENSE
├── SCR-mfgtools.txt
├── SBOM.spdx.json
└── README.md
/wrapper/requirements.txt:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/snap/hooks/post-refresh:
--------------------------------------------------------------------------------
1 | #!/bin/sh -e
2 |
3 |
--------------------------------------------------------------------------------
/webusb/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/uuu/gen_txt_include.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | echo "R\"####(" > $2
4 | cat $1 >> $2
5 | echo ")####\"" >> $2
6 |
--------------------------------------------------------------------------------
/snap/gui/universal-update-utility.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nxp-imx/mfgtools/HEAD/snap/gui/universal-update-utility.png
--------------------------------------------------------------------------------
/snap/local/screenshots/carbon-help.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nxp-imx/mfgtools/HEAD/snap/local/screenshots/carbon-help.png
--------------------------------------------------------------------------------
/wrapper/requirements_dev.txt:
--------------------------------------------------------------------------------
1 | # package management
2 | build
3 | bump-my-version
4 | twine
5 | # code quality
6 | nxp-codecheck
--------------------------------------------------------------------------------
/webusb/src/images/imx8qxp_mek_bootmode.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nxp-imx/mfgtools/HEAD/webusb/src/images/imx8qxp_mek_bootmode.png
--------------------------------------------------------------------------------
/wrapper/triplets/x64-windows-sd.cmake:
--------------------------------------------------------------------------------
1 | set(VCPKG_TARGET_ARCHITECTURE x64)
2 | set(VCPKG_CRT_LINKAGE static)
3 | set(VCPKG_LIBRARY_LINKAGE static)
4 |
5 |
--------------------------------------------------------------------------------
/snap/local/bash-completion/universal-update-utility:
--------------------------------------------------------------------------------
1 | _uuu_autocomplete()
2 | {
3 | COMPREPLY=($(uuu $1 $2 $3))
4 | }
5 | complete -o nospace -F _uuu_autocomplete uuu
6 |
--------------------------------------------------------------------------------
/wrapper/MANIFEST.in:
--------------------------------------------------------------------------------
1 | include requirements*
2 |
3 | recursive-include libuuu *
4 | include build_backend.py
5 |
6 | recursive-exclude * __pycache__
7 | recursive-exclude * *.py[co]
8 |
9 |
--------------------------------------------------------------------------------
/wrapper/tests/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: UTF-8 -*-
3 | ## Copyright 2025 NXP
4 | #
5 | # SPDX-License-Identifier: BSD-3-Clause
6 |
7 | """Unit test package for libuuu wrapper."""
8 |
--------------------------------------------------------------------------------
/wrapper/vcpkg.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": [
3 | "libusb",
4 | "tinyxml2",
5 | "bzip2",
6 | "zstd",
7 | "zlib",
8 | "openssl"
9 | ]
10 | }
11 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | Debug
2 | Release
3 | gitversion.h
4 | *.user
5 | .vs
6 | CMakeFiles
7 | *.cmake
8 | *.swp
9 | *.a
10 | *.so
11 | uuu/uuu
12 | Makefile
13 | CMakeCache.txt
14 | *.clst
15 | *.snap
16 | node_modules
17 | build
--------------------------------------------------------------------------------
/webusb/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | ],
6 | "start_url": ".",
7 | "display": "standalone",
8 | "theme_color": "#000000",
9 | "background_color": "#ffffff"
10 | }
11 |
--------------------------------------------------------------------------------
/webusb/src/setupTests.js:
--------------------------------------------------------------------------------
1 | // jest-dom adds custom jest matchers for asserting on DOM nodes.
2 | // allows you to do things like:
3 | // expect(element).toHaveTextContent(/react/i)
4 | // learn more: https://github.com/testing-library/jest-dom
5 | import '@testing-library/jest-dom';
6 |
--------------------------------------------------------------------------------
/libusb.prop:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Level3
5 | false
6 |
7 |
8 |
--------------------------------------------------------------------------------
/webusb/src/App.test.js:
--------------------------------------------------------------------------------
1 | import { render, screen } from '@testing-library/react';
2 | import App from './App';
3 |
4 | test('renders learn react link', () => {
5 | render();
6 | const linkElement = screen.getByText(/learn react/i);
7 | expect(linkElement).toBeInTheDocument();
8 | });
9 |
--------------------------------------------------------------------------------
/webusb/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
5 | sans-serif;
6 | -webkit-font-smoothing: antialiased;
7 | -moz-osx-font-smoothing: grayscale;
8 | }
9 |
10 | code {
11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
12 | monospace;
13 | }
14 |
--------------------------------------------------------------------------------
/wrapper/vcpkg-configuration.json:
--------------------------------------------------------------------------------
1 | {
2 | "default-registry": {
3 | "kind": "git",
4 | "baseline": "47bf3d1ac192b3fa0feb6e6ac9c845de179eebe9",
5 | "repository": "https://github.com/microsoft/vcpkg"
6 | },
7 | "registries": [
8 | {
9 | "kind": "artifact",
10 | "location": "https://github.com/microsoft/vcpkg-ce-catalog/archive/refs/heads/main.zip",
11 | "name": "microsoft"
12 | }
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/webusb/src/reportWebVitals.js:
--------------------------------------------------------------------------------
1 | const reportWebVitals = onPerfEntry => {
2 | if (onPerfEntry && onPerfEntry instanceof Function) {
3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
4 | getCLS(onPerfEntry);
5 | getFID(onPerfEntry);
6 | getFCP(onPerfEntry);
7 | getLCP(onPerfEntry);
8 | getTTFB(onPerfEntry);
9 | });
10 | }
11 | };
12 |
13 | export default reportWebVitals;
14 |
--------------------------------------------------------------------------------
/msvc/createversion.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 |
3 | call git --version
4 | IF ERRORLEVEL 1 (
5 | echo build from tarball
6 | ) ELSE (
7 | IF "%APPVEYOR_BUILD_VERSION%" == "" (
8 | echo build not from appveryor
9 | ) ELSE (
10 | git tag -m "uuu %APPVEYOR_BUILD_VERSION%" uuu_%APPVEYOR_BUILD_VERSION%
11 | )
12 |
13 | FOR /F "tokens=*" %%a in ('call git describe --long') do (
14 | echo #define GIT_VERSION "lib%%a" > %1/gitversion.h
15 | )
16 | )
17 |
--------------------------------------------------------------------------------
/wrapper/libuuu/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: UTF-8 -*-
3 | #
4 | # Copyright 2024-2025 NXP
5 | #
6 | # SPDX-License-Identifier: BSD-3-Clause
7 |
8 | """Wrapper for libuuu."""
9 |
10 | from .__version__ import __version__ as version
11 | from .libuuu import LibUUU, UUUNotifyCallback, UUUShowConfig, UUUState
12 |
13 | __author__ = """NXP"""
14 | __version__ = version
15 | __all__ = ["LibUUU", "UUUNotifyCallback", "UUUShowConfig", "UUUState"]
16 |
--------------------------------------------------------------------------------
/webusb/src/components/Combined.css:
--------------------------------------------------------------------------------
1 | .checkbox-container {
2 | width: 1rem;
3 | }
4 |
5 | .checkbox {
6 | margin:0;
7 | padding-right: 1rem;
8 | }
9 |
10 | .boot-image {
11 | width:100%;
12 | height:auto;
13 | border-radius: 50%;
14 | }
15 |
16 | .Popup-list {
17 | margin:0;
18 | padding-left: 1rem;
19 | list-style-position: outside;
20 | list-style-type: none;
21 | }
22 |
23 | .image-container {
24 | width: 8rem;
25 | height: 8rem;
26 | }
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "libusb"]
2 | path = libusb
3 | url = https://github.com/libusb/libusb.git
4 | [submodule "zlib"]
5 | path = zlib
6 | url = https://github.com/madler/zlib.git
7 | [submodule "bzip2"]
8 | path = bzip2
9 | url = git://sourceware.org/git/bzip2.git
10 | [submodule "zstd"]
11 | path = zstd
12 | url = https://github.com/facebook/zstd.git
13 | [submodule "tinyxml2"]
14 | path = tinyxml2
15 | url = https://github.com/leethomason/tinyxml2.git
16 | branch = master
17 |
--------------------------------------------------------------------------------
/uuu/fat_write.lst:
--------------------------------------------------------------------------------
1 | uuu_version 1.1.4
2 |
3 | # @_image | image, which cp to fat partition
4 | # @_device | storage device, mmc\sata
5 | # @_partition | fat partition number, like 1:1
6 | # @_filename [_image] | file name in target fat partition, only support rootdir now
7 |
8 | FB: ucmd setenv fastboot_buffer ${loadaddr}
9 | FB: download -f _image
10 | FB: ucmd if test ! -n "$fastboot_bytes"; then setenv fastboot_bytes $filesize; else true; fi
11 | FB[-t 20000]: ucmd fatwrite _device _partition ${fastboot_buffer} _filename ${fastboot_bytes}
12 | FB: done
13 |
--------------------------------------------------------------------------------
/Doxyfile.in:
--------------------------------------------------------------------------------
1 | PROJECT_NAME = "uuu"
2 | PROJECT_BRIEF = "uuu (Universal Update Utility), mfgtools 3.0"
3 | DOXYFILE_ENCODING = UTF-8
4 |
5 | OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@/docs/
6 | INPUT = @CMAKE_CURRENT_SOURCE_DIR@/uuu/ @CMAKE_CURRENT_SOURCE_DIR@/libuuu/
7 | RECURSIVE = YES
8 |
9 | EXTRACT_ALL = YES
10 | EXTRACT_PRIVATE = YES
11 | EXTRACT_PACKAGE = YES
12 | EXTRACT_STATIC = YES
13 | EXTRACT_LOCAL_CLASSES = YES
14 | EXTRACT_LOCAL_METHODS = YES
15 |
16 | CALL_GRAPH = YES
17 | CALLER_GRAPH = YES
18 |
--------------------------------------------------------------------------------
/webusb/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom/client';
3 | import './index.css';
4 | import App from './App';
5 | import reportWebVitals from './reportWebVitals';
6 |
7 | const root = ReactDOM.createRoot(document.getElementById('root'));
8 | root.render(
9 |
10 |
11 |
12 | );
13 |
14 | // If you want to start measuring performance in your app, pass a function
15 | // to log results (for example: reportWebVitals(console.log))
16 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
17 | reportWebVitals();
18 |
--------------------------------------------------------------------------------
/uuu/spl_boot.lst:
--------------------------------------------------------------------------------
1 | uuu_version 1.2.39
2 |
3 | # This command will be run when i.MX6/7 i.MX8MM, i.MX8MQ
4 | SDP: boot -f _flash.bin
5 |
6 | # This command will be run when ROM support stream mode
7 | # i.MX8QXP, i.MX8QM
8 | SDPS[-t 10000]: boot -f _flash.bin
9 |
10 | # These commands will be run when use SPL and will be skipped if no spl
11 | # SDPU will be deprecated. please use SDPV instead of SDPU
12 | # {
13 | SDPU: delay 1000
14 | SDPU: write -f _flash.bin -offset 0x57c00
15 | SDPU: jump
16 | SDPU: done
17 | # }
18 |
19 | # These commands will be run when use SPL and will be skipped if no spl
20 | # if (SPL support SDPV)
21 | # {
22 | SDPV: delay 1000
23 | SDPV: write -f _flash.bin -skipspl
24 | SDPV: jump
25 | SDPV: done
26 | # }
27 |
--------------------------------------------------------------------------------
/libuuu/gen_ver.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Input parameters
4 | file_to_write="$1"
5 |
6 | set -e
7 |
8 | if [ -f ../.tarball-version ]
9 | then
10 | echo "#define GIT_VERSION \"lib$(cat ../.tarball-version)\"" > "$file_to_write"
11 | exit 0
12 | fi
13 |
14 | if [ "${APPVEYOR_BUILD_VERSION}" = "" ];
15 | then
16 | echo build not in appveyor
17 | else
18 | git tag -m"uuu ${APPVEYOR_BUILD_VERSION}" uuu_${APPVEYOR_BUILD_VERSION}
19 | fi
20 |
21 | # Test if we are in a repo
22 | if [ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ];
23 | then
24 | #echo "In a repo"
25 | # Get the version of the last commit of the repo
26 | version=`git describe --long`
27 | echo "#define GIT_VERSION \"lib$version\"" > $file_to_write
28 | fi
29 |
--------------------------------------------------------------------------------
/wrapper/CMakePresets.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 2,
3 | "configurePresets": [
4 | {
5 | "name": "default",
6 | "hidden": true,
7 | "binaryDir": "${sourceDir}/build",
8 | "cacheVariables": {
9 | "CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
10 | "VCPKG_OVERLAY_TRIPLETS": "${sourceDir}/triplets"
11 | }
12 | },
13 | {
14 | "name": "windows",
15 | "generator": "Visual Studio 17 2022",
16 | "inherits": [ "default" ],
17 | "cacheVariables": {
18 | "VCPKG_TARGET_TRIPLET": "x64-windows-sd",
19 | "CMAKE_CXX_VERSION": "19.42"
20 | }
21 | },
22 | {
23 | "name": "unix",
24 | "generator": "Ninja",
25 | "inherits": [ "default" ]
26 | }
27 | ]
28 | }
29 |
--------------------------------------------------------------------------------
/snap/hooks/configure:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Configure hook to set up configuration when `snap set` is called
3 | #
4 | # Copyright (c) 2021 Snapcrafters
5 |
6 | # lint: The use of backticks in the printf messages is intended
7 | # shellcheck disable=SC2016
8 |
9 | set \
10 | -o errexit \
11 | -o errtrace \
12 | -o nounset \
13 | -o pipefail
14 |
15 | disable_snap_confinement_warnings="$(snapctl get disable-snap-confinement-warnings)"
16 |
17 | if test -n "${disable_snap_confinement_warnings}"; then
18 | if [[ ! "${disable_snap_confinement_warnings}" =~ (false|true) ]]; then
19 | printf -- \
20 | 'Error: disable-snap-confinement-warnings must be either `true` or `false`.\n' \
21 | 1>&2
22 | exit 1
23 | fi
24 | else
25 | snapctl set disable-snap-confinement-warnings=false
26 | fi
27 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: c++
2 |
3 | matrix:
4 | include:
5 |
6 | - os: osx
7 | osx_image: xcode9.4
8 | compiler: clang
9 |
10 | - os: osx
11 | osx_image: xcode9.4
12 | compiler: gcc
13 |
14 | - os: osx
15 | osx_image: xcode10.1
16 | compiler: clang
17 |
18 | - os: osx
19 | osx_image: xcode10.1
20 | compiler: gcc
21 |
22 | - os: osx
23 | osx_image: xcode11.6
24 | compiler: clang
25 |
26 | - os: osx
27 | osx_image: xcode11.6
28 | compiler: gcc
29 |
30 | addons:
31 | homebrew:
32 | update: true
33 | packages:
34 | - cmake
35 | - libusb
36 | - openssl
37 | - pkg-config
38 |
39 | script:
40 | - cmake -DOPENSSL_ROOT_DIR=$(brew --prefix)/opt/openssl . && make
41 |
--------------------------------------------------------------------------------
/.github/scripts/common_functions.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | log_and_run() {
4 | echo "[INFO] $1"
5 | shift
6 | "$@"
7 | }
8 |
9 | dump_logs() {
10 | echo "=== DUMPING ALL AVAILABLE LOGS ==="
11 |
12 | # vcpkg logs
13 | if [ -d "/tmp/vcpkg/buildtrees" ]; then
14 | find /tmp/vcpkg/buildtrees -name "*.log" -print0 | while IFS= read -r -d '' logfile; do
15 | echo "=== LOG: $logfile ==="
16 | cat "$logfile" 2>/dev/null || echo "Could not read $logfile"
17 | echo "=== END LOG ==="
18 | done
19 | fi
20 |
21 | # Project build logs
22 | if [ -d "build" ]; then
23 | find build -name "*.log" -print0 | while IFS= read -r -d '' logfile; do
24 | echo "=== LOG: $logfile ==="
25 | cat "$logfile" 2>/dev/null || echo "Could not read $logfile"
26 | echo "=== END LOG ==="
27 | done
28 | fi
29 | }
30 |
--------------------------------------------------------------------------------
/msvc/tinyxml2.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
6 | h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd
7 |
8 |
9 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
10 | cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx
11 |
12 |
13 |
14 |
15 | Header Files
16 |
17 |
18 |
19 |
20 | Source Files
21 |
22 |
23 |
--------------------------------------------------------------------------------
/uuu/sd_burn_loader.lst:
--------------------------------------------------------------------------------
1 | uuu_version 1.2.39
2 |
3 | # @_flash.bin | bootloader
4 | # @_image [_flash.bin] | image burn to emmc, default is the same as bootloader
5 |
6 | # This command will be run when i.MX6/7 i.MX8MM, i.MX8MQ
7 | SDP: boot -f _flash.bin
8 |
9 | # This command will be run when ROM support stream mode
10 | # i.MX8QXP, i.MX8QM
11 | SDPS: boot -f _flash.bin
12 |
13 | # These commands will be run when use SPL and will be skipped if no spl
14 | # SDPU will be deprecated. please use SDPV instead of SDPU
15 | # {
16 | SDPU: delay 1000
17 | SDPU: write -f _flash.bin -offset 0x57c00
18 | SDPU: jump
19 | # }
20 |
21 | # These commands will be run when use SPL and will be skipped if no spl
22 | # if (SPL support SDPV)
23 | # {
24 | SDPV: delay 1000
25 | SDPV: write -f _flash.bin -skipspl
26 | SDPV: jump
27 | # }
28 |
29 | FB: ucmd setenv fastboot_dev mmc
30 | FB: ucmd setenv mmcdev ${sd_dev}
31 | FB: ucmd mmc dev ${sd_dev}
32 | FB: flash bootloader _image
33 | FB: Done
34 |
--------------------------------------------------------------------------------
/uuu/emmc_burn_loader.lst:
--------------------------------------------------------------------------------
1 | uuu_version 1.2.39
2 |
3 | # @_flash.bin | bootloader
4 | # @_image [_flash.bin] | image burn to emmc, default is the same as bootloader
5 |
6 | # This command will be run when i.MX6/7 i.MX8MM, i.MX8MQ
7 | SDP: boot -f _flash.bin
8 |
9 | # This command will be run when ROM support stream mode
10 | # i.MX8QXP, i.MX8QM
11 | SDPS: boot -f _flash.bin
12 |
13 | # These commands will be run when use SPL and will be skipped if no spl
14 | # SDPU will be deprecated. please use SDPV instead of SDPU
15 | # {
16 | SDPU: delay 1000
17 | SDPU: write -f _flash.bin -offset 0x57c00
18 | SDPU: jump
19 | # }
20 |
21 | # These commands will be run when use SPL and will be skipped if no spl
22 | # if (SPL support SDPV)
23 | # {
24 | SDPV: delay 1000
25 | SDPV: write -f _flash.bin -skipspl
26 | SDPV: jump
27 | # }
28 |
29 | FB: ucmd setenv fastboot_dev mmc
30 | FB: ucmd setenv mmcdev ${emmc_dev}
31 | FB: ucmd mmc dev ${emmc_dev}
32 | FB: flash bootloader _image
33 | FB: ucmd if env exists emmc_ack; then ; else setenv emmc_ack 0; fi;
34 | FB: ucmd mmc partconf ${emmc_dev} ${emmc_ack} 1 0
35 | FB: Done
36 |
--------------------------------------------------------------------------------
/webusb/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "client",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@testing-library/jest-dom": "^5.16.5",
7 | "@testing-library/react": "^13.4.0",
8 | "@testing-library/user-event": "^13.5.0",
9 | "eslint": "^8.48.0",
10 | "react": "^18.2.0",
11 | "react-dom": "^18.2.0",
12 | "react-scripts": "^5.0.1",
13 | "web-vitals": "^2.1.4",
14 | "@types/w3c-web-serial": "^1.0.3",
15 | "web-serial-polyfill": "^1.0.14",
16 | "xterm": "^5.2.1",
17 | "xterm-addon-fit": "^0.7.0",
18 | "xterm-addon-web-links": "^0.8.0"
19 | },
20 | "scripts": {
21 | "start": "react-scripts start",
22 | "build": "react-scripts build",
23 | "test": "react-scripts test",
24 | "eject": "react-scripts eject"
25 | },
26 | "browserslist": {
27 | "production": [
28 | ">0.2%",
29 | "not dead",
30 | "not op_mini all"
31 | ],
32 | "development": [
33 | "last 1 chrome version",
34 | "last 1 firefox version",
35 | "last 1 safari version"
36 | ]
37 | },
38 | "homepage": "/webuuu/"
39 | }
40 |
--------------------------------------------------------------------------------
/snap/local/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 Snapcrafters
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/uuu/nvme_burn_all.lst:
--------------------------------------------------------------------------------
1 | uuu_version 1.4.149
2 |
3 | # @_flash.bin | bootloader, which can extract from wic image
4 | # @_image [_flash.bin] | wic image burn to emmc.
5 |
6 |
7 | # This command will be run when i.MX6/7 i.MX8MM, i.MX8MQ
8 | SDP: boot -f _flash.bin -scanlimited 0x800000
9 |
10 | # This command will be run when ROM support stream mode
11 | # i.MX8QXP, i.MX8QM
12 | SDPS: boot -scanterm -f _flash.bin -scanlimited 0x800000
13 |
14 | # These commands will be run when use SPL and will be skipped if no spl
15 | # SDPU will be deprecated. please use SDPV instead of SDPU
16 | # {
17 | SDPU: delay 1000
18 | SDPU: write -f _flash.bin -offset 0x57c00
19 | SDPU: jump -scanlimited 0x800000
20 | # }
21 |
22 | # These commands will be run when use SPL and will be skipped if no spl
23 | # if (SPL support SDPV)
24 | # {
25 | SDPV: delay 1000
26 | SDPV: write -f _flash.bin -skipspl -scanterm -scanlimited 0x800000
27 | SDPV: jump -scanlimited 0x800000
28 | # }
29 |
30 | FB: ucmd pci
31 | FB: ucmd nvme scan
32 | FB: ucmd setenv fastboot_buffer ${loadaddr}
33 | FB: write -format "nvme write ${fastboot_buffer} @off @size" -blksz 512 -f _image
34 | FB: done
35 |
--------------------------------------------------------------------------------
/webusb/src/components/ProgressBar.js:
--------------------------------------------------------------------------------
1 | import {useEffect, useState} from 'react';
2 |
3 | const ProgressBar = (props) => {
4 | const [soFar, setSoFar] = useState();
5 | const [total, setTotal] = useState();
6 |
7 | const Parentdiv = {
8 | height: 20,
9 | width: '100%',
10 | backgroundColor: 'whitesmoke',
11 | }
12 |
13 | const Childdiv = {
14 | height: '100%',
15 | width: `${total? soFar/total*100: 0}%`,
16 | backgroundColor: 'green',
17 | textAlign: 'right'
18 | }
19 |
20 | useEffect(()=> {
21 | setTotal(props.total);
22 | setSoFar(props.soFar);
23 | }, [props])
24 |
25 | return(
26 |
27 |
33 | {
34 | soFar&&total?
35 | (soFar===total? "Done":
36 |
{soFar} out of {total} bytes downloaded):""
37 | }
38 |
39 | )
40 | }
41 |
42 | export default ProgressBar
--------------------------------------------------------------------------------
/uuu/fspinand_burn_loader.lst:
--------------------------------------------------------------------------------
1 | uuu_version 1.2.39
2 |
3 | # @_flexspi.bin | bootloader
4 | # @_image [_flexspi.bin] | image burn to fspinand, default is the same as bootloader
5 |
6 | # This command will be run when i.MX6/7 i.MX8MM, i.MX8MQ
7 | SDP: boot -f _flexspi.bin
8 |
9 | # This command will be run when ROM support stream mode
10 | # i.MX8QXP, i.MX8QM, skip QSPI header
11 | SDPS: boot -f _flexspi.bin -skipfhdr
12 |
13 | # These commands will be run when use SPL and will be skipped if no spl
14 | # SDPU will be deprecated. please use SDPV instead of SDPU
15 | # {
16 | SDPU: delay 1000
17 | SDPU: write -f _flexspi.bin -offset 0x10000 -skipfhdr
18 | SDPU: jump
19 | # }
20 |
21 | # These commands will be run when use SPL and will be skipped if no spl
22 | # if (SPL support SDPV)
23 | # {
24 | SDPV: delay 1000
25 | SDPV: write -f _flexspi.bin -skipspl -skipfhdr
26 | SDPV: jump
27 | # }
28 |
29 | FB: ucmd setenv fastboot_buffer ${loadaddr}
30 | FB: download -f _image
31 |
32 | FB: ucmd if test ! -n "$fastboot_bytes"; then setenv fastboot_bytes $filesize; else true; fi
33 |
34 | FB[-t 60000]: ucmd fspinand init spi-nand0 ${fastboot_buffer} ${fastboot_bytes}
35 |
36 | FB: done
37 |
--------------------------------------------------------------------------------
/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.5)
2 |
3 | project(uuu)
4 |
5 | set(CMAKE_CXX_STANDARD 14)
6 | set(CMAKE_CXX_STANDARD_REQUIRED ON)
7 | set(CMAKE_SKIP_RPATH ON)
8 |
9 | option(BUILD_DOC "Build documentation" OFF)
10 |
11 | add_subdirectory(libuuu)
12 | add_subdirectory(uuu)
13 |
14 | if (BUILD_DOC)
15 | # check if Doxygen is installed
16 | find_package(Doxygen)
17 | if (DOXYGEN_FOUND)
18 | # set input and output files
19 | set(DOXYGEN_IN ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in)
20 | set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
21 |
22 | # request to configure the file
23 | configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
24 | message("Doxygen build started")
25 |
26 | # note the option ALL which allows to build the docs together with the application
27 | add_custom_target( doc_doxygen ALL
28 | COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
29 | WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
30 | COMMENT "Generating documentation with Doxygen"
31 | VERBATIM )
32 | else (DOXYGEN_FOUND)
33 | message("Doxygen need to be installed to generate the doxygen documentation")
34 | endif (DOXYGEN_FOUND)
35 | endif (BUILD_DOC)
36 |
--------------------------------------------------------------------------------
/uuu/sd_burn_all.lst:
--------------------------------------------------------------------------------
1 | uuu_version 1.4.149
2 |
3 | # @_flash.bin | bootloader, which can extract from wic image
4 | # @_image [_flash.bin] | wic image burn to emmc.
5 |
6 |
7 | # This command will be run when i.MX6/7 i.MX8MM, i.MX8MQ
8 | SDP: boot -f _flash.bin -scanlimited 0x800000
9 |
10 | # This command will be run when ROM support stream mode
11 | # i.MX8QXP, i.MX8QM
12 | SDPS: boot -scanterm -f _flash.bin -scanlimited 0x800000
13 |
14 | # These commands will be run when use SPL and will be skipped if no spl
15 | # SDPU will be deprecated. please use SDPV instead of SDPU
16 | # {
17 | SDPU: delay 1000
18 | SDPU: write -f _flash.bin -offset 0x57c00 -scanlimited 0x800000
19 | SDPU: jump -scanlimited 0x800000
20 | # }
21 |
22 | # These commands will be run when use SPL and will be skipped if no spl
23 | # if (SPL support SDPV)
24 | # {
25 | SDPV: delay 1000
26 | SDPV: write -f _flash.bin -skipspl -scanterm -scanlimited 0x800000
27 | SDPV: jump -scanlimited 0x800000
28 | # }
29 |
30 | FB: ucmd setenv fastboot_dev mmc
31 | FB: ucmd setenv mmcdev ${sd_dev}
32 | FB: ucmd mmc dev ${sd_dev}
33 | FB: flash -raw2sparse all _image
34 | FB: flash -scanterm -scanlimited 0x800000 bootloader _flash.bin
35 | FB: done
36 |
--------------------------------------------------------------------------------
/msvc/libuuu.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hh;hpp;hxx;hm;inl;inc;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |
16 |
17 |
18 |
19 | Header Files
20 |
21 |
22 | Header Files
23 |
24 |
25 |
26 |
27 | Source Files
28 |
29 |
30 |
--------------------------------------------------------------------------------
/uuu/nand_burn_loader.lst:
--------------------------------------------------------------------------------
1 | uuu_version 1.2.39
2 |
3 | # @_flash.bin | bootloader
4 | # @_image [_flash.bin] | image burn to nand, default is the same as bootloader
5 |
6 | # This command will be run when i.MX6/7 i.MX8MM, i.MX8MQ
7 | SDP: boot -f _flash.bin
8 |
9 | # This command will be run when ROM support stream mode
10 | # i.MX8QXP, i.MX8QM
11 | SDPS: boot -f _flash.bin
12 |
13 | # These commands will be run when use SPL and will be skipped if no spl
14 | # SDPU will be deprecated. please use SDPV instead of SDPU
15 | # {
16 | SDPU: delay 1000
17 | SDPU: write -f _flash.bin -offset 0x57c00
18 | SDPU: jump
19 | # }
20 |
21 | # These commands will be run when use SPL and will be skipped if no spl
22 | # if (SPL support SDPV)
23 | # {
24 | SDPV: delay 1000
25 | SDPV: write -f _flash.bin -skipspl
26 | SDPV: jump
27 | # }
28 |
29 | FB: ucmd setenv fastboot_buffer ${loadaddr}
30 | FB: download -f _image
31 | FB: ucmd if test ! -n "$fastboot_bytes"; then setenv fastboot_bytes $filesize; else true; fi
32 | # Burn image to nandfit partition if needed
33 | FB: ucmd if env exists nandfit_part; then nand erase.part nandfit; nand write ${fastboot_buffer} nandfit ${fastboot_bytes}; else true; fi;
34 | FB: ucmd nandbcb init ${fastboot_buffer} nandboot ${fastboot_bytes}
35 | FB: Done
36 |
--------------------------------------------------------------------------------
/uuu/emmc_burn_all.lst:
--------------------------------------------------------------------------------
1 | uuu_version 1.4.149
2 |
3 | # @_flash.bin | bootloader, which can extract from wic image
4 | # @_image [_flash.bin] | wic image burn to emmc.
5 |
6 |
7 | # This command will be run when i.MX6/7 i.MX8MM, i.MX8MQ
8 | SDP: boot -f _flash.bin -scanlimited 0x800000
9 |
10 | # This command will be run when ROM support stream mode
11 | # i.MX8QXP, i.MX8QM
12 | SDPS: boot -scanterm -f _flash.bin -scanlimited 0x800000
13 |
14 | # These commands will be run when use SPL and will be skipped if no spl
15 | # SDPU will be deprecated. please use SDPV instead of SDPU
16 | # {
17 | SDPU: delay 1000
18 | SDPU: write -f _flash.bin -offset 0x57c00
19 | SDPU: jump -scanlimited 0x800000
20 | # }
21 |
22 | # These commands will be run when use SPL and will be skipped if no spl
23 | # if (SPL support SDPV)
24 | # {
25 | SDPV: delay 1000
26 | SDPV: write -f _flash.bin -skipspl -scanterm -scanlimited 0x800000
27 | SDPV: jump -scanlimited 0x800000
28 | # }
29 |
30 |
31 | FB: ucmd setenv fastboot_dev mmc
32 | FB: ucmd setenv mmcdev ${emmc_dev}
33 | FB: ucmd mmc dev ${emmc_dev}
34 | FB: flash -raw2sparse all _image
35 | FB: flash -scanterm -scanlimited 0x800000 bootloader _flash.bin
36 | FB: ucmd if env exists emmc_ack; then ; else setenv emmc_ack 0; fi;
37 | FB: ucmd mmc partconf ${emmc_dev} ${emmc_ack} 1 0
38 | FB: done
39 |
--------------------------------------------------------------------------------
/msvc/uuu.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hh;hpp;hxx;hm;inl;inc;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |
16 |
17 |
18 |
19 | Source Files
20 |
21 |
22 | Source Files
23 |
24 |
25 | Source Files
26 |
27 |
28 |
29 |
30 | Header Files
31 |
32 |
33 |
--------------------------------------------------------------------------------
/.github/scripts/build_macos.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -euo pipefail
3 |
4 | ARCH="${1:-x86_64}"
5 |
6 | # Source common functions (same dump_logs function)
7 | source "$(dirname "$0")/common_functions.sh"
8 |
9 | main() {
10 | log_and_run "Installing pytest" \
11 | python -m pip install pytest
12 |
13 | # Install build dependencies
14 | log_and_run "Installing build dependencies" \
15 | brew install ninja cmake autoconf automake libtool
16 |
17 | export PROJECT_DIR=$(pwd)
18 |
19 | # Setup vcpkg
20 | log_and_run "Setting up vcpkg" setup_vcpkg
21 |
22 | # Build libuuu
23 | log_and_run "Building libuuu for $ARCH" build_libuuu "$ARCH"
24 |
25 | # Copy artifacts
26 | log_and_run "Copying artifacts" copy_artifacts "$ARCH"
27 | }
28 |
29 | setup_vcpkg() {
30 | cd /tmp
31 | git clone https://github.com/microsoft/vcpkg.git
32 | cd vcpkg
33 | ./bootstrap-vcpkg.sh || {
34 | echo "VCPKG BOOTSTRAP FAILED"
35 | dump_logs
36 | exit 1
37 | }
38 | export VCPKG_ROOT=/tmp/vcpkg
39 | export PATH=$VCPKG_ROOT:$PATH
40 | cd "$PROJECT_DIR/wrapper"
41 | }
42 |
43 | build_libuuu() {
44 | local arch="$1"
45 | cmake --preset=unix -DCMAKE_OSX_ARCHITECTURES="$arch"
46 | cmake --build build
47 | }
48 |
49 | copy_artifacts() {
50 | local arch="$1"
51 | mkdir -p "libuuu/lib/darwin/$arch/"
52 | cp build/libuuu.dylib "libuuu/lib/darwin/$arch/"
53 | }
54 |
55 | main "$@"
56 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2018 NXP.
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without modification,
5 | are permitted provided that the following conditions are met:
6 |
7 | Redistributions of source code must retain the above copyright notice, this
8 | list of conditions and the following disclaimer.
9 |
10 | Redistributions in binary form must reproduce the above copyright notice, this
11 | list of conditions and the following disclaimer in the documentation and/or
12 | other materials provided with the distribution.
13 |
14 | Neither the name of the Freescale Semiconductor nor the names of its
15 | contributors may be used to endorse or promote products derived from this
16 | software without specific prior written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 | POSSIBILITY OF SUCH DAMAGE.
29 |
30 |
31 |
--------------------------------------------------------------------------------
/wrapper/LICENSE:
--------------------------------------------------------------------------------
1 |
2 |
3 | BSD License
4 |
5 | Copyright (c) 2024, NXP
6 | All rights reserved.
7 |
8 | Redistribution and use in source and binary forms, with or without modification,
9 | are permitted provided that the following conditions are met:
10 |
11 | * Redistributions of source code must retain the above copyright notice, this
12 | list of conditions and the following disclaimer.
13 |
14 | * Redistributions in binary form must reproduce the above copyright notice, this
15 | list of conditions and the following disclaimer in the documentation and/or
16 | other materials provided with the distribution.
17 |
18 | * Neither the name of the copyright holder nor the names of its
19 | contributors may be used to endorse or promote products derived from this
20 | software without specific prior written permission.
21 |
22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
23 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
24 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
26 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
29 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
30 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
31 | OF THE POSSIBILITY OF SUCH DAMAGE.
32 |
33 |
--------------------------------------------------------------------------------
/webusb/src/App.css:
--------------------------------------------------------------------------------
1 | /* SplitLayout.css */
2 | .split-layout {
3 | display: flex; /* Use Flexbox */
4 | justify-content: space-between; /* Space between the columns */
5 | align-items: stretch; /* Stretch columns to match height */
6 |
7 | }
8 |
9 | .left-column, .right-column {
10 | flex: 1; /* Equal width for both columns */
11 | padding: 20px; /* Add padding to the columns */
12 | }
13 |
14 | .u-flex {
15 | display: flex;
16 | }
17 |
18 | .u-row {
19 | flex-direction: row;
20 | padding-bottom: 1rem;
21 | }
22 | .u-column {
23 | flex-direction: column;
24 | }
25 |
26 | .u-row-reverse {
27 | flex-direction: row-reverse;
28 | }
29 |
30 | .u-space-between {
31 | justify-content: space-between;
32 | }
33 |
34 | .u-center {
35 | justify-content: center;
36 | }
37 |
38 | .u-inline-block {
39 | display: inline-block;
40 | }
41 |
42 | .link-container{
43 | display: inline-block;
44 | width : 8rem;
45 | }
46 |
47 | .popup-loc {
48 | position: relative;
49 | }
50 |
51 | .popup-container {
52 | background-color: white;
53 | position: absolute;
54 | display: inline-block;
55 |
56 | border: thin black solid;
57 | border-radius: 4px;
58 |
59 | padding: 1rem;
60 | width: 24rem;
61 | }
62 |
63 | .popup-container li {
64 | padding-bottom: 1rem;
65 | }
66 |
67 | .popup-button {
68 | width:2rem
69 | }
70 |
71 | .input {
72 | display: none;
73 | }
74 |
75 | .custom-file-upload {
76 | border: thin black solid;
77 | border-radius: 4px;
78 | cursor: pointer;
79 | }
80 |
81 | .file-name {
82 | display: inline-block;
83 | width: 32rem;
84 | }
85 |
--------------------------------------------------------------------------------
/.github/scripts/build_linux.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -euo pipefail
3 |
4 | ARCH="${1:-x86_64}"
5 |
6 | # Source common functions (same dump_logs function)
7 | source "$(dirname "$0")/common_functions.sh"
8 |
9 | main() {
10 | log_and_run "Installing pytest" \
11 | python -m pip install pytest
12 |
13 | # Install build dependencies
14 | log_and_run "Installing build dependencies" \
15 | yum install -y git cmake3 ninja-build gcc-c++ libudev-devel \
16 | autoconf automake libtool curl zip unzip tar \
17 | perl-core kernel-headers make
18 |
19 | # Setup vcpkg
20 | log_and_run "Setting up vcpkg" setup_vcpkg
21 |
22 | # Build libuuu
23 | log_and_run "Building libuuu" build_libuuu
24 |
25 | # Copy artifacts
26 | log_and_run "Copying artifacts" copy_artifacts "$ARCH"
27 | }
28 |
29 | setup_vcpkg() {
30 | cd /tmp
31 | git clone https://github.com/microsoft/vcpkg.git
32 | cd vcpkg
33 | ./bootstrap-vcpkg.sh || {
34 | echo "VCPKG BOOTSTRAP FAILED"
35 | dump_logs
36 | exit 1
37 | }
38 | export VCPKG_ROOT=/tmp/vcpkg
39 | export PATH=$VCPKG_ROOT:$PATH
40 | cd /project/wrapper
41 | }
42 |
43 | build_libuuu() {
44 | cmake --preset=unix
45 | cmake --build build
46 | }
47 |
48 | copy_artifacts() {
49 | local arch="$1"
50 | mkdir -p "libuuu/lib/linux/$arch/"
51 | cp build/libuuu.so "libuuu/lib/linux/$arch/"
52 | mkdir -p "/output/libuuu/lib/linux/$arch/"
53 | cp build/libuuu.so "/output/libuuu/lib/linux/$arch/"
54 | echo "[INFO] Copied libuuu.so to /output/libuuu/lib/linux/$arch/"
55 | }
56 |
57 | main "$@"
58 |
--------------------------------------------------------------------------------
/SCR-mfgtools.txt:
--------------------------------------------------------------------------------
1 |
2 | Package: mfgtools.git
3 | Version: 3
4 | Outgoing License: BSD-3-Clause
5 | License File: LICENSE
6 | Type of Content: source
7 | Description and comments: NXP I.MX Chip image deploy tools. Use uuu.
8 | Release Location: https://github.com/NXPmicro/mfgtools -b master
9 | Origin: NXP (BSD-3-clause)
10 | zlib (zlib) - https://github.com/madler/zlib
11 | libusb (LGPL-2.1) - https://github.com/libusb/libusb.git
12 | Android Open Source Project (Apache-2.0) [sparse_format.h] - https://developer.android.com/
13 |
14 | Generated Binary: uuu, uuu.exe, uuu_mac
15 | Outgoing License: BSD-3-Clause
16 | Description and comments: NXP I.MX Chip image deploy tools
17 | Release Location: https://github.com/NXPmicro/mfgtools/releases
18 | Origin: NXP (BSD-3-clause)
19 | bzip2 (BSD-4-Clause) - https://github.com/enthought/bzip2-1.0.6
20 | zlib (zlib) - https://github.com/madler/zlib
21 | zstd (BSD-3-clause) - https://github.com/facebook/zstd
22 | libusb (LGPL-2.1) - https://github.com/libusb/libusb.git
23 | Android Open Source Project (Apache-2.0) [sparse_format.h] - https://developer.android.com/
24 | snapcraft.yaml allows uuu to be built by snap (MIT) - https://snapcraft.io/
25 | create-react-app (MIT) - https://github.com/facebook/create-react-app/
26 |
--------------------------------------------------------------------------------
/.github/workflows/doc.yaml:
--------------------------------------------------------------------------------
1 | name: Build pdf document
2 |
3 | on:
4 | push:
5 | branches:
6 | - master
7 | tags:
8 | - uuu*
9 | pull_request:
10 | types:
11 | - opened
12 | - synchronize
13 |
14 | jobs:
15 | build:
16 | name: Build for pdf
17 | runs-on: ubuntu-latest
18 |
19 | steps:
20 | - name: Checkout repository
21 | uses: actions/checkout@v3
22 | with:
23 | fetch-depth: 0
24 | repository: nxp-imx/mfgtools.wiki.git
25 | path: wiki
26 | ref: master
27 |
28 | - name: Set up environment
29 | run: |
30 | sudo apt-get update
31 | sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install asciidoc rename
32 |
33 | - name: Build
34 | run: |
35 | cd wiki
36 | rename -f 's/\.asciidoc$//' *
37 | echo "" > UUU-docinfo.xml
38 | git log -n25 --reverse --format="format:%h%cd%an%s" >> UUU-docinfo.xml
39 | echo "" >> UUU-docinfo.xml
40 | a2x -L -a docinfo UUU
41 |
42 | - name: Upload Build Artifacts
43 | uses: actions/upload-artifact@v4
44 | with:
45 | name: UUU.pdf
46 | path: wiki/UUU.pdf
47 |
48 | - name: Create or Update Release
49 | if: github.ref_type == 'tag'
50 | uses: ncipollo/release-action@v1
51 | with:
52 | name: Release ${{ github.ref_name }}
53 | tag: ${{ github.ref_name }}
54 | commit: ${{ github.sha }}
55 | allowUpdates: true
56 | prerelease: true
57 | artifacts: "wiki/UUU.pdf"
58 |
--------------------------------------------------------------------------------
/.github/workflows/build.yaml:
--------------------------------------------------------------------------------
1 | name: Build for x64 ubuntu
2 |
3 | on:
4 | push:
5 | branches:
6 | - master
7 | tags:
8 | - uuu*
9 | pull_request:
10 | types:
11 | - opened
12 | - synchronize
13 |
14 | jobs:
15 | build:
16 | name: Build for x64 ubuntu
17 | runs-on: ${{ matrix.os }}
18 | strategy:
19 | matrix:
20 | os:
21 | - ubuntu-22.04
22 | - ubuntu-24.04
23 |
24 | steps:
25 | - name: Checkout repository
26 | uses: actions/checkout@v3
27 | with:
28 | fetch-depth: 0
29 |
30 | - name: Set up environment
31 | run: sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install libusb-1.0-0-dev libbz2-dev libzstd-dev libtinyxml2-dev
32 |
33 | - name: Build
34 | run: |
35 | git fetch --tags --force # Retrieve annotated tags. #issue 290
36 | if [ "${{ matrix.os }}" == "ubuntu-22.04" ]; then git submodule update --init tinyxml2; cd tinyxml2; cmake .; make; cd ..; fi;
37 | if [ "${{ matrix.os }}" == "ubuntu-22.04" ]; then cmake -D 'STATIC=1' -D 'FORCE_OLD=on' . ; else cmake .; fi;
38 | make
39 |
40 | - name: Upload Build Artifacts
41 | if: matrix.os == 'ubuntu-22.04'
42 | uses: actions/upload-artifact@v4
43 | with:
44 | name: uuu
45 | path: ./uuu/uuu
46 |
47 | - name: Create or Update Release
48 | if: matrix.os == 'ubuntu-22.04' && github.ref_type == 'tag'
49 | uses: ncipollo/release-action@v1
50 | with:
51 | name: Release ${{ github.ref_name }}
52 | tag: ${{ github.ref_name }}
53 | commit: ${{ github.sha }}
54 | allowUpdates: true
55 | prerelease: true
56 | artifacts: "./uuu/uuu"
57 |
--------------------------------------------------------------------------------
/libuuu/bmap.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 |
6 | struct bmap_t {
7 | using bmap_type = std::vector>;
8 |
9 | bmap_t() = default;
10 | // fully mapped image
11 | bmap_t(size_t img_size, size_t blk_size = 4096)
12 | : m_img_size(img_size),
13 | m_blk_size(blk_size),
14 | m_blk_count(default_blocks_count(img_size, blk_size))
15 | {
16 | set_mapped_range(0, m_blk_count - 1);
17 | }
18 |
19 | bmap_t& set_image_size(size_t size) {
20 | m_img_size = size;
21 | return *this;
22 | }
23 |
24 | bmap_t& set_block_size(size_t size = 4096) {
25 | m_blk_size = size;
26 | return *this;
27 | }
28 |
29 | bmap_t& set_blocks_count(size_t size = 0) {
30 | if (size)
31 | m_blk_count = size;
32 | else
33 | m_blk_count = default_blocks_count(m_img_size, m_blk_size);
34 | return *this;
35 | }
36 |
37 | bmap_t& set_mapped_range(size_t begin, size_t end) {
38 | m_blk_map.emplace_back(begin, end);
39 | return *this;
40 | }
41 |
42 | static size_t default_blocks_count(size_t img_size, size_t blk_size) {
43 | return img_size / blk_size + (img_size % blk_size ? 1 : 0);
44 | }
45 |
46 | size_t image_size() const { return m_img_size; }
47 | size_t block_size() const { return m_blk_size; }
48 | size_t blocks_count() const { return m_blk_count; }
49 |
50 | const bmap_type& mapped_ranges() const { return m_blk_map; }
51 |
52 | bool is_mapped_block(size_t index) const;
53 |
54 | private:
55 | size_t m_img_size = 0;
56 | size_t m_blk_size = 4096;
57 | size_t m_blk_count = 0;
58 | bmap_type m_blk_map;
59 | mutable bool m_gap_set = false;
60 | mutable size_t m_gap_begin = 0;
61 | mutable size_t m_gap_end = 0;
62 | mutable size_t m_next_gap_begin = 0;
63 | };
64 |
65 | int load_bmap(const std::string& filename, bmap_t& bmap);
66 |
--------------------------------------------------------------------------------
/libuuu/liberror.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 NXP.
3 | *
4 | * Redistribution and use in source and binary forms, with or without modification,
5 | * are permitted provided that the following conditions are met:
6 | *
7 | * Redistributions of source code must retain the above copyright notice, this
8 | * list of conditions and the following disclaimer.
9 | *
10 | * Redistributions in binary form must reproduce the above copyright notice, this
11 | * list of conditions and the following disclaimer in the documentation and/or
12 | * other materials provided with the distribution.
13 | *
14 | * Neither the name of the NXP Semiconductor nor the names of its
15 | * contributors may be used to endorse or promote products derived from this
16 | * software without specific prior written permission.
17 | *
18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 | * POSSIBILITY OF SUCH DAMAGE.
29 | *
30 | */
31 |
32 | #pragma once
33 |
34 | #include
35 |
36 | void set_last_err_string(const std::string &str);
37 | void set_last_err_id(int id);
38 |
39 | #define ERR_OUT_MEMORY -2
40 | #define ERR_ACCESS_DENIED -3
41 |
--------------------------------------------------------------------------------
/.github/workflows/build_old_ubuntu.yaml:
--------------------------------------------------------------------------------
1 | name: Build for old ubuntu
2 |
3 | on:
4 | push:
5 | branches:
6 | - master
7 | tags:
8 | - uuu*
9 | pull_request:
10 | types:
11 | - opened
12 | - synchronize
13 |
14 | jobs:
15 | build:
16 | name: Build with Ubuntu 20.04 Docker
17 | runs-on: ubuntu-latest
18 |
19 | steps:
20 | - name: Checkout repository
21 | uses: actions/checkout@v3
22 | with:
23 | fetch-depth: 0
24 |
25 | - name: Build
26 | run: |
27 | git fetch --tags --force # Retrieve annotated tags. #issue 290
28 | git submodule update --init tinyxml2;
29 |
30 | docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace -e DEBIAN_FRONTEND=noninteractive -e TZ=UTC ubuntu:20.04 bash -c "
31 | apt-get update &&
32 | apt-get --yes --force-yes install libusb-1.0-0-dev libbz2-dev libzstd-dev pkg-config cmake libssl-dev g++ zlib1g-dev git libtinyxml2-dev
33 | git config --global --add safe.directory /workspace &&
34 | cd tinyxml2 && cmake . && make && cd .. &&
35 | cmake -D 'STATIC=1' -D 'FORCE_OLD=on' . && make"
36 |
37 | - name: Copy
38 | run: |
39 | cp ./uuu/uuu ./uuu/uuu-ubuntu20.04
40 |
41 | - name: Upload Build Artifacts
42 | uses: actions/upload-artifact@v4
43 | with:
44 | name: uuu-ubuntu-20.04
45 | path: ./uuu/uuu-ubuntu20.04
46 |
47 | - name: Create or Update Release
48 | uses: ncipollo/release-action@v1
49 | with:
50 | name: Release ${{ github.ref_name }}
51 | tag: ${{ github.ref_name }}
52 | commit: ${{ github.sha }}
53 | allowUpdates: true
54 | prerelease: true
55 | artifacts: "./uuu/uuu-ubuntu20.04"
56 |
--------------------------------------------------------------------------------
/libuuu/backfile.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 NXP.
3 | *
4 | * Redistribution and use in source and binary forms, with or without modification,
5 | * are permitted provided that the following conditions are met:
6 | *
7 | * Redistributions of source code must retain the above copyright notice, this
8 | * list of conditions and the following disclaimer.
9 | *
10 | * Redistributions in binary form must reproduce the above copyright notice, this
11 | * list of conditions and the following disclaimer in the documentation and/or
12 | * other materials provided with the distribution.
13 | *
14 | * Neither the name of the NXP Semiconductor nor the names of its
15 | * contributors may be used to endorse or promote products derived from this
16 | * software without specific prior written permission.
17 | *
18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 | * POSSIBILITY OF SUCH DAMAGE.
29 | *
30 | */
31 |
32 | #pragma once
33 |
34 | #include
35 |
36 | class Backfile
37 | {
38 | public:
39 | const std::string& get_filename() const noexcept { return m_filename; }
40 |
41 | protected:
42 | std::string m_filename;
43 | };
44 |
--------------------------------------------------------------------------------
/wrapper/.gitignore:
--------------------------------------------------------------------------------
1 | # Byte-compiled / optimized / DLL files
2 | __pycache__/
3 | *.py[cod]
4 | *$py.class
5 |
6 | # C extensions
7 | *.so
8 | *.dll
9 |
10 | # Generated files
11 | libuuu/__version__.py
12 |
13 | # Distribution / packaging
14 | outputs/
15 | .Python
16 | env/
17 | build/
18 | develop-eggs/
19 | dist/
20 | downloads/
21 | eggs/
22 | .eggs/
23 | lib/
24 | lib64/
25 | parts/
26 | sdist/
27 | var/
28 | wheels/
29 | *.egg-info/
30 | .installed.cfg
31 | *.egg
32 |
33 | # PyInstaller
34 | # Usually these files are written by a python script from a template
35 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
36 | *.manifest
37 | *.spec
38 |
39 | # Installer logs
40 | pip-log.txt
41 | pip-delete-this-directory.txt
42 |
43 | # Unit test / coverage reports
44 | htmlcov/
45 | .tox/
46 | .coverage
47 | .coverage.*
48 | .cache
49 | nosetests.xml
50 | coverage.xml
51 | *.cover
52 | .hypothesis/
53 | .pytest_cache/
54 | reports
55 |
56 | # Translations
57 | *.mo
58 | *.pot
59 |
60 | # Django stuff:
61 | *.log
62 | local_settings.py
63 |
64 | # Flask stuff:
65 | instance/
66 | .webassets-cache
67 |
68 | # Scrapy stuff:
69 | .scrapy
70 |
71 | # Sphinx documentation
72 | docs/_build/
73 |
74 | # PyBuilder
75 | target/
76 |
77 | # Jupyter Notebook
78 | .ipynb_checkpoints
79 |
80 | # pyenv
81 | .python-version
82 |
83 | # celery beat schedule file
84 | celerybeat-schedule
85 |
86 | # SageMath parsed files
87 | *.sage.py
88 |
89 | # dotenv
90 | .env
91 |
92 | # virtualenv
93 | .venv
94 | venv/
95 | ENV/
96 |
97 | # Spyder project settings
98 | .spyderproject
99 | .spyproject
100 |
101 | # Rope project settings
102 | .ropeproject
103 |
104 | # mkdocs documentation
105 | /site
106 |
107 | # mypy
108 | .mypy_cache/
109 |
110 | # IDE settings
111 | .vscode/
112 |
--------------------------------------------------------------------------------
/webusb/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
12 |
13 |
17 |
18 |
27 | React App
28 |
29 |
30 |
31 |
32 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/.github/workflows/win.yaml:
--------------------------------------------------------------------------------
1 | name: Build with VS Studio
2 |
3 | on:
4 | push:
5 | branches:
6 | - master
7 | tags:
8 | - uuu*
9 | pull_request:
10 | types:
11 | - opened
12 | - synchronize
13 |
14 | jobs:
15 | build:
16 | runs-on: windows-2022
17 |
18 | strategy:
19 | matrix:
20 | configuration: ['Debug', 'Release']
21 | platform: ['x86', 'x64']
22 |
23 | steps:
24 | - name: Checkout code
25 | uses: actions/checkout@v3
26 | with:
27 | fetch-depth: 0
28 | submodules: true
29 |
30 | - name: Set up Visual Studio
31 | uses: microsoft/setup-msbuild@v1.1
32 |
33 | - name: Build static solution
34 | run: |
35 | git fetch --tags --force # Retrieve annotated tags. #issue 290
36 | msbuild /p:Configuration=${{ matrix.configuration }} /p:PlatformToolset=v143 /p:Platform=${{ matrix.platform }} /p:ForceImportBeforeCppTargets=${{ github.workspace }}/libusb.prop msvc/uuu-static-link.sln
37 |
38 | - name: Upload Build Artifacts
39 | if: matrix.configuration == 'Release' && matrix.platform == 'x64'
40 | uses: actions/upload-artifact@v4
41 | with:
42 | name: uuu.exe
43 | path: msvc/x64/Release/uuu.exe
44 |
45 | - name: Create or Update Release
46 | if: matrix.configuration == 'Release' && matrix.platform == 'x64' && github.ref_type == 'tag'
47 | uses: ncipollo/release-action@v1
48 | with:
49 | name: Release ${{ github.ref_name }}
50 | tag: ${{ github.ref_name }}
51 | commit: ${{ github.sha }}
52 | allowUpdates: true
53 | prerelease: true
54 | artifacts: msvc/x64/Release/uuu.exe
55 |
56 | - name: Build dynamic solution
57 | run: msbuild /p:Configuration=${{ matrix.configuration }} /p:PlatformToolset=v143 /p:Platform=${{ matrix.platform }} /p:ForceImportBeforeCppTargets=${{ github.workspace }}/libusb.prop msvc/uuu.sln
58 |
--------------------------------------------------------------------------------
/libuuu/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.5)
2 |
3 | set(CMAKE_CXX_STANDARD 14)
4 | set(CMAKE_CXX_STANDARD_REQUIRED ON)
5 | set(CMAKE_SKIP_RPATH ON)
6 |
7 | find_package(BZip2 REQUIRED)
8 | find_package(PkgConfig REQUIRED)
9 | pkg_check_modules(LIBUSB REQUIRED libusb-1.0>=1.0.16)
10 | pkg_check_modules(LIBZSTD REQUIRED libzstd)
11 | find_package(Threads)
12 | pkg_check_modules(TINYXML2 REQUIRED tinyxml2)
13 |
14 | if (STATIC)
15 | set(OPENSSL_USE_STATIC_LIBS TRUE)
16 | endif()
17 |
18 | find_package(OpenSSL)
19 |
20 | if(OPENSSL_FOUND)
21 | set(UUUSSL "-DUUUSSL")
22 | set(UUUOPENSLL_INCLUDE_DIR ${OPENSSL_INCLUDE_DIR})
23 | endif()
24 |
25 | include_directories(${LIBUSB_INCLUDE_DIRS} ${LIBZSTD_INCLUDE_DIRS} ${UUUOPENSLL_INCLUDE_DIR} ${TINYXML2_INCLUDE_DIRS} include)
26 |
27 |
28 | if (FORCE_OLD)
29 | set(FORCE_OLDLIBUSB "-DFORCE_OLDLIBUSB")
30 | endif()
31 |
32 | set(CMAKE_CXX_FLAGS_DEBUG "-g -Wall -Wstrict-aliasing -Wextra ${UUUSSL} ${FORCE_OLDLIBUSB}")
33 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${UUUSSL} ${FORCE_OLDLIBUSB}")
34 |
35 | set(SOURCES
36 | error.cpp
37 | buffer.cpp
38 | cmd.cpp
39 | config.cpp
40 | notify.cpp
41 | sdps.cpp
42 | trans.cpp
43 | usbhotplug.cpp
44 | version.cpp
45 | sdp.cpp
46 | gitversion.h
47 | fastboot.cpp
48 | zip.cpp
49 | fat.cpp
50 | tar.cpp
51 | rominfo.cpp
52 | http.cpp
53 | hidreport.cpp
54 | sparse.cpp
55 | bmap.cpp
56 | )
57 |
58 | set(generated_files_dir "${CMAKE_BINARY_DIR}/libuuu/gen")
59 | set(gitversion_h "${generated_files_dir}/gitversion.h")
60 |
61 | add_custom_command(
62 | OUTPUT gitversion.h
63 | PRE_BUILD
64 | COMMAND mkdir -p ${generated_files_dir}
65 | 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}"'
66 |
67 | )
68 | include_directories(${generated_files_dir})
69 |
70 | #add_library( uuc SHARED ${SOURCES} ))
71 | add_library( uuc_s STATIC ${SOURCES} )
72 |
--------------------------------------------------------------------------------
/.github/workflows/tar.yaml:
--------------------------------------------------------------------------------
1 | name: Create source package
2 |
3 | on:
4 | push:
5 | branches:
6 | - master
7 | tags:
8 | - uuu*
9 | pull_request:
10 | types:
11 | - opened
12 | - synchronize
13 |
14 | jobs:
15 | build:
16 | name: Create source package
17 | runs-on: ubuntu-latest
18 |
19 | steps:
20 | - name: Checkout repository
21 | uses: actions/checkout@v3
22 | with:
23 | fetch-depth: 0
24 | submodules: true
25 |
26 | - name: Build
27 | run: |
28 | git archive --prefix "uuu-${{ github.ref_name }}/" -o "uuu_source-${{ github.ref_name }}.tar" HEAD ;
29 | 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"
30 | mkdir uuu-${{ github.ref_name }}; git describe --tags --long >uuu-${{ github.ref_name }}/.tarball-version
31 | tar -r uuu-${{ github.ref_name }}/.tarball-version -f uuu_source-${{ github.ref_name }}.tar
32 | gzip uuu_source-${{ github.ref_name }}.tar
33 | 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)
34 |
35 | - name: Upload Build Artifacts
36 | uses: actions/upload-artifact@v4
37 | with:
38 | name: uuu_source-${{ github.ref_name }}.tar.gz
39 | path: uuu_source-${{ github.ref_name }}.tar.gz
40 |
41 | - name: Create or Update Release
42 | if: github.ref_type == 'tag'
43 | uses: ncipollo/release-action@v1
44 | with:
45 | name: Release ${{ github.ref_name }}
46 | tag: ${{ github.ref_name }}
47 | commit: ${{ github.sha }}
48 | allowUpdates: true
49 | prerelease: true
50 | artifacts: "uuu_source-${{ github.ref_name }}.tar.gz, uuu_source-${{ github.ref_name }}.zip"
51 |
--------------------------------------------------------------------------------
/.github/workflows/macOS.yaml:
--------------------------------------------------------------------------------
1 | name: macOS Build
2 |
3 | on:
4 | push:
5 | branches:
6 | - master
7 | tags:
8 | - uuu*
9 | pull_request:
10 | types:
11 | - opened
12 | - synchronize
13 |
14 | jobs:
15 | build:
16 | name: macOS Build
17 | runs-on: ${{ matrix.os }}
18 | strategy:
19 | matrix:
20 | os:
21 | - macos-15
22 | - macos-14-intel
23 |
24 | steps:
25 | - name: Checkout repository
26 | uses: actions/checkout@v3
27 | with:
28 | fetch-depth: 0
29 |
30 | - name: Set up environment
31 | run: brew install libusb pkg-config zstd tinyxml2
32 |
33 | - name: Build
34 | run: |
35 | git fetch --tags --force # Retrieve annotated tags. #issue 290
36 | 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
37 |
38 | - name: Rename_x86
39 | if: matrix.os == 'macos-14-intel'
40 | run: cp uuu/uuu uuu_mac_x86
41 |
42 | - name: Rename_arm
43 | if: matrix.os == 'macos-15'
44 | run: cp uuu/uuu uuu_mac_arm
45 |
46 | - name: Upload Build Artifacts
47 | if: matrix.os == 'macos-14-intel'
48 | uses: actions/upload-artifact@v4
49 | with:
50 | name: uuu_mac_x86
51 | path: uuu_mac_x86
52 |
53 | - name: Upload Build Artifacts
54 | if: matrix.os == 'macos-15'
55 | uses: actions/upload-artifact@v4
56 | with:
57 | name: uuu_mac_arm
58 | path: uuu_mac_arm
59 |
60 | - name: Create or Update Release
61 | if: github.ref_type == 'tag'
62 | uses: ncipollo/release-action@v1
63 | with:
64 | name: Release ${{ github.ref_name }}
65 | tag: ${{ github.ref_name }}
66 | commit: ${{ github.sha }}
67 | allowUpdates: true
68 | prerelease: true
69 | artifacts: "uuu_mac_*"
70 |
--------------------------------------------------------------------------------
/wrapper/README.md:
--------------------------------------------------------------------------------
1 | # libuuu
2 |
3 | A python wrapper for `libuuu`.
4 |
5 | Supported Python versions: 3.9 or newer.
6 |
7 | ## Manual Build and Installation
8 |
9 | To build the project you first need to build libuuu dynamic libraries for your
10 | operating system, or download them. In this section, manual build is described.
11 |
12 | ### Building libraries
13 |
14 | We first install `vcpkg` which is a C++ library manager for Windows, Linux, and MacOS. Then we set some necessary environment variables, how you set them depends on your operating system, but it is basically the same.
15 |
16 | #### Linux & MacOS
17 | > Downloading vcpkg and setting up environment variables
18 | ```bash
19 | git clone https://github.com/microsoft/vcpkg.git
20 | cd vcpkg
21 | export VCPKG_ROOT=$(pwd)
22 | export PATH=$VCPKG_ROOT:$PATH
23 | ./bootstrap-vcpkg.sh
24 | ```
25 |
26 | > Dependencies on Linux (Ubuntu)
27 | ```bash
28 | sudo apt-get install gcc cmake ninja-build autotools-dev automake autoconf libudev-dev
29 | ```
30 | > Dependencies on MacOS
31 | ```bash
32 | brew install ninja cmake autoconf automake libtool
33 | ```
34 | > Build
35 | ```bash
36 | cd ../wrapper
37 | cmake --preset=unix #Needs to have vcpkg in PATH & VCPKG_ROOT set.
38 | cmake --build build
39 | ```
40 |
41 | #### Windows
42 | > Downloading vcpkg and setting up environment variables
43 | ```powershell
44 | git clone https://github.com/microsoft/vcpkg.git
45 | cd vcpkg
46 | $env:VCPKG_ROOT = $PWD.Path
47 | $env:Path = $env:VCPKG_ROOT + ';' + $env:Path
48 | ./bootstrap-vcpkg.bat
49 | ```
50 | > Dependencies on Windows
51 | ```powershell
52 | choco install ninja llvm cmake
53 | ```
54 | > Build
55 | ```powershell
56 | cmake --preset=windows -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
57 | cmake --build build
58 | ```
59 |
60 | ### Building python package
61 | We just need to create folder `./wrapper/libuuu/lib` and move the dynamic libraries there.
62 |
63 | ```bash
64 | mkdir ./libuuu/lib
65 | cp build/*.dll ./libuuu/lib # *.so for Linux, *.dylib for MacOS
66 | pip install -e .
67 | ```
--------------------------------------------------------------------------------
/msvc/bzip2.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hh;hpp;hxx;hm;inl;inc;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |
16 |
17 |
18 |
19 | Source Files
20 |
21 |
22 | Source Files
23 |
24 |
25 | Source Files
26 |
27 |
28 | Source Files
29 |
30 |
31 | Source Files
32 |
33 |
34 | Source Files
35 |
36 |
37 | Source Files
38 |
39 |
40 | Source Files
41 |
42 |
43 | Source Files
44 |
45 |
46 | Source Files
47 |
48 |
49 | Source Files
50 |
51 |
52 |
--------------------------------------------------------------------------------
/webusb/src/logic/usePopup.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2023 NXP.
3 | *
4 | * Redistribution and use in source and binary forms, with or without modification,
5 | * are permitted provided that the following conditions are met:
6 | *
7 | * Redistributions of source code must retain the above copyright notice, this
8 | * list of conditions and the following disclaimer.
9 | *
10 | * Redistributions in binary form must reproduce the above copyright notice, this
11 | * list of conditions and the following disclaimer in the documentation and/or
12 | * other materials provided with the distribution.
13 | *
14 | * Neither the name of the NXP Semiconductor nor the names of its
15 | * contributors may be used to endorse or promote products derived from this
16 | * software without specific prior written permission.
17 | *
18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 | * POSSIBILITY OF SUCH DAMAGE.
29 | *
30 | */
31 |
32 | import {useState} from 'react';
33 |
34 | const usePopup = ({bootFile, flashFile}) => {
35 | const [error, setError] = useState();
36 | const [show, setShow] = useState(false);
37 |
38 | const showPopup = () => {
39 | if (flashFile == null || bootFile == null) {
40 | setError("Please choose flash files")
41 | }
42 | else {
43 | setError("");
44 | setShow(true);
45 | }
46 | }
47 | const closePopup = () => {
48 | setShow(false);
49 | }
50 |
51 | return [{
52 | showPopup,
53 | closePopup,
54 | show,
55 | error,
56 | }]
57 | }
58 |
59 | export default usePopup
--------------------------------------------------------------------------------
/uuu/qspi_burn_loader.lst:
--------------------------------------------------------------------------------
1 | uuu_version 1.2.39
2 |
3 | # @_flexspi.bin | bootloader
4 | # @_image [_flexspi.bin] | image burn to flexspi, default is the same as bootloader
5 |
6 | # This command will be run when i.MX6/7 i.MX8MM, i.MX8MQ
7 | SDP: boot -f _flexspi.bin
8 |
9 | # This command will be run when ROM support stream mode
10 | # i.MX8QXP, i.MX8QM, skip QSPI header
11 | SDPS: boot -f _flexspi.bin -skipfhdr
12 |
13 | # These commands will be run when use SPL and will be skipped if no spl
14 | # SDPU will be deprecated. please use SDPV instead of SDPU
15 | # {
16 | SDPU: delay 1000
17 | SDPU: write -f _flexspi.bin -offset 0x10000 -skipfhdr
18 | SDPU: jump
19 | # }
20 |
21 | # These commands will be run when use SPL and will be skipped if no spl
22 | # if (SPL support SDPV)
23 | # {
24 | SDPV: delay 1000
25 | SDPV: write -f _flexspi.bin -skipspl -skipfhdr
26 | SDPV: jump
27 | # }
28 |
29 | FB: ucmd setenv fastboot_buffer ${loadaddr}
30 | FB: download -f _image
31 |
32 | FB: ucmd if test ! -n "$fastboot_bytes"; then setenv fastboot_bytes $filesize; else true; fi
33 |
34 | # Check Image if include flexspi header
35 | FB: ucmd if qspihdr dump ${fastboot_buffer}; then setenv qspihdr_exist yes; else setenv qspihdr_exist no; fi;
36 | # Check Image size if larger than 16M, then use uboot command to write image
37 | FB: ucmd if itest ${fastboot_bytes} -gt 1000000; then setenv qspihdr_large yes; else setenv qspihdr_large no; fi;
38 |
39 | FB[-t 60000]: ucmd if test ${qspihdr_exist} = yes -a ${qspihdr_large} = no; then qspihdr init ${fastboot_buffer} ${fastboot_bytes} safe; else true; fi;
40 |
41 | #if uboot can't support qspihdr command, use uboot image to write qspi image, which require image include qspi flash header
42 | FB: ucmd if test ${qspihdr_exist} = no; then sf probe; else true; fi;
43 | FB[-t 40000]: ucmd if test ${qspihdr_exist} = no; then sf erase 0 +${fastboot_bytes}; else true; fi;
44 | FB[-t 20000]: ucmd if test ${qspihdr_exist} = no; then sf write ${fastboot_buffer} 0 ${fastboot_bytes}; else true; fi;
45 | # if Image is larger than 16M, use uboot command to write image
46 | FB: ucmd if test ${qspihdr_large} = yes; then sf probe; else true; fi;
47 | FB: write -f _image -format "if test ${qspihdr_large} = yes; then sf erase @off +@size; sf write ${fastboot_buffer} @off @size; else true; fi;" -blksz 1 -each 0x100000
48 | FB: done
49 |
--------------------------------------------------------------------------------
/webusb/src/logic/usePopupContent.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2023 NXP.
3 | *
4 | * Redistribution and use in source and binary forms, with or without modification,
5 | * are permitted provided that the following conditions are met:
6 | *
7 | * Redistributions of source code must retain the above copyright notice, this
8 | * list of conditions and the following disclaimer.
9 | *
10 | * Redistributions in binary form must reproduce the above copyright notice, this
11 | * list of conditions and the following disclaimer in the documentation and/or
12 | * other materials provided with the distribution.
13 | *
14 | * Neither the name of the NXP Semiconductor nor the names of its
15 | * contributors may be used to endorse or promote products derived from this
16 | * software without specific prior written permission.
17 | *
18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 | * POSSIBILITY OF SUCH DAMAGE.
29 | *
30 | */
31 |
32 | import {useState} from 'react';
33 |
34 | const usePopupContent = ({bootFile, flashFile}) => {
35 | const [error, setError] = useState();
36 | const [show, setShow] = useState(false);
37 |
38 | const showPopup = () => {
39 | if (flashFile == null || bootFile == null) {
40 | setError("Please choose flash files")
41 | }
42 | else {
43 | setError("");
44 | setShow(true);
45 | }
46 | }
47 | const closePopup = () => {
48 | setShow(false);
49 | }
50 |
51 | return [{
52 | showPopup,
53 | closePopup,
54 | show,
55 | error,
56 | }]
57 | }
58 |
59 | export default usePopupContent
--------------------------------------------------------------------------------
/libuuu/sparse.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 NXP.
3 | *
4 | * Redistribution and use in source and binary forms, with or without modification,
5 | * are permitted provided that the following conditions are met:
6 | *
7 | * Redistributions of source code must retain the above copyright notice, this
8 | * list of conditions and the following disclaimer.
9 | *
10 | * Redistributions in binary form must reproduce the above copyright notice, this
11 | * list of conditions and the following disclaimer in the documentation and/or
12 | * other materials provided with the distribution.
13 | *
14 | * Neither the name of the NXP Semiconductor nor the names of its
15 | * contributors may be used to endorse or promote products derived from this
16 | * software without specific prior written permission.
17 | *
18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 | * POSSIBILITY OF SUCH DAMAGE.
29 | *
30 | */
31 | #pragma once
32 |
33 | #include "sparse_format.h"
34 |
35 | #include
36 | #include
37 |
38 | class SparseFile
39 | {
40 | public:
41 | std::vector m_data;
42 |
43 | static chunk_header_t * get_next_chunk(uint8_t *p, size_t &pos);
44 |
45 | int init_header(size_t blsz, int blcount);
46 |
47 | bool is_append_old_chuck(int type, void *p);
48 | bool is_same_value(void *data, size_t sz);
49 | static bool is_validate_sparse_file(void *p, size_t sz);
50 |
51 | int push(void *p, size_t sz);
52 | int push_one_block(void *data, bool skip=false);
53 | size_t push_one_chuck(chunk_header_t *p, void *data);
54 | size_t push_raw_data(void *data, size_t sz);
55 |
56 | private:
57 | size_t m_cur_chunk_header_pos;
58 | size_t m_max_size;
59 | uint32_t *m_pcrc;
60 | };
61 |
--------------------------------------------------------------------------------
/libuuu/sdps.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 NXP.
3 | *
4 | * Redistribution and use in source and binary forms, with or without modification,
5 | * are permitted provided that the following conditions are met:
6 | *
7 | * Redistributions of source code must retain the above copyright notice, this
8 | * list of conditions and the following disclaimer.
9 | *
10 | * Redistributions in binary form must reproduce the above copyright notice, this
11 | * list of conditions and the following disclaimer in the documentation and/or
12 | * other materials provided with the distribution.
13 | *
14 | * Neither the name of the NXP Semiconductor nor the names of its
15 | * contributors may be used to endorse or promote products derived from this
16 | * software without specific prior written permission.
17 | *
18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 | * POSSIBILITY OF SUCH DAMAGE.
29 | *
30 | */
31 |
32 | #include "cmd.h"
33 | #include
34 |
35 | class SDPSCmd : public CmdBase
36 | {
37 | public:
38 | SDPSCmd(const char *cmd) :CmdBase(cmd)
39 | {
40 | insert_param_info("boot", nullptr, Param::Type::e_null);
41 | insert_param_info("-f", &m_filename, Param::Type::e_string_filename);
42 | insert_param_info("-offset", &m_offset, Param::Type::e_uint32);
43 | insert_param_info("-skipfhdr", &m_bskipflashheader, Param::Type::e_bool);
44 | insert_param_info("-scanterm", &m_bscanterm, Param::Type::e_bool);
45 | insert_param_info("-scanlimited", &m_scan_limited, Param::Type::e_uint64);
46 | }
47 | int run(CmdCtx *p) override;
48 |
49 | private:
50 | bool m_bskipflashheader=0;
51 | bool m_bscanterm=0;
52 | std::string m_filename;
53 | uint32_t m_offset = 0;
54 | uint64_t m_scan_limited = UINT64_MAX;
55 | };
56 |
--------------------------------------------------------------------------------
/libuuu/http.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 NXP.
3 | *
4 | * Redistribution and use in source and binary forms, with or without modification,
5 | * are permitted provided that the following conditions are met:
6 | *
7 | * Redistributions of source code must retain the above copyright notice, this
8 | * list of conditions and the following disclaimer.
9 | *
10 | * Redistributions in binary form must reproduce the above copyright notice, this
11 | * list of conditions and the following disclaimer in the documentation and/or
12 | * other materials provided with the distribution.
13 | *
14 | * Neither the name of the NXP Semiconductor nor the names of its
15 | * contributors may be used to endorse or promote products derived from this
16 | * software without specific prior written permission.
17 | *
18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 | * POSSIBILITY OF SUCH DAMAGE.
29 | *
30 | */
31 |
32 | #pragma once
33 |
34 | #include
35 | #include
36 | #include