PKG/PFS unpacker for PS4

Overview

PS4 PKG/PFS tool (c) 2017-2021 by flatz

Dependencies:

  • mbedtls
  • uthash
  • zlib

For ubuntu-ish:

sudo apt install libmbedtls-dev uthash-dev zlib

To produce windows executable from ubuntu-ish via mingw:

sudo apt install mingw-w64 libz-mingw-w64-dev

Then pass e.g. -DCMAKE_TOOLCHAIN_FILE=../cmake/mingw-w64-x86_64.cmake to cmake.

P.S. In memory of Maxton Garrett (maxton), this release is dedicated to you.

You might also like...
ps4 & ps5 emulator

Kyty ps4 & ps5 emulator The project is in its early stage. Vladimir M Licensed under the MIT license. Building Supported platforms: Windows 10 x64 Too

PS4 Internal PKG Installer

ps4-ipi PS4 IPI, short for Internal PKG Installer, is a PlayStation 4 utility homebrew app which will install PKG files from the HDD, making it possib

An experimental dynamic malware unpacker based on Intel Pin and PE-sieve

Pin'n'Sieve A dynamic malware unpacker based on Intel Pin and PE-sieve (deploys PE-sieve scan on specific triggers). Caution: during the process the m

MediaHouse libs resource unpacker/packer
MediaHouse libs resource unpacker/packer

Multi-Pulti Tools Инструментарий для работы с ресурсами конструктора мультфильмов от издателя MediaHouse. Multi-Pulti Детский конструктор мультфильмов

Based off of [tarekwiz / League-Unpacker]

val-exception-handler Attempted conversion of [tarekwiz / League-Unpacker (https://github.com/tarekwiz/League-Unpacker/blob/master/Unpackman/Main.cpp)

A different way of calling the notify function on the ps4 for homebrew development.

PS4-Notify A different way of calling the notify function on the ps4 for homebrew development. Calling the new Notify void Notify(char* IconURI, char*

Enables Permanent UART output across boots. Supports PS4 version 6.72 only for now

Enables Permanent UART for PS4. Requires a 5.05/6.72/7.02 Jailbroken PS4. To build, you require ps4-sdk from Scene-Collective/ps4-payload-sdk In the t

PS4 kernel hooking library / payload.

PS4 KHook PS4 KHook is a minimalist kernel hooking payload. It targets 5.05 but it can be used with any firmware (or even non-PS4 systems) with modifi

Firmware-agnostic PS4 sandbox escape

libjbc This a firmware-agnostic implementation of the sandbox escape for PS4 homebrew apps. It operates by traversing the process list up to PID 1 (in

Linux 4.19 + PS4 patches + Latest security patches

Linux kernel ============ There are several guides for kernel developers and users. These guides can be rendered in a number of formats, like HTML an

A single file, single function, header to make notifications on the PS4 easier

Notifi Synopsis Adds a single function notifi(). It functions like printf however the first arg is the image to use (NULL and any invalid input should

A simple "do it all" logging library (PRX) designed for the PS4

libLog About A simple "do it all" logging library (PRX) designed for use on the PS4 using the OpenOrbis Toolchain. It should be easy enough to follow

Linux v4.14 with the latest security patches and PS4 patches.

Patches are from https://github.com/Ps3itaTeam/ps4-linux Linux kernel ============ This file was moved to Documentation/admin-guide/README.rst Plea

ps4 & ps5 emulator

Kyty ps4 & ps5 emulator The project is in its early stage. Vladimir M Licensed under the MIT license. Building Supported platforms: Windows 10 x64 Too

The Forge Cross-Platform Rendering Framework PC Windows, Linux, Ray Tracing, macOS / iOS, Android, XBOX, PS4, PS5, Switch, Quest 2
The Forge Cross-Platform Rendering Framework PC Windows, Linux, Ray Tracing, macOS / iOS, Android, XBOX, PS4, PS5, Switch, Quest 2

The Forge is a cross-platform rendering framework supporting PC Windows 10 / 7 with DirectX 12 / Vulkan 1.1 with DirectX Ray Tracing API DirectX 11 Fa

Comments
  • Fix linking error

    Fix linking error

    I'm trying to build this on Arch Linux and hit the following errors:

    [ 88%] Linking C executable pkg_pfs_tool
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.data.rel.local+0x0): multiple definition of `g_rsa_keyset_pkg_entry_key_3'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.data.rel.local+0x60): multiple definition of `g_rsa_keyset_pkg_debug_ekpfs_key'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x60): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.data.rel.local+0xc0): multiple definition of `g_rsa_keyset_pkg_retail_ekpfs_key_0'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0xc0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.data.rel.local+0x120): multiple definition of `g_rsa_keyset_pkg_retail_ekpfs_key_1'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x120): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.data.rel.local+0x180): multiple definition of `g_rsa_keyset_pkg_fake_ekpfs_key'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x180): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.data.rel.local+0x1e0): multiple definition of `g_rsa_keyset_pfs_sig_key'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x1e0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.rodata+0x70): multiple definition of `g_debug_pfs_zero_crypt_seed'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.rodata+0x50): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0x0): multiple definition of `g_ekpfs_obf_key_1'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x228): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0x8): multiple definition of `g_ekpfs_obf_key_2'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x230): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0x10): multiple definition of `g_ekpfs_obf_key_3'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x238): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0x18): multiple definition of `g_ekpfs_obf_key_4'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x240): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0x20): multiple definition of `g_ekpfs_obf_key_5'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x248): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0x28): multiple definition of `g_ekpfs_obf_key_6'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x250): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0x30): multiple definition of `g_ekpfs_obf_key_7'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x258): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0x38): multiple definition of `g_ekpfs_obf_key_8'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x260): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0x40): multiple definition of `g_gdgp_ekc_key_0'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x268): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0x48): multiple definition of `g_gdgp_ekc_key_1'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x270): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0x50): multiple definition of `g_gdgp_ekc_key_2'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x278): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0x58): multiple definition of `g_gdgp_content_key_obf_key'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x280): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0x60): multiple definition of `g_ac_content_key'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x288): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0x68): multiple definition of `g_idps'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x290): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0x70): multiple definition of `g_open_psid'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x298): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0x78): multiple definition of `g_sealed_key_enc_key_1'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2a0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0x80): multiple definition of `g_sealed_key_enc_key_2'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2a8): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0x88): multiple definition of `g_sealed_key_enc_key_3'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2b0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0x90): multiple definition of `g_sealed_key_enc_key_4'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2b8): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0x98): multiple definition of `g_sealed_key_enc_key_5'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2c0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0xa0): multiple definition of `g_sealed_key_enc_key_6'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2c8): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0xa8): multiple definition of `g_sealed_key_enc_key_7'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2d0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0xb0): multiple definition of `g_sealed_key_enc_key_8'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2d8): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0xb8): multiple definition of `g_sealed_key_enc_key_9'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2e0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0xc0): multiple definition of `g_sealed_key_enc_key_10'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2e8): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0xc8): multiple definition of `g_sealed_key_sign_key_1'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2f0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0xd0): multiple definition of `g_sealed_key_sign_key_2'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2f8): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0xd8): multiple definition of `g_sealed_key_sign_key_3'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x300): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0xe0): multiple definition of `g_sealed_key_sign_key_4'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x308): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0xe8): multiple definition of `g_sealed_key_sign_key_5'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x310): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0xf0): multiple definition of `g_sealed_key_sign_key_6'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x318): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0xf8): multiple definition of `g_sealed_key_sign_key_7'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x320): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0x100): multiple definition of `g_sealed_key_sign_key_8'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x328): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0x108): multiple definition of `g_sealed_key_sign_key_9'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x330): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0x110): multiple definition of `g_sealed_key_sign_key_10'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x338): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0x118): multiple definition of `g_sd_auth_code_key'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x340): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0x120): multiple definition of `g_sd_hdr_data_key'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x348): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0x128): multiple definition of `g_sd_hdr_sig_key'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x350): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0x130): multiple definition of `g_open_psid_sig_key'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x358): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0x138): multiple definition of `g_sd_content_key_1'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x360): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0x140): multiple definition of `g_sd_content_key_2'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x368): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0x148): multiple definition of `g_sd_content_key_3'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x370): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0x150): multiple definition of `g_sd_content_key_4'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x378): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0x158): multiple definition of `g_sd_content_key_5'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x380): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0x160): multiple definition of `g_sd_content_key_6'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x388): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0x168): multiple definition of `g_sd_content_key_7'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x390): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0x170): multiple definition of `g_sd_content_key_8'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x398): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/keys.c.o:(.bss+0x178): multiple definition of `g_sd_content_key_9'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x3a0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x0): multiple definition of `g_rsa_keyset_pkg_entry_key_3'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x60): multiple definition of `g_rsa_keyset_pkg_debug_ekpfs_key'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x60): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0xc0): multiple definition of `g_rsa_keyset_pkg_retail_ekpfs_key_0'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0xc0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x120): multiple definition of `g_rsa_keyset_pkg_retail_ekpfs_key_1'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x120): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x180): multiple definition of `g_rsa_keyset_pkg_fake_ekpfs_key'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x180): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x1e0): multiple definition of `g_rsa_keyset_pfs_sig_key'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x1e0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.rodata+0x0): multiple definition of `g_debug_pfs_zero_crypt_seed'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.rodata+0x50): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x228): multiple definition of `g_ekpfs_obf_key_1'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x228): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x230): multiple definition of `g_ekpfs_obf_key_2'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x230): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x238): multiple definition of `g_ekpfs_obf_key_3'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x238): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x240): multiple definition of `g_ekpfs_obf_key_4'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x240): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x248): multiple definition of `g_ekpfs_obf_key_5'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x248): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x250): multiple definition of `g_ekpfs_obf_key_6'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x250): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x258): multiple definition of `g_ekpfs_obf_key_7'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x258): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x260): multiple definition of `g_ekpfs_obf_key_8'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x260): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x268): multiple definition of `g_gdgp_ekc_key_0'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x268): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x270): multiple definition of `g_gdgp_ekc_key_1'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x270): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x278): multiple definition of `g_gdgp_ekc_key_2'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x278): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x280): multiple definition of `g_gdgp_content_key_obf_key'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x280): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x288): multiple definition of `g_ac_content_key'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x288): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x290): multiple definition of `g_idps'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x290): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x298): multiple definition of `g_open_psid'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x298): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x2a0): multiple definition of `g_sealed_key_enc_key_1'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2a0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x2a8): multiple definition of `g_sealed_key_enc_key_2'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2a8): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x2b0): multiple definition of `g_sealed_key_enc_key_3'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2b0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x2b8): multiple definition of `g_sealed_key_enc_key_4'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2b8): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x2c0): multiple definition of `g_sealed_key_enc_key_5'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2c0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x2c8): multiple definition of `g_sealed_key_enc_key_6'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2c8): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x2d0): multiple definition of `g_sealed_key_enc_key_7'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2d0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x2d8): multiple definition of `g_sealed_key_enc_key_8'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2d8): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x2e0): multiple definition of `g_sealed_key_enc_key_9'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2e0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x2e8): multiple definition of `g_sealed_key_enc_key_10'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2e8): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x2f0): multiple definition of `g_sealed_key_sign_key_1'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2f0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x2f8): multiple definition of `g_sealed_key_sign_key_2'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2f8): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x300): multiple definition of `g_sealed_key_sign_key_3'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x300): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x308): multiple definition of `g_sealed_key_sign_key_4'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x308): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x310): multiple definition of `g_sealed_key_sign_key_5'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x310): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x318): multiple definition of `g_sealed_key_sign_key_6'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x318): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x320): multiple definition of `g_sealed_key_sign_key_7'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x320): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x328): multiple definition of `g_sealed_key_sign_key_8'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x328): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x330): multiple definition of `g_sealed_key_sign_key_9'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x330): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x338): multiple definition of `g_sealed_key_sign_key_10'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x338): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x340): multiple definition of `g_sd_auth_code_key'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x340): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x348): multiple definition of `g_sd_hdr_data_key'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x348): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x350): multiple definition of `g_sd_hdr_sig_key'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x350): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x358): multiple definition of `g_open_psid_sig_key'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x358): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x360): multiple definition of `g_sd_content_key_1'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x360): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x368): multiple definition of `g_sd_content_key_2'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x368): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x370): multiple definition of `g_sd_content_key_3'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x370): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x378): multiple definition of `g_sd_content_key_4'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x378): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x380): multiple definition of `g_sd_content_key_5'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x380): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x388): multiple definition of `g_sd_content_key_6'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x388): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x390): multiple definition of `g_sd_content_key_7'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x390): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x398): multiple definition of `g_sd_content_key_8'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x398): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs.c.o:(.bss+0x3a0): multiple definition of `g_sd_content_key_9'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x3a0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x0): multiple definition of `g_rsa_keyset_pkg_entry_key_3'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x60): multiple definition of `g_rsa_keyset_pkg_debug_ekpfs_key'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x60): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0xc0): multiple definition of `g_rsa_keyset_pkg_retail_ekpfs_key_0'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0xc0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x120): multiple definition of `g_rsa_keyset_pkg_retail_ekpfs_key_1'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x120): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x180): multiple definition of `g_rsa_keyset_pkg_fake_ekpfs_key'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x180): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x1e0): multiple definition of `g_rsa_keyset_pfs_sig_key'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x1e0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.rodata+0x0): multiple definition of `g_debug_pfs_zero_crypt_seed'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.rodata+0x50): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x228): multiple definition of `g_ekpfs_obf_key_1'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x228): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x230): multiple definition of `g_ekpfs_obf_key_2'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x230): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x238): multiple definition of `g_ekpfs_obf_key_3'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x238): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x240): multiple definition of `g_ekpfs_obf_key_4'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x240): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x248): multiple definition of `g_ekpfs_obf_key_5'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x248): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x250): multiple definition of `g_ekpfs_obf_key_6'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x250): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x258): multiple definition of `g_ekpfs_obf_key_7'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x258): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x260): multiple definition of `g_ekpfs_obf_key_8'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x260): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x268): multiple definition of `g_gdgp_ekc_key_0'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x268): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x270): multiple definition of `g_gdgp_ekc_key_1'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x270): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x278): multiple definition of `g_gdgp_ekc_key_2'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x278): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x280): multiple definition of `g_gdgp_content_key_obf_key'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x280): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x288): multiple definition of `g_ac_content_key'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x288): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x290): multiple definition of `g_idps'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x290): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x298): multiple definition of `g_open_psid'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x298): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x2a0): multiple definition of `g_sealed_key_enc_key_1'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2a0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x2a8): multiple definition of `g_sealed_key_enc_key_2'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2a8): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x2b0): multiple definition of `g_sealed_key_enc_key_3'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2b0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x2b8): multiple definition of `g_sealed_key_enc_key_4'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2b8): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x2c0): multiple definition of `g_sealed_key_enc_key_5'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2c0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x2c8): multiple definition of `g_sealed_key_enc_key_6'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2c8): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x2d0): multiple definition of `g_sealed_key_enc_key_7'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2d0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x2d8): multiple definition of `g_sealed_key_enc_key_8'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2d8): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x2e0): multiple definition of `g_sealed_key_enc_key_9'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2e0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x2e8): multiple definition of `g_sealed_key_enc_key_10'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2e8): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x2f0): multiple definition of `g_sealed_key_sign_key_1'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2f0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x2f8): multiple definition of `g_sealed_key_sign_key_2'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2f8): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x300): multiple definition of `g_sealed_key_sign_key_3'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x300): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x308): multiple definition of `g_sealed_key_sign_key_4'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x308): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x310): multiple definition of `g_sealed_key_sign_key_5'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x310): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x318): multiple definition of `g_sealed_key_sign_key_6'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x318): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x320): multiple definition of `g_sealed_key_sign_key_7'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x320): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x328): multiple definition of `g_sealed_key_sign_key_8'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x328): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x330): multiple definition of `g_sealed_key_sign_key_9'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x330): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x338): multiple definition of `g_sealed_key_sign_key_10'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x338): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x340): multiple definition of `g_sd_auth_code_key'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x340): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x348): multiple definition of `g_sd_hdr_data_key'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x348): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x350): multiple definition of `g_sd_hdr_sig_key'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x350): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x358): multiple definition of `g_open_psid_sig_key'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x358): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x360): multiple definition of `g_sd_content_key_1'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x360): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x368): multiple definition of `g_sd_content_key_2'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x368): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x370): multiple definition of `g_sd_content_key_3'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x370): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x378): multiple definition of `g_sd_content_key_4'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x378): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x380): multiple definition of `g_sd_content_key_5'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x380): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x388): multiple definition of `g_sd_content_key_6'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x388): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x390): multiple definition of `g_sd_content_key_7'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x390): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x398): multiple definition of `g_sd_content_key_8'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x398): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pfs_sd.c.o:(.bss+0x3a0): multiple definition of `g_sd_content_key_9'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x3a0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x0): multiple definition of `g_rsa_keyset_pkg_entry_key_3'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x60): multiple definition of `g_rsa_keyset_pkg_debug_ekpfs_key'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x60): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0xc0): multiple definition of `g_rsa_keyset_pkg_retail_ekpfs_key_0'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0xc0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x120): multiple definition of `g_rsa_keyset_pkg_retail_ekpfs_key_1'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x120): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x180): multiple definition of `g_rsa_keyset_pkg_fake_ekpfs_key'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x180): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x1e0): multiple definition of `g_rsa_keyset_pfs_sig_key'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x1e0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.rodata+0xa0): multiple definition of `g_debug_pfs_zero_crypt_seed'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.rodata+0x50): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x228): multiple definition of `g_ekpfs_obf_key_1'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x228): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x230): multiple definition of `g_ekpfs_obf_key_2'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x230): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x238): multiple definition of `g_ekpfs_obf_key_3'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x238): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x240): multiple definition of `g_ekpfs_obf_key_4'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x240): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x248): multiple definition of `g_ekpfs_obf_key_5'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x248): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x250): multiple definition of `g_ekpfs_obf_key_6'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x250): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x258): multiple definition of `g_ekpfs_obf_key_7'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x258): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x260): multiple definition of `g_ekpfs_obf_key_8'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x260): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x268): multiple definition of `g_gdgp_ekc_key_0'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x268): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x270): multiple definition of `g_gdgp_ekc_key_1'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x270): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x278): multiple definition of `g_gdgp_ekc_key_2'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x278): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x280): multiple definition of `g_gdgp_content_key_obf_key'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x280): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x288): multiple definition of `g_ac_content_key'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x288): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x290): multiple definition of `g_idps'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x290): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x298): multiple definition of `g_open_psid'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x298): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x2a0): multiple definition of `g_sealed_key_enc_key_1'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2a0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x2a8): multiple definition of `g_sealed_key_enc_key_2'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2a8): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x2b0): multiple definition of `g_sealed_key_enc_key_3'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2b0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x2b8): multiple definition of `g_sealed_key_enc_key_4'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2b8): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x2c0): multiple definition of `g_sealed_key_enc_key_5'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2c0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x2c8): multiple definition of `g_sealed_key_enc_key_6'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2c8): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x2d0): multiple definition of `g_sealed_key_enc_key_7'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2d0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x2d8): multiple definition of `g_sealed_key_enc_key_8'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2d8): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x2e0): multiple definition of `g_sealed_key_enc_key_9'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2e0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x2e8): multiple definition of `g_sealed_key_enc_key_10'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2e8): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x2f0): multiple definition of `g_sealed_key_sign_key_1'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2f0): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x2f8): multiple definition of `g_sealed_key_sign_key_2'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x2f8): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x300): multiple definition of `g_sealed_key_sign_key_3'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x300): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x308): multiple definition of `g_sealed_key_sign_key_4'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x308): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x310): multiple definition of `g_sealed_key_sign_key_5'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x310): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x318): multiple definition of `g_sealed_key_sign_key_6'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x318): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x320): multiple definition of `g_sealed_key_sign_key_7'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x320): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x328): multiple definition of `g_sealed_key_sign_key_8'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x328): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x330): multiple definition of `g_sealed_key_sign_key_9'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x330): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x338): multiple definition of `g_sealed_key_sign_key_10'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x338): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x340): multiple definition of `g_sd_auth_code_key'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x340): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x348): multiple definition of `g_sd_hdr_data_key'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x348): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x350): multiple definition of `g_sd_hdr_sig_key'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x350): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x358): multiple definition of `g_open_psid_sig_key'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x358): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x360): multiple definition of `g_sd_content_key_1'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x360): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x368): multiple definition of `g_sd_content_key_2'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x368): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x370): multiple definition of `g_sd_content_key_3'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x370): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x378): multiple definition of `g_sd_content_key_4'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x378): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x380): multiple definition of `g_sd_content_key_5'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x380): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x388): multiple definition of `g_sd_content_key_6'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x388): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x390): multiple definition of `g_sd_content_key_7'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x390): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x398): multiple definition of `g_sd_content_key_8'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x398): first defined here
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/src/pkg.c.o:(.bss+0x3a0): multiple definition of `g_sd_content_key_9'; CMakeFiles/pkg_pfs_tool.dir/src/keymgr.c.o:(.bss+0x3a0): first defined here
    collect2: error: ld returned 1 exit status
    make[2]: *** [CMakeFiles/pkg_pfs_tool.dir/build.make:469: pkg_pfs_tool] Error 1
    make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/pkg_pfs_tool.dir/all] Error 2
    make: *** [Makefile:91: all] Error 2
    

    This PR is a fix for this problem.

    opened by ultimaweapon 0
  • Add macOS build support

    Add macOS build support

    This PR adds changes to build pkg_pfs_tool on Apple M1 (arm64)

    It should also allow to build on Apple intel x86, but users need to provide mbedtls 2.27 libs on thirdparty/lib/darwin-x86/

    opened by bucanero 0
  • How to compile on Linux ARM64?

    How to compile on Linux ARM64?

    The program won't compile nor link on Linux ARM64.

    Here's what I did:

    cd src
    cmake ../
    make
    

    But then an error shows up:

    cc: error: unrecognized command line option ‘-masm=intel’
    make[2]: *** [CMakeFiles/pkg_pfs_tool.dir/build.make:63: CMakeFiles/pkg_pfs_tool.dir/compression.c.o] Error 1
    make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/pkg_pfs_tool.dir/all] Error 2
    make: *** [Makefile:84: all] Error 2
    

    To "fix" it, I changed this line in CMakeLists.txt

    12 #add_compile_options(-masm=intel -march=native)                                  
    

    And then "make" compiles, but can't link because the architecture is recognized as "linux64":

    [...]
    [100%] Linking C executable pkg_pfs_tool
    /usr/bin/ld: ../thirdparty/lib/linux64/libmbedcrypto.a(aes.c.o): Relocations in generic ELF (EM: 62)
    /usr/bin/ld: ../thirdparty/lib/linux64/libmbedcrypto.a(aes.c.o): Relocations in generic ELF (EM: 62)
    /usr/bin/ld: ../thirdparty/lib/linux64/libmbedcrypto.a: error adding symbols: file in wrong format
    collect2: error: ld returned 1 exit status
    make[2]: *** [CMakeFiles/pkg_pfs_tool.dir/build.make:433: pkg_pfs_tool] Error 1
    make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/pkg_pfs_tool.dir/all] Error 2
    make: *** [Makefile:84: all] Error 2
    

    If I force "../thirdparty/lib/darwin-arm64" via CMakeLists.txt, it won't link either:

    67 set(THIRDPARTY_LIB_DIR "${THIRDPARTY_ROOT_DIR}/lib/darwin-arm64")                
    

    "make" output:

    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/crypto.c.o: in function `crypto_initialize':
    crypto.c:(.text+0x10): undefined reference to `mbedtls_entropy_init'
    /usr/bin/ld: crypto.c:(.text+0x1c): undefined reference to `mbedtls_ctr_drbg_init'
    /usr/bin/ld: crypto.c:(.text+0x34): undefined reference to `mbedtls_cipher_info_from_type'
    /usr/bin/ld: crypto.c:(.text+0x74): undefined reference to `mbedtls_md_info_from_type'
    /usr/bin/ld: crypto.c:(.text+0xc0): undefined reference to `mbedtls_entropy_func'
    /usr/bin/ld: crypto.c:(.text+0xc4): undefined reference to `mbedtls_entropy_func'
    /usr/bin/ld: crypto.c:(.text+0xd0): undefined reference to `mbedtls_ctr_drbg_seed'
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/crypto.c.o: in function `crypto_finalize':
    crypto.c:(.text+0x138): undefined reference to `mbedtls_ctr_drbg_free'
    /usr/bin/ld: crypto.c:(.text+0x144): undefined reference to `mbedtls_entropy_free'
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/crypto.c.o: in function `rsa_public':
    crypto.c:(.text+0x20c): undefined reference to `mbedtls_rsa_init'
    /usr/bin/ld: crypto.c:(.text+0x244): undefined reference to `mbedtls_rsa_public'
    /usr/bin/ld: crypto.c:(.text+0x2a0): undefined reference to `mbedtls_rsa_free'
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/crypto.c.o: in function `rsa_private':
    crypto.c:(.text+0x368): undefined reference to `mbedtls_rsa_init'
    /usr/bin/ld: crypto.c:(.text+0x3a8): undefined reference to `mbedtls_ctr_drbg_random'
    /usr/bin/ld: crypto.c:(.text+0x3ac): undefined reference to `mbedtls_ctr_drbg_random'
    /usr/bin/ld: crypto.c:(.text+0x3b4): undefined reference to `mbedtls_rsa_private'
    /usr/bin/ld: crypto.c:(.text+0x410): undefined reference to `mbedtls_rsa_free'
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/crypto.c.o: in function `mbedtls_rsa_rsaes_pkcs1_v15_decrypt_ex':
    crypto.c:(.text+0x4c0): undefined reference to `mbedtls_rsa_public'
    /usr/bin/ld: crypto.c:(.text+0x4e0): undefined reference to `mbedtls_rsa_private'
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/crypto.c.o: in function `rsa_pkcsv15_decrypt':
    crypto.c:(.text+0x88c): undefined reference to `mbedtls_rsa_init'
    /usr/bin/ld: crypto.c:(.text+0x944): undefined reference to `mbedtls_ctr_drbg_random'
    /usr/bin/ld: crypto.c:(.text+0x948): undefined reference to `mbedtls_ctr_drbg_random'
    /usr/bin/ld: crypto.c:(.text+0x9b8): undefined reference to `mbedtls_rsa_free'
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/crypto.c.o: in function `rsa_pkcsv15_verify_by_hash':
    crypto.c:(.text+0xa8c): undefined reference to `mbedtls_rsa_init'
    /usr/bin/ld: crypto.c:(.text+0xb08): undefined reference to `mbedtls_ctr_drbg_random'
    /usr/bin/ld: crypto.c:(.text+0xb0c): undefined reference to `mbedtls_ctr_drbg_random'
    /usr/bin/ld: crypto.c:(.text+0xb14): undefined reference to `mbedtls_rsa_pkcs1_verify'
    /usr/bin/ld: crypto.c:(.text+0xb48): undefined reference to `mbedtls_rsa_free'
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/crypto.c.o: in function `setup_rsa_keyset':
    crypto.c:(.text+0xce8): undefined reference to `mbedtls_mpi_read_string'
    /usr/bin/ld: crypto.c:(.text+0xd74): undefined reference to `mbedtls_mpi_read_string'
    /usr/bin/ld: crypto.c:(.text+0xe0c): undefined reference to `mbedtls_mpi_read_string'
    /usr/bin/ld: crypto.c:(.text+0xe78): undefined reference to `mbedtls_mpi_read_string'
    /usr/bin/ld: crypto.c:(.text+0xee4): undefined reference to `mbedtls_mpi_read_string'
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/crypto.c.o:crypto.c:(.text+0xf34): more undefined references to `mbedtls_mpi_read_string' follow
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/crypto.c.o: in function `setup_rsa_keyset':
    crypto.c:(.text+0x10a8): undefined reference to `mbedtls_mpi_size'
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/crypto.c.o: in function `sha256_buffer':
    crypto.c:(.text+0x1144): undefined reference to `mbedtls_md_init'
    /usr/bin/ld: crypto.c:(.text+0x115c): undefined reference to `mbedtls_md_setup'
    /usr/bin/ld: crypto.c:(.text+0x1164): undefined reference to `mbedtls_md_starts'
    /usr/bin/ld: crypto.c:(.text+0x1174): undefined reference to `mbedtls_md_update'
    /usr/bin/ld: crypto.c:(.text+0x1180): undefined reference to `mbedtls_md_finish'
    /usr/bin/ld: crypto.c:(.text+0x1188): undefined reference to `mbedtls_md_free'
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/crypto.c.o: in function `sha256_buffer_chunked':
    crypto.c:(.text+0x1250): undefined reference to `mbedtls_md_init'
    /usr/bin/ld: crypto.c:(.text+0x1268): undefined reference to `mbedtls_md_setup'
    /usr/bin/ld: crypto.c:(.text+0x1270): undefined reference to `mbedtls_md_starts'
    /usr/bin/ld: crypto.c:(.text+0x12bc): undefined reference to `mbedtls_md_update'
    /usr/bin/ld: crypto.c:(.text+0x12d4): undefined reference to `mbedtls_md_finish'
    /usr/bin/ld: crypto.c:(.text+0x12ec): undefined reference to `mbedtls_md_free'
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/crypto.c.o: in function `hmac_sha256_buffer':
    crypto.c:(.text+0x13b0): undefined reference to `mbedtls_md_init'
    /usr/bin/ld: crypto.c:(.text+0x13c8): undefined reference to `mbedtls_md_setup'
    /usr/bin/ld: crypto.c:(.text+0x13d8): undefined reference to `mbedtls_md_hmac_starts'
    /usr/bin/ld: crypto.c:(.text+0x13e8): undefined reference to `mbedtls_md_hmac_update'
    /usr/bin/ld: crypto.c:(.text+0x13f4): undefined reference to `mbedtls_md_hmac_finish'
    /usr/bin/ld: crypto.c:(.text+0x13fc): undefined reference to `mbedtls_md_free'
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/crypto.c.o: in function `hmac_sha256_buffer_chunked':
    crypto.c:(.text+0x14f8): undefined reference to `mbedtls_md_init'
    /usr/bin/ld: crypto.c:(.text+0x1510): undefined reference to `mbedtls_md_setup'
    /usr/bin/ld: crypto.c:(.text+0x1520): undefined reference to `mbedtls_md_hmac_starts'
    /usr/bin/ld: crypto.c:(.text+0x156c): undefined reference to `mbedtls_md_hmac_update'
    /usr/bin/ld: crypto.c:(.text+0x1584): undefined reference to `mbedtls_md_hmac_finish'
    /usr/bin/ld: crypto.c:(.text+0x1594): undefined reference to `mbedtls_md_free'
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/crypto.c.o: in function `aes_encrypt_cbc_cts':
    crypto.c:(.text+0x16f0): undefined reference to `mbedtls_aes_init'
    /usr/bin/ld: crypto.c:(.text+0x1708): undefined reference to `mbedtls_aes_setkey_enc'
    /usr/bin/ld: crypto.c:(.text+0x17bc): undefined reference to `mbedtls_aes_crypt_cbc'
    /usr/bin/ld: crypto.c:(.text+0x181c): undefined reference to `mbedtls_aes_crypt_ecb'
    /usr/bin/ld: crypto.c:(.text+0x18b0): undefined reference to `mbedtls_aes_free'
    /usr/bin/ld: crypto.c:(.text+0x18d4): undefined reference to `mbedtls_aes_free'
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/crypto.c.o: in function `aes_decrypt_cbc_cts':
    crypto.c:(.text+0x1ad0): undefined reference to `mbedtls_aes_init'
    /usr/bin/ld: crypto.c:(.text+0x1ae8): undefined reference to `mbedtls_aes_setkey_dec'
    /usr/bin/ld: crypto.c:(.text+0x1b10): undefined reference to `mbedtls_aes_crypt_cbc'
    /usr/bin/ld: crypto.c:(.text+0x1b20): undefined reference to `mbedtls_aes_free'
    /usr/bin/ld: crypto.c:(.text+0x1b74): undefined reference to `mbedtls_aes_init'
    /usr/bin/ld: crypto.c:(.text+0x1b8c): undefined reference to `mbedtls_aes_setkey_enc'
    /usr/bin/ld: crypto.c:(.text+0x1bb0): undefined reference to `mbedtls_aes_crypt_ecb'
    /usr/bin/ld: crypto.c:(.text+0x1bc0): undefined reference to `mbedtls_aes_free'
    /usr/bin/ld: crypto.c:(.text+0x1c70): undefined reference to `mbedtls_aes_free'
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/crypto.c.o: in function `aes_decrypt_oex':
    crypto.c:(.text+0x1ec4): undefined reference to `mbedtls_aes_setkey_enc'
    /usr/bin/ld: crypto.c:(.text+0x1f30): undefined reference to `mbedtls_aes_crypt_ecb'
    /usr/bin/ld: crypto.c:(.text+0x2000): undefined reference to `mbedtls_aes_free'
    /usr/bin/ld: crypto.c:(.text+0x201c): undefined reference to `mbedtls_aes_free'
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/crypto.c.o: in function `aes_cmac':
    crypto.c:(.text+0x20f8): undefined reference to `mbedtls_cipher_cmac'
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/crypto.c.o: in function `encdec_device_alloc':
    crypto.c:(.text+0x22ac): undefined reference to `mbedtls_aes_xts_init'
    /usr/bin/ld: crypto.c:(.text+0x22d8): undefined reference to `mbedtls_aes_xts_setkey_enc'
    /usr/bin/ld: crypto.c:(.text+0x2300): undefined reference to `mbedtls_aes_xts_init'
    /usr/bin/ld: crypto.c:(.text+0x2330): undefined reference to `mbedtls_aes_xts_setkey_dec'
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/crypto.c.o: in function `encdec_device_free':
    crypto.c:(.text+0x23d0): undefined reference to `mbedtls_aes_xts_free'
    /usr/bin/ld: crypto.c:(.text+0x23dc): undefined reference to `mbedtls_aes_xts_free'
    /usr/bin/ld: CMakeFiles/pkg_pfs_tool.dir/crypto.c.o: in function `encdec_device_process':
    crypto.c:(.text+0x2584): undefined reference to `mbedtls_aes_crypt_xts'
    /usr/bin/ld: crypto.c:(.text+0x2614): undefined reference to `mbedtls_aes_crypt_xts'
    collect2: error: ld returned 1 exit status
    make[2]: *** [CMakeFiles/pkg_pfs_tool.dir/build.make:433: pkg_pfs_tool] Error 1
    make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/pkg_pfs_tool.dir/all] Error 2
    make: *** [Makefile:84: all] Error 2
    

    Do you know how to fix this and add Linux ARM support?

    opened by hippie68 1
Owner
null
An experimental dynamic malware unpacker based on Intel Pin and PE-sieve

Pin'n'Sieve A dynamic malware unpacker based on Intel Pin and PE-sieve (deploys PE-sieve scan on specific triggers). Caution: during the process the m

hasherezade 54 Dec 16, 2022
Based off of [tarekwiz / League-Unpacker]

val-exception-handler Attempted conversion of [tarekwiz / League-Unpacker (https://github.com/tarekwiz/League-Unpacker/blob/master/Unpackman/Main.cpp)

null 15 Oct 9, 2022
A different way of calling the notify function on the ps4 for homebrew development.

PS4-Notify A different way of calling the notify function on the ps4 for homebrew development. Calling the new Notify void Notify(char* IconURI, char*

Greg 24 Dec 20, 2022
Enables Permanent UART output across boots. Supports PS4 version 6.72 only for now

Enables Permanent UART for PS4. Requires a 5.05/6.72/7.02 Jailbroken PS4. To build, you require ps4-sdk from Scene-Collective/ps4-payload-sdk In the t

Alexander Boulton 15 May 12, 2022
PS4 kernel hooking library / payload.

PS4 KHook PS4 KHook is a minimalist kernel hooking payload. It targets 5.05 but it can be used with any firmware (or even non-PS4 systems) with modifi

Specter 48 Dec 27, 2022
Firmware-agnostic PS4 sandbox escape

libjbc This a firmware-agnostic implementation of the sandbox escape for PS4 homebrew apps. It operates by traversing the process list up to PID 1 (in

null 27 Dec 4, 2022
Linux 4.19 + PS4 patches + Latest security patches

Linux kernel ============ There are several guides for kernel developers and users. These guides can be rendered in a number of formats, like HTML an

kquote03 1 Oct 12, 2021
A single file, single function, header to make notifications on the PS4 easier

Notifi Synopsis Adds a single function notifi(). It functions like printf however the first arg is the image to use (NULL and any invalid input should

Al Azif 9 Oct 4, 2022
A simple "do it all" logging library (PRX) designed for the PS4

libLog About A simple "do it all" logging library (PRX) designed for use on the PS4 using the OpenOrbis Toolchain. It should be easy enough to follow

Al Azif 8 Aug 9, 2022
Linux v4.14 with the latest security patches and PS4 patches.

Patches are from https://github.com/Ps3itaTeam/ps4-linux Linux kernel ============ This file was moved to Documentation/admin-guide/README.rst Plea

kquote03 2 Oct 12, 2021